2 Replies Latest reply on Jun 3, 2013 6:46 AM by Ciro Aiello Branched from an earlier discussion.

    Scoped EJB client contexts

    Ciro Aiello Newbie

      Hi guys,


      another problem...


      what if i want to declare the ejbClientContext as scoped with this configuration: AS72 EJB invocations from a remote server instance?


      Some threads say to add this:

      environment.put("org.jboss.ejb.client.scoped.context", true);

      to the jboss-ejb-client.properties


      but i don't have this file, so how to set up this property ?

        • 1. Re: Scoped EJB client contexts
          jaikiran pai Master

          The main goal of scoped EJB client contexts was to allow users to just use the JNDI APIs to lookup and invoke EJBs without the requirement of using a jboss-ejb-client.properties. So the org.jboss.ejb.client.scoped.context property is supposed to be set in the Properties object that you pass to the InitialContext constructor. It's not supposed to be in jboss-ejb-client.properties.


          By the way, which version of the application server are you using?

          • 2. Re: Scoped EJB client contexts
            Ciro Aiello Newbie

            Thanks Jaikiran


            I'm on JBoss EAP 6.0.0.GA (AS 7.1.2.Final)


            I'll try to explain my problem:

            - I call a local EJB

            - Inside my local EJB i create a remote context and call a remote EJB to retrieve some datas

            - Datas are processed successfully

            - When i return the response to my local EJB i recieve an ejb-client error


            I think the problem is on the global EJBClientContext.

            If i try to comment out the ejb call it works again.


            This is the error (actually is marked as a warning, i also comment out some things):


            12:42:36,698 INFO  [org.jboss.ejb.client.remoting] (Remoting "xx" task-3) EJBCLIENT000017: Received server version 1 and marshalling strategies [river]

            12:42:36,723 INFO  [org.jboss.ejb.client.remoting] (ejb-client-remote-connection-reconnect-2-thread-1) EJBCLIENT000013: Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@7c8819f6, receiver=Remoting connection EJB receiver [connection=Remoting connection <73b4693d>,channel=jboss.ejb,nodename=expo-dev-02]} on channel Channel ID f572b3df (outbound) of Remoting connection 53c83ae9 to xxx.xxx.xx.xxx/xxx.xxx.xx.xxx:4447

            12:42:36,736 WARN  [org.jboss.ejb.client.remoting.ChannelAssociation] (Remoting "xx" task-1) Unsupported message received with header 0xffffffff

            12:42:37,011 WARN  [com.arjuna.ats.jtax] (RequestProcessor-3) ARJUNA024015: XAResource prepare failed on resource org.jboss.ejb.client.EJBClientManagedTransactionContext$ResourceImpl@2a0396a for transaction < 131072, 29, 36, 0000000000-1-1105050167959-1193881-84114-190003749, 2929292929292929292928283979794510888-9067110-5514310292929667829292929292929 > with: -: java.lang.IllegalStateException: EJBCLIENT000027: No EJBReceiver available for node name xxxxxxx

                      at org.jboss.ejb.client.EJBClientContext.requireNodeEJBReceiver(EJBClientContext.java:616)

                      at org.jboss.ejb.client.EJBClientContext.requireNodeEJBReceiverContext(EJBClientContext.java:651)

                      at org.jboss.ejb.client.EJBClientManagedTransactionContext$ResourceImpl.prepare(EJBClientManagedTransactionContext.java:213)

                      at com.arjuna.ats.internal.jta.resources.jts.orbspecific.XAResourceRecord.prepare(XAResourceRecord.java:226) [jbossjts-4.16.4.Final-redhat-1.jar:]

                      at com.arjuna.ArjunaOTS.OTSAbstractRecordPOA._invoke(OTSAbstractRecordPOA.java:83) [jbossjts-4.16.4.Final-redhat-1.jar:]

                      at org.jacorb.poa.RequestProcessor.invokeOperation(Unknown Source) [jacorb-2.3.2-redhat-1.jar:]

                      at org.jacorb.poa.RequestProcessor.process(Unknown Source) [jacorb-2.3.2-redhat-1.jar:]

                      at org.jacorb.poa.RequestProcessor.run(Unknown Source) [jacorb-2.3.2-redhat-1.jar:]