7 Replies Latest reply on Oct 23, 2008 3:51 AM by kconner

    How do you configure EJBProcessor action?

      I have a SLSB with SLSBRemote and SLSBLocal interfaces

      What exactly needs to be in ejb-name and jndi-name?

      Is there a way I can lookup the exact format for the jndi-name through the jmx console?

      I keep getting this error:


      Caused by: org.jboss.soa.esb.actions.ActionLifecycleException: Got an error while processing EJB MySLSB
       at org.jboss.soa.esb.actions.EJBProcessor.initialise(EJBProcessor.java:212)
       at org.jboss.soa.esb.listeners.message.OverriddenActionLifecycleProcessor.initialise(OverriddenActionLifecycleProcessor.java:123)
       at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.initialise(ActionProcessingPipeline.java:259)
       ... 99 more
      


        • 1. Re: How do you configure EJBProcessor action?

          After running the ESB in debugger I found the problem here:

          EJBProcessor.java

           ejbHome = (EJBHome) PortableRemoteObject.narrow(
           (EJBHome) iniCtx.lookup(ejbRef.get(JNDI_NAME)),
           EJBHome.class);
          


          It looks like it cannot resolve EJBHome. Am I missing something?
          I'm running JBoss 4.3.2 with ESB 4.4 and JDK 5

          • 2. Re: How do you configure EJBProcessor action?

            After further debugging, I found that this is the problem:

            ClassCastException: Cannot cast $Proxy85 (id=1244) to javax.ejb.EJBHome
            


            iniCtx.lookup(ejbRef.get(JNDI_NAME))

            cannot be cast into
            EJBHome


            Is this a bug?

            • 3. Re: How do you configure EJBProcessor action?
              kconner

              Is this an EJB3 bean? If so, you need to explicitly declare this at present.

              Can add

              <property name="ejb3" value="true" />
              to your action declaration?

              Sorry about this,
              Kev

              • 4. Re: How do you configure EJBProcessor action?

                Yes, I tried adding that too but still the same error. It's still trying to cast it into the EJBHome.

                • 5. Re: How do you configure EJBProcessor action?
                  beve

                  This is what the configuration can look like (taken from the ejbprocessor quickstart):

                  <action name="EJBTestWithReturnValue" class="org.jboss.soa.esb.actions.EJBProcessor">
                   <property name="ejb3" value="true" />
                   <property name="method" value="getMessage" />
                   <property name="jndi-name" value="SimpleSLSB/remote" />
                   <property name="initial-context-factory" value="org.jnp.interfaces.NamingContextFactory" />
                   <property name="provider-url" value="localhost:1099" />
                   <property name="esb-out-var" value="org.jboss.soa.esb.message.defaultEntry"/>
                  </action>


                  Sounds like perhaps the slsb.esb has not been updated and the action is simply ignoring the 'ejb3' property. Could that be the case perhaps?

                  Regards,

                  /Daniel



                  • 6. Re: How do you configure EJBProcessor action?

                    I tried the config you just mentioned but I get the same error.

                    The source code in the version 4.4GA does not have anything about the ejb3 property.

                    Also, I don't see the ejbprocessot quickstart in the samples folder.

                    I'm assuming all the new code and samples are in the repository but not in the official release yet.

                    • 7. Re: How do you configure EJBProcessor action?
                      kconner

                      Apologies, you are correct.

                      We have done the work for this but it is in a branch at present.

                      https://jira.jboss.org/jira/browse/JBESB-1919 contains more details about the fix.