0 Replies Latest reply on Oct 18, 2012 7:17 AM by Mr Oracle

    Error using Stateful bean - Bean Deleted

    Mr Oracle
      JDev, WLS 10.3.5 - Linux OS, EJB 3.0

      I have a stateful bean (which I converted from stateless).

      When I try to use it - I get "Bean Deleted" errors.

      I have only 3 cases where I need stateful beans (middle tier only).

      I have several taskflows that contribute data then partially process the data and finally finish the process (similar to a shopping cart)

      I have a data structure (java class) that is associated with each instance of the bean (this is actually what needs to be stateful).

      My EJB creates an instance of this class and I expose it to the client via an accessorIterator (yes it is bound) the client then populates the data and calls methods
      along the way to contribute and process - when I finish the processing - I call the remove.

      The EJB is not "used" in the client - but rather accessed. I am using adf (I have not changed the access to the EJB - just added the remove - I had expected the container to manage the creation. Do I need to serialize the bean? How do I prevent the container from deleting the bean.

      Also - most all the example I have seen use a remote interface - I am using local - as it will always be local (no separation on the middle tier from EJB and app so they all run in the same jvm). I have three similar EJBs - so this needs to be resolved. (all share the same architecture - I have a java data class that is created inside each bean - with an accessIterator providing access for the client - and all the manipulation methods are in the same bean).