• Post Reply Bookmark Topic Watch Topic
  • New Topic

Transaction Exception and NoSuchObjectException

 
rastin purr
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it necessary to remove a stateful session bean when it is no longer needed? or will the system garbage collect it?
If I have a stateful session bean in the http session, will it be removed if the http session is removed?
What about stateless session bean. If i call the create method from the home interface. Do I need to call the remove after the stateless session bean is not needed?
Have anybody encounter a situation where, the ear application works ok for some time and then it throws transaction rolled back exception and when try to access it, it throws no such object exception. but when the application is restarted it is ok. Please help me out. Thanks
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.RemoteException: nested exception is: javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 9998 Maybe; nested exception is: org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x2000 minor code: 1806 completed: Maybe; nested exception is: javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 9998 Maybe; nested exception is: org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x2000 minor code: 1806 completed: Maybe at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.wrapException(Util.java:350) at javax.rmi.CORBA.Util.wrapException(Util.java:277) at esyar.forum.bean.session.identifier._Identification_Stub.approveRequestedForum(Unknown Source) at management.helper.IdentityBean.approveRequestedForum(IdentityBean.java:291) at management.forumrequest.ApproveForumRequestServlet.processRequest(ApproveForumRequestServlet.java:61) at management.forumrequest.ApproveForumRequestServlet.doPost(ApproveForumRequestServlet.java:140) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:197) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

and

java.rmi.NoSuchObjectException: CORBA OBJECT_NOT_EXIST 9998 Maybe; nested exception is: org.omg.CORBA.OBJECT_NOT_EXIST: vmcid: 0x2000 minor code: 1806 completed: Maybe at com.sun.corba.ee.internal.iiop.ShutdownUtilDelegate.mapSystemException(ShutdownUtilDelegate.java:102) at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.wrapException(Util.java:344) at javax.rmi.CORBA.Util.wrapException(Util.java:277) at esyar.forum.bean.session.identifier._Identification_Stub.remove(Unknown Source) at management.helper.IdentityBean.removeEJBReferences(IdentityBean.java:46) at verification.LogOutServlet.processRequest(LogOutServlet.java:51) at verification.LogOutServlet.doGet(LogOutServlet.java:76) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:197) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
Ras
[ September 22, 2002: Message edited by: rastin purr ]
 
Dave Landers
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you need to remove stateful session beans, otherwise they will "clog up" the server. The container will probably remove or at least passivate them after some timeout, but you should not count on this.
You can put an HttpSessionBindingListener in the session to remove the bean when the session times out.
It is not necessary to remove a stateless session bean, since it has no identity for the server to persist. But it is not harmful to call remove, either.
On the other problem, just a guess - is the Identity object a stateful session? If so, it may have been removed (by a client or timed out by server). That would explain object not found exception.
[ September 22, 2002: Message edited by: Dave Landers ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!