2 Replies Latest reply on Feb 13, 2007 5:06 AM by pmuir

    Conversation-scoped JavaBean

      I have an SFSB with an @Out of myVariable, where myVariable is an entity. The SFSB then calls a method on a conversation-scoped JavaBean with an @In of myVariable. Ideally, the myVariable should be exactly the same in the SFSB and the JavaBean.

      The problem may be that myVariable is an entity with properties that are named the same as other outjected components. What is happening is that the myVariable is not being injected into the JavaBean from the outjected version in the SFSB...instead, the myVariable in the JavaBean seems to be constructing itself from scratch and injecting each property of the entity from the contexts.

      For example, if myVariable is made up of properties a and b, then it will bring in whatever the current values of a and b are in the contexts. Is this supposed to happen - because if myVariable already exists, why doesn't it just inject that?

      The JavaBean is implementing an interface, and the JavaBean class has the following annotations:

      @Name("thejavabean")
      @Scope(ScopeType.CONVERSATION)


        • 1. Re: Conversation-scoped JavaBean

          Other entities are getting correctly injected into the JavaBean. I read the documentation section on JavaBeans, but I'm not sure if there are some restrictions on what can successfully be injected into them, and on what the scopes of the JavaBean, injected components, etc must be.

          • 2. Re: Conversation-scoped JavaBean
            pmuir

            I'm quite confused by your problem :( Could you try explaining again and post some code :)