aishvaryapedgaonkar
Feb 1st, 2006, 10:12 AM
Books Referred:
"Professional Java Development using Spring Framework"
"Spring in Action"
"Spring Reference shipped with the framework archive"
Hi,
I am trying to expose a business function using Axis. My setup follows,
Hibernate 3.1
Spring 1.2.5
Axis 1.2.1
Tomcat 5.5
Linux FC4
As documented in books,
I have created a layer of DAO interfaces and the correspoding implementations (BookDaoImpl and UserDaoImpl). corresp beans are (bookDao and userDao)
I have created a layer of Business Objects (Service Layer) (UserServiceImpl and BookServiceImpl) corresp beans are (bookService and userService). These objects are proxied since I am using hibernateTransactionManager (I have tried jdbcTransactionManager and no transaction manager combinations too...)
I have created a business object JaxRpcBookService which has a method
Book getBookById(String id)
this bean obtains a "bookService" bean in its init method, and I delegate the above function to the bookService bean.
I have included the axis servlet as documented in the book "Professional Java Development using Spring Framework" in web.xml, as per my knowledge axis is properly configured since wsdl is avaliable with the said method exposed.
NOW I have written a client for invoking the above method, I started tomcat in debug mode "./catalina.sh debug" so that i could read the messages. Using some stdout statements I understood that the call goes upto the DAO and then an exception is thrown saying that the owning sessionFactory was closed. Ofcourse the infamous
org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed
Exception is thrown
I have tried several combinations of transaction managers, but this issue still remains
Somebody please help!!!
Thanks in advance!!!
PS: There is a pattern "Open Session in View", I think it may solve the problem, but i dunno how to register an interceptor
"Professional Java Development using Spring Framework"
"Spring in Action"
"Spring Reference shipped with the framework archive"
Hi,
I am trying to expose a business function using Axis. My setup follows,
Hibernate 3.1
Spring 1.2.5
Axis 1.2.1
Tomcat 5.5
Linux FC4
As documented in books,
I have created a layer of DAO interfaces and the correspoding implementations (BookDaoImpl and UserDaoImpl). corresp beans are (bookDao and userDao)
I have created a layer of Business Objects (Service Layer) (UserServiceImpl and BookServiceImpl) corresp beans are (bookService and userService). These objects are proxied since I am using hibernateTransactionManager (I have tried jdbcTransactionManager and no transaction manager combinations too...)
I have created a business object JaxRpcBookService which has a method
Book getBookById(String id)
this bean obtains a "bookService" bean in its init method, and I delegate the above function to the bookService bean.
I have included the axis servlet as documented in the book "Professional Java Development using Spring Framework" in web.xml, as per my knowledge axis is properly configured since wsdl is avaliable with the said method exposed.
NOW I have written a client for invoking the above method, I started tomcat in debug mode "./catalina.sh debug" so that i could read the messages. Using some stdout statements I understood that the call goes upto the DAO and then an exception is thrown saying that the owning sessionFactory was closed. Ofcourse the infamous
org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed
Exception is thrown
I have tried several combinations of transaction managers, but this issue still remains
Somebody please help!!!
Thanks in advance!!!
PS: There is a pattern "Open Session in View", I think it may solve the problem, but i dunno how to register an interceptor