9 Replies Latest reply on May 1, 2008 5:32 PM by Matthew Sandoz

    Actions that call another kind of EJBs, like Session Beans a

    Luiz Antonio Falaguasta Barbosa Novice

      Hi people,

      I've been asking about actions to forward messages from the JBossESB to real services.

      So, Daniel (beve) showed me an action to access a MDB, but I would like to know if it is possible make an action to access Session Beans and Entity Beans.

      Please, does anybody know if is it possible?

      Thanks in advance!

      Regards,

      Luiz

        • 1. Re: Actions that call another kind of EJBs, like Session Bea
          Kevin Conner Master

          You can handle this in the same way as any other EJB client would, this is not specific to the ESB.

          • 2. Re: Actions that call another kind of EJBs, like Session Bea
            Luiz Antonio Falaguasta Barbosa Novice

            Ok, but how can I forward message to the EJB from the ESB?

            I am imagining only a service (EJB in the machine A) that is accessed by a client (in the machine B) through the JBossESB (in the machine C). So, the ESB will only forward the message to the service (EJB).

            When I have an MDB EJB, I write an action to route/forward message to the MDB, but which kind of action may I write for the Session Bean can receives the request? Can you give me an example of action into jboss-esb.xml?

            Thanks in advance!

            Regards,

            Luiz

            • 3. Re: Actions that call another kind of EJBs, like Session Bea
              Dominik Kunz Newbie

              Hi Luiz,

              have a look at http://jira.jboss.com/jira/browse/JBESB-1350 it was my first attempt to call session beans with a "generic" action.
              Maybe you can use it (or parts of it). It is not well testet, it was just a quick hack, so maybe it is better to review the code :)

              • 4. Re: Actions that call another kind of EJBs, like Session Bea
                Kevin Conner Master

                Hiya Dominik.

                Good timing, I was just discussing this task with someone yesterday. Your posting has reminded me to update the task :).

                We are going to take a look at this for the next release of the ESB.

                • 5. Re: Actions that call another kind of EJBs, like Session Bea
                  Jawhar BEN ABDALLAH Newbie

                   

                  "domkun" wrote:
                  Hi Luiz,

                  have a look at http://jira.jboss.com/jira/browse/JBESB-1350 it was my first attempt to call session beans with a "generic" action.
                  Maybe you can use it (or parts of it). It is not well testet, it was just a quick hack, so maybe it is better to review the code :)


                  Hi domkun,

                  In the university they ask as to Program a 'code generator' to integrate a composant or one service of a composant on the ESB of JbossEsb

                  I found your JIRA and i think that it will be so helpful for me.
                  am newbie in J2EE and Jboss
                  so i think the first thing that i have to do is studying the proprieties of an EJB ....
                  then i'll try create an EJB and try to use ur Class.
                  my question is, do you have other documentation about your EJBProcessor
                  and would you accept to help me (can i have your mail plz ? )

                  thanx
                  (sorry for my bad english :( )

                  • 6. Re: Actions that call another kind of EJBs, like Session Bea
                    Dominik Kunz Newbie

                    Hi Rapidou,

                    if you like you can mail me. dominik.kunz(a)gmail.com

                    • 7. Re: Actions that call another kind of EJBs, like Session Bea
                      Matthew Sandoz Newbie

                      I just tried to implement this on my 4.2.2GA server and am getting an error - any thoughts? Anyone seen this before?



                      org.jboss.soa.esb.actions.ActionProcessingException: Unexpected invocation target exception from processor
                       at org.jboss.soa.esb.listeners.message.ActionProcessorMethodInfo.processMethods(ActionProcessorMethodInfo.java:127)
                       at org.jboss.soa.esb.listeners.message.OverriddenActionLifecycleProcessor.process(OverriddenActionLifecycleProcessor.java:
                      74)
                       at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:316)
                       at org.jboss.soa.esb.listeners.message.MessageAwareListener$1.run(MessageAwareListener.java:303)
                       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
                       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
                       at java.lang.Thread.run(Thread.java:619)
                      Caused by: java.lang.reflect.InvocationTargetException
                       at sun.reflect.GeneratedMethodAccessor148.invoke(Unknown Source)
                       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                       at java.lang.reflect.Method.invoke(Method.java:597)
                       at com.nexusbpm.esb.action.ExecuteJbpmCommandAction.lookupHome(ExecuteJbpmCommandAction.java:105)
                       at com.nexusbpm.esb.action.ExecuteJbpmCommandAction.getCommandService(ExecuteJbpmCommandAction.java:61)
                       at com.nexusbpm.esb.action.ExecuteJbpmCommandAction.execute(ExecuteJbpmCommandAction.java:52)
                       at sun.reflect.GeneratedMethodAccessor147.invoke(Unknown Source)
                       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                       at java.lang.reflect.Method.invoke(Method.java:597)
                       at org.jboss.soa.esb.listeners.message.ActionProcessorMethodInfo.processMethods(ActionProcessorMethodInfo.java:102)
                       ... 6 more
                      Caused by: java.lang.IllegalArgumentException: null object name
                       at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:509)
                       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:653)
                       at org.jboss.invocation.unified.server.UnifiedInvoker.invoke(UnifiedInvoker.java:231)
                       at sun.reflect.GeneratedMethodAccessor141.invoke(Unknown Source)
                       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                       at java.lang.reflect.Method.invoke(Method.java:597)
                       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                       at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:288)
                       at $Proxy16.invoke(Unknown Source)
                       at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:769)
                       at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:101)
                       at org.jboss.remoting.Client.invoke(Client.java:1634)
                       at org.jboss.remoting.Client.invoke(Client.java:548)
                       at org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy.invoke(UnifiedInvokerProxy.java:183)
                       at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)
                       at org.jboss.invocation.MarshallingInvokerInterceptor.invoke(MarshallingInvokerInterceptor.java:63)
                       at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
                       at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
                       at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:184)
                       at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
                       at $Proxy141.create(Unknown Source)


                      • 8. Re: Actions that call another kind of EJBs, like Session Bea
                        Kevin Conner Master

                         

                        "msandoz" wrote:
                        I just tried to implement this on my 4.2.2GA server and am getting an error - any thoughts? Anyone seen this before?


                        From the stack trace it looks as if there is an issue with remoting.

                        If you can wait a few days then we will have an ESB that works with AS4.2.2GA (4.2.1 ESB release was tested on AS4.2.1GA) and this will hopefully fix your issue. It will certainly provide us with a good platform to investigate further if the issue still exists.

                        The release candidate for 4.3 will be out very soon.


                        • 9. Re: Actions that call another kind of EJBs, like Session Bea
                          Matthew Sandoz Newbie

                          A friend helped me out - it turns out i had the wrong copy of my ejb client jar in the esb. i used one that had the deployment descriptors in it so it tried to deploy a mangled version of the ejbs and that blocked the right version of the ejbs from getting loaded. so - my bad. lesson for me is: watch out what you put in the esb directory!