Topic
8 replies Latest Post - ‏2013-11-12T06:16:42Z by 5CK5
Nikhiljain14
Nikhiljain14
1 Post
ACCEPTED ANSWER

Pinned topic Calling Remote Ejb on WAS liberty profile

‏2013-11-05T20:50:50Z |

 We have an J2EE web application developed using Spring that calls a remote EJB deployed on a separate Jboss Server. We are trying to deploy this web application to WAS liberty profile and having issues with connecting to the EJBs deployed on Jboss Server. We need help with what client libraries are needed and what JNDI properties I need to pass to Spring EJB config to access these remote EJBs. Our current JNDI properties for look up are

 



java
.
naming
.
factory
.
initial
=
org
.
jnp
.
interfaces
.
NamingContextFactory
java
.
naming
.
factory
.
url
.
pkgs
=
org
.
jboss
.
naming
:
org
.
jnp
.
interfaces
java
.
naming
.
provider
.
url
=
remoteserverip
:
1099
  • bkail
    bkail
    23 Posts
    ACCEPTED ANSWER

    Re: Calling Remote Ejb on WAS liberty profile

    ‏2013-11-06T15:43:53Z  in response to Nikhiljain14

    This is really more of a JBoss question (the same question applies regardless of whether your client is a Java SE program or WebSphere Liberty profile), and I don't have much experience with JBoss.  A quick Google search suggests that the information in this document might be relevant:

    https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI

    • tja
      tja
      4 Posts
      ACCEPTED ANSWER

      Re: Calling Remote Ejb on WAS liberty profile

      ‏2013-11-07T14:18:06Z  in response to bkail

      Remote EJB invocation is not part of  the Java 6 EE Web Profile and  EJB 3.1 lite  which is subset of EJB3.1 

      • bkail
        bkail
        23 Posts
        ACCEPTED ANSWER

        Re: Calling Remote Ejb on WAS liberty profile

        ‏2013-11-07T14:37:50Z  in response to tja

        It's true that Liberty implements web profile and remote EJB invocations are not part of web profile.

        That said, I don't think it matters.  It should still be possible to bundle JBoss client JARs in the application and make remote EJB calls to JBoss.

        • tja
          tja
          4 Posts
          ACCEPTED ANSWER

          Re: Calling Remote Ejb on WAS liberty profile

          ‏2013-11-07T14:53:41Z  in response to bkail

          It matters VERY much, there's no remote transport/port  in an EJB3.1 lite container,, so remote EJB's have no way to "phone home"

          • tja
            tja
            4 Posts
            ACCEPTED ANSWER

            Re: Calling Remote Ejb on WAS liberty profile

            ‏2013-11-07T15:20:31Z  in response to tja

            When i first read the initial post it I incorrectly interpreted the question, believing it to be *from" a remote EJB client to the Liberty profile, Apologies for that

            That stated, if the client is packaged in Liberty and performing a remote EJB invocation to an external server that supports RMI/IIOP, then yes it should work., but as noted previously it's something that should be investigated from the perspective of the external server

            • 5CK5
              5CK5
              6 Posts
              ACCEPTED ANSWER

              Re: Calling Remote Ejb on WAS liberty profile

              ‏2013-11-10T10:34:43Z  in response to tja

              > That stated, if the client is packaged in Liberty and performing a remote EJB invocation to an external server that supports RMI/IIOP, then yes it should work

              How this could work when Liberty profile does not support remote EJB invocation and is not supposed to?

              • tja
                tja
                4 Posts
                ACCEPTED ANSWER

                Re: Calling Remote Ejb on WAS liberty profile

                ‏2013-11-10T17:08:53Z  in response to 5CK5

                Liberty doesn't support a remote EJB client invoking an EJB deployed in Liberty.

                An Java EE client,, which can be *any* JVM , standalone client or application server as a client would include he requisite client  classes to access a remote EJB, and doesn't require Liberty support for remote EJB invocation

                EJB client  -> Liberty is not supported

                EJB client (in Liberty) -> remote server doesn't require any Liberty specific function, though the client would need to package the requisite client classes for the remote server (as does any EJB client accessing a WAS full profile server)

                 

                • 5CK5
                  5CK5
                  6 Posts
                  ACCEPTED ANSWER

                  Re: Calling Remote Ejb on WAS liberty profile

                  ‏2013-11-12T06:16:42Z  in response to tja

                  Easier said than done.

                  It is true that EJB client can be any JVM provided specific configuration steps were made (depending on the server hosting EJB). These steps often require modification of boot classpath, setting system properties and so on. Needless to say that modifications like these can easily and adversely affect operation of the application server when made to its JVM.

                  Thus I consider this only a possibility unless you provide a proof that this can be achieved in practice.