I'm running into a problem since upgrading from JBoss 3.2.1 to 3.2.3 with warnings: Unable to passivate due to ctx lock. I've seen a lot of other people with questions about this, but haven't been able to find much in the way of answers, yet.

I have a stateful bean which acts as a page iterator for entity beans. The client creates the stateful bean which calls methods on a stateless bean which in turn uses a finder method to retrieve a collection of entity beans.

The stateless bean then returns to the stateful bean a collection of data objects which the stateful bean holds onto.

The client then invokes methods in the stateful bean to navigate through the collection of data objects.

If the passivation time expires for the stateful bean, I can see JBoss trying to passivate the stateful bean, but fails: Unable to passivate due to ctx lock and references the stateful bean (id=xxxx).

If my stateful bean is holding data objects copied from entity beans by the stateless bean (session facade for the entites) why is the stateful failing to passivate? Shouldn't the entity beans retrieved by the stateless bean be released when the stateless bean invocation completes?

Bug: 780746 mentions a lock being created in Handle.getEJBObject that is never released. As it turns out, I need to navigate at least one page in order to see this problem -- which involves retrieving the EJB Handle from the HTTP session and performing a getEJBObject.