1 2 Previous Next 26 Replies Latest reply: May 21, 2012 9:56 AM by Justin Bertram Go to original post RSS
  • 15. Re: Remote JNDI Lookup with JBOSS AS -7.1.0.Beta1
    jaikiran pai Master

    Sueleyman Vurucu wrote:

    And how I can make a lookup for a non ejb resource like a jms topic  for example ??

     

    http://community.jboss.org/message/634988#634988

     

     

     

    But is the same when I do a lookup for:

    context

                .lookup("ejb:/jboss-as-ejb-remote-app//CalculatorBean!org.jboss.as.quickstarts.ejb.remote.stateless.RemoteCalculator");

     

    Probably not the same. What does the new exception stacktrace look like?

     

    Sueleyman Vurucu wrote:

     

     

    I think my jboss-ejb-client.properties not found. Where shuold I place this for a non maven project ?

    It should be within the client classpath. The same place where you would have placed any other resource that you would want in your classpath. It all depends on how you setup the client and run it. For example, running it from the command line with be different that setting it up in the IDE.

  • 16. Re: Remote JNDI Lookup with JBOSS AS -7.1.0.Beta1
    Sueleyman Vurucu Expert

    So I'm back,

     

    One of the Problems was my libraries. I compre the maven dependencies with the git project from https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI and ajust with this. It seems that the runtime environment dosen't contain this libraries.

     

    This are the libraries below:

    jboss-ejb-client-1.0.0.Beta7.jar

    jboss-marshalling-river-1.3.0.GA.jar

    jboss-remoting-3.2.0.CR3.jar

    jboss-sasl-1.0.0.Beta6.jar

    xnio-api-3.0.0.CR4.jar

    xnio-nio-3.0.0.CR4.ja

    jboss-marshalling-1.3.0.GA.jar

    jboss-logging-3.1.0.Beta3.jar

     

    And I copy my jboss-ejb-client.properties in my source folder.

     

    When I try now a lookup with

    context.lookup("ejb:/CONTROLLER_TEST_APP/Tel100Controller!com.siemag.staless.service.Tel100ControllerRemote");

     

    then I get an exception shown below:

    2011-11-24 14:33:50,138 INFO  org.jboss.ejb.client: JBoss EJB Client version 1.0.0.Beta7

    2011-11-24 14:33:50,185 INFO  org.xnio: XNIO Version 3.0.0.CR4

    2011-11-24 14:33:50,185 INFO  org.xnio.nio: XNIO NIO Implementation Version 3.0.0.CR4

    2011-11-24 14:33:50,201 INFO  org.jboss.remoting: JBoss Remoting version 3.2.0.CR3

    2011-11-24 14:33:50,466 INFO  org.jboss.ejb.client.remoting.VersionReceiver: Received server version 1 and marshalling strategies [river, java-serial]

    2011-11-24 14:33:50,482 INFO  org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver: Successful version handshake completed for receiver context org.jboss.ejb.client.EJBReceiverContext@ca0115 on channel Channel ID d4177725 (outbound) of Remoting connection 004b035d to localhost/127.0.0.1:4447

    Exception in thread "main" javax.ejb.NoSuchEJBException: No such EJB[appname=, modulename=CONTROLLER_TEST_APP, distinctname=, beanname=Tel100Controller, viewclassname=null]

        at org.jboss.ejb.client.remoting.GeneralInvocationFailureResponseHandler.processMessage(GeneralInvocationFailureResponseHandler.java:75)

        at org.jboss.ejb.client.remoting.ChannelAssociation$ResponseReceiver.handleMessage(ChannelAssociation.java:296)

        at org.jboss.remoting3.remote.RemoteConnectionChannel$5.run(RemoteConnectionChannel.java:409)

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

        at java.lang.Thread.run(Thread.java:662)

     

    I see on server side that the client try a lookup. The output is:

    14:33:50,982 ERROR [org.jboss.remoting.remote] (Remoting "ws048059" read-1) JBREM000200: Remote connection failed: java.io.IOException: Eine vorhandene Verbindung wurde vom Remotehost geschlossen

     

    It's maybe helpful. When I deploy my app I get this output.

     

           java:global/CONTROLLER_TEST_APP/CONTROLLER_TEST/Tel100Controller!com.siemag.staless.service.Tel100ControllerRemote

           java:app/CONTROLLER_TEST/Tel100Controller!com.siemag.staless.service.Tel100ControllerRemote

           java:module/Tel100Controller!com.siemag.staless.service.Tel100ControllerRemote

           java:global/CONTROLLER_TEST_APP/CONTROLLER_TEST/Tel100Controller

           java:app/CONTROLLER_TEST/Tel100Controller

           java:module/Tel100Controller

  • 17. Re: Remote JNDI Lookup with JBOSS AS -7.1.0.Beta1
    Sueleyman Vurucu Expert

    By the way, the previous JBoss releases have in the client libs a jboss-all-client.jar. What about this approach ??

  • 18. Re: Remote JNDI Lookup with JBOSS AS -7.1.0.Beta1
    jaikiran pai Master

    Sueleyman Vurucu wrote:

     

     

    When I try now a lookup with

    context.lookup("ejb:/CONTROLLER_TEST_APP/Tel100Controller!com.siemag.staless.service.Tel100ControllerRemote");

    ...


    I see on server side that the client try a lookup. The output is:

    14:33:50,982 ERROR [org.jboss.remoting.remote] (Remoting "ws048059" read-1) JBREM000200: Remote connection failed: java.io.IOException: Eine vorhandene Verbindung wurde vom Remotehost geschlossen

     

    It's maybe helpful. When I deploy my app I get this output.

     

           java:global/CONTROLLER_TEST_APP/CONTROLLER_TEST/Tel100Controller!com.siemag.staless.service.Tel100ControllerRemote

           java:app/CONTROLLER_TEST/Tel100Controller!com.siemag.staless.service.Tel100ControllerRemote

           java:module/Tel100Controller!com.siemag.staless.service.Tel100ControllerRemote

           java:global/CONTROLLER_TEST_APP/CONTROLLER_TEST/Tel100Controller

           java:app/CONTROLLER_TEST/Tel100Controller

           java:module/Tel100Controller

    So it appears that you are deploying your EJBs in a jar within a .ear. So the JNDI name that you are using is incorrect. It should be:

     

    context.lookup("ejb:CONTROLLER_TEST_APP/CONTROLLER_TEST//Tel100Controller!com.siemag.staless.service.Tel100ControllerRemote");
    
  • 19. Re: Remote JNDI Lookup with JBOSS AS -7.1.0.Beta1
    jaikiran pai Master

    Sueleyman Vurucu wrote:

     

    By the way, the previous JBoss releases have in the client libs a jboss-all-client.jar. What about this approach ??

    That's being discussed http://lists.jboss.org/pipermail/jboss-as7-dev/2011-November/004567.html

  • 20. Re: Remote JNDI Lookup with JBOSS AS -7.1.0.Beta1
    Sueleyman Vurucu Expert

    Thanks jaikiran that was the right answer. The problem was only the slash ??

  • 21. Re: Remote JNDI Lookup with JBOSS AS -7.1.0.Beta1
    jaikiran pai Master

    Sueleyman Vurucu wrote:

     

    The problem was only the slash ??

    Not just the slash, but a combination of the slash and the missing module name (CONTROLLER_TEST).

  • 22. Re: Remote JNDI Lookup with JBOSS AS -7.1.0.Beta1
    Sueleyman Vurucu Expert

    Ok I unnderstand. I see therese a many stuff that canged with the 7.x release. Thanks a lot.

  • 23. Re: Remote JNDI Lookup with JBOSS AS -7.1.0.Beta1
    Sueleyman Vurucu Expert

    jaikiran schrieb:

     

    That's being discussed http://lists.jboss.org/pipermail/jboss-as7-dev/2011-November/004567.html

     

    So the release of 7.1 should have a client-all.jar ??

  • 24. Re: Remote JNDI Lookup with JBOSS AS -7.1.0.Beta1
    Ram J Newbie

    Hi Vurucu,

     

     

    Did you get any solution for lookup non ejb resouces remotly. For example datasources,JMS.. etc

  • 25. Re: Remote JNDI Lookup with JBOSS AS -7.1.0.Beta1
    Sueleyman Vurucu Expert

    Hi Ram J,

     

    look at this thread https://community.jboss.org/message/735877#735877. There is an attched project based on maven. Is an example how do you can do a lookup to jms or ejb. I don't try it with datasources.

  • 26. Re: Remote JNDI Lookup with JBOSS AS -7.1.0.Beta1
    Justin Bertram Master

    If you want an example of looking up JMS resources remotely see the JMS quick-start.  You shouldn't look-up JDBC datasources from remote clients as they aren't valid for that use-case.

1 2 Previous Next