1 2 Previous Next 22 Replies Latest reply: Feb 18, 2014 5:00 AM by Fab Go to original post Branched to a new discussion. RSS
  • 15. Re: EJB invocation from a remote server instance - SaslException
    jaikiran pai Master

    Etsuji Nakai wrote:

     

    Great thanks!

     

    By following the updated document, I succeeded to use remote EJB connection with authentication.

     

    That's good to know! Thanks for trying it out.

  • 16. Re: EJB invocation from a remote server instance - SaslException
    tc7 Newbie

    Great work Jaikiran - it's a milestone for me to get this going properly.

    Thanks Etsuji - your post is helpful to know what remining changes were required to get there via the discussion above.

     

    recoverability

    Jaikiran, I did notice however that the "client" server does not recover it's connection upon the remote ejb server's restart. Is this a known issue?

     

    This is the error I get on the "client" server despite doing a fresh JNDI lookup of the remote EJB:

    java.lang.IllegalStateException: No EJB receiver available for handling [appName:MyAppCostingEngine,modulename:CostingEngine,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@781f36

     

    java.lang.IllegalStateException: No EJB receiver available for handling [appName:MyAppCostingEngine,modulename:CostingEngine,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@781f36: java.lang.IllegalStateException: No EJB receiver available for handling [appName:MyAppCostingEngine,modulename:CostingEngine,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@781f36

              at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:584) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

              at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:119) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

              at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

              at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

              at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

              at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

     

     

    The problem persists until each "client" server is restarted.

  • 17. Re: EJB invocation from a remote server instance - SaslException
    jaikiran pai Master

    tc7 wrote:

     

     

    recoverability

    Jaikiran, I did notice however that the "client" server does not recover it's connection upon the remote ejb server's restart. Is this a known issue?

     

    That was a bug which was fixed just yesterday https://community.jboss.org/message/730057#730057. Please try the latest nightly build which has this fix https://community.jboss.org/thread/167590

  • 18. Re: EJB invocation from a remote server instance - SaslException
    tc7 Newbie

    Jaikiran, that looks much better (remote ejb recoverability).

     

    I get:

    20120416 20:56:56,734 INFO  [org.jboss.ejb.client.remoting.VersionReceiver] (Remoting "myapp" task-3) Received server version 1 and marshalling strategies [river]

    20120416 20:56:56,735 INFO  [org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver] (ejb-client-remote-connection-reconnect-3-thread-2) Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@3e507ff5, receiver=Remoting connection EJB receiver [connection=Remoting connection <39f00ead>,channel=jboss.ejb,nodename=services]} on channel Channel ID d5885695 (outbound) of Remoting connection 356a8933 to staging-services/160.222.152.133:4447

    20120416 20:56:56,758 WARN  [org.jboss.ejb.client.remoting.ChannelAssociation] (Remoting "myapp" task-2) Unsupported message received with header 0xffffffff

     

    Then the subsequent request succeeds.

     

    tested in

    JBoss 7.1.2.SNAPSHOT downloaded 16-4-2012

  • 19. Re: EJB invocation from a remote server instance - SaslException
    jaikiran pai Master

    Thanks for verifying that.

  • 20. Re: EJB invocation from a remote server instance - SaslException
    fan kam thong Newbie

    From client code in Developer guide, it assumes there is only one single remoting-ejb-receiver defined in jboss-ejb-client.xml, what if I need to programmaticall invoke different server instances ? Is there any sample for this ?

     

                final Hashtable props = new Hashtable();

                // setup the ejb: namespace URL factory

                props.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");

                // create the InitialContext

                final Context context = new javax.naming.InitialContext(props);

  • 21. Re: EJB invocation from a remote server instance - SaslException
    msaad bouh Newbie

    Hello, can someone help me please, am very confused.

    I try to migrate ùy application from jboss as 5 to jboss as 7.1.1.final

     

    How i can lookup local ejb in ear :

     

    - ear

        - jar

        -sar

    i want to call local ejb in my jar from class in my sar project;

    i have added jboss-ejb-cleint.properties like this :

    remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false

    remote.connections=default

    remote.connection.default.host=localhost

    remote.connection.default.port = 4447

    remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false

     

    gettting the context :

     

    private Context getInitialContext() throws NamingException {

            if (initialContext == null) {

                Properties properties = new Properties();

                properties.put(Context.URL_PKG_PREFIXES, PKG_INTERFACES);

                //properties.put("jboss.naming.client.ejb.context", true);

                initialContext = new InitialContext(properties);

            }

            return initialContext;

        }

     

    if a lookup object i have an result : class com.sun.proxy.$Proxy16 (system.out)

    AND if i try to call an method :

     

    ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001:

    jboss.mbean.service."xxx.xxx.reference:service=ReferenceService".start: JBAS017222: Failed to execute legacy service start() method

      at org.jboss.as.service.StartStopService.start(StartStopService.java:56)

      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]

      at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

    Caused by: java.lang.reflect.InvocationTargetException

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_45]

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_45]

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]

      at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]

      at org.jboss.as.service.AbstractService.invokeLifecycleMethod(AbstractService.java:52)

      at org.jboss.as.service.StartStopService.start(StartStopService.java:54)

      ... 5 more

    Caused by: java.lang.IllegalStateException: No EJB receiver available for handling

     

    Can someone help me please.

    sorry for my english;

    thanks

  • 22. Re: EJB invocation from a remote server instance - SaslException
    Fab Newbie

    Hello.

     

    Thanks for this Tutorial.

    But what about communication between several JBoss instances, on several IPs... ?

     

    How to get this done if the architecture is composed of a certain amount of JBoss servers talking to each other through EJB calls ?

    Is there a way to set this config in the code?

     

    Thank you.

1 2 Previous Next