7 Replies Latest reply on Dec 5, 2006 6:15 PM by Pete Muir

    Question about Conversations and Stateful Bean Instances

    Ed Kusnitz Newbie

      I have the following question, which doesn't appear to be addressed in the documentation or the forums:

      We have a stateful bean declared like this:

      @Stateful
      @Name("CRUDNode")
      @Scope(ScopeType.CONVERSATION)
      public class CRUDNodeAction extends CRUDAdminTypeAction implements Serializable, CRUDAdminType, CRUDNode {
      ...
      @Create
       public void create() {
      



      The ancestor looks like this:
      @Stateful
      @Name("CRUDAdminType")
      @Scope(ScopeType.CONVERSATION)
      public class CRUDAdminTypeAction implements CRUDAdminType {
      ...
       @Begin(nested=true)
       public String details() {
      ...
       @End
       public String edit() {
      ...
       @End
       public String cancel() {
      ...
      
      


      The details() method is called from a set of links representing different nodes (created dynamically via Javascript, so I can't reproduce it here). The first time you click the link, @Create gets called, then @Begin, which makes sense. However, on subsequent clicks on different nodes (without calling any @End methods) @Create never gets called.

      So, my question is: Shouldn't a new conversation (nested or not) create a new instance of my stateful bean, CRUDNodeAction, and therefore call @Create?