Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problems removing stateful session bean

801449Jul 1 2009 — edited Dec 21 2009
Hello Everyone,

we encountered a strange issue with stateful session beans. The bean itself seems to work fine. We get an instance using either ejb injections or jndi lookup, but everytime we try to remove it by calling the method annotated with @Remove the bean does NOT get removed. The next time we try to look up an instance we get the same removed bean, and every method call results in a NoSuchObjectException.

Shouldn't the removed bean be destroyed by now? Isn't it guaranteed that I get a brand new shiny instance with a lookup?

If we don't use the remove annotation the bean works fine for a while, but once it's session gets invalidated the problems are back again. It's like the beans are stuck in the jndi and no matter what we do, once they are in a "removed" or timed out state no new instance can be acquired.

App server is: OC4J 10.1.3.4
Java 5 / EJB 3
We tried posting in the oracle forum but didn't get an answer. Maybe someone here could help?

Zsom
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 18 2010
Added on Jul 1 2009
3 comments
331 views