JBoss ejb making remote calls to BEA bean


EJB programming & troubleshooting: JBoss ejb making remote calls to BEA bean

  1. JBoss ejb making remote calls to BEA bean (6 messages)

    I have 2 ejb beans, one is deployed in BEA weblogic 8.1 and the other one is deployed in JBoss 3.2.6
    I want to modify my bean deployed in JBoss to be able to make call(s) to bean deployed in BEA.
    I am new to EJB programming, so I am not sure if it is possible to achieve this.
    Thanks for the help.

    Threaded Messages (6)

  2. Yes[ Go to top ]

    Any java process can be an EJB client, including other EJBs running in any server, as long as it can do a remote JNDI lookup and the EJB you want to call has a remote interface.

    You need to get a reference to your WL Bean using from the Weblogic JNDI tree:

    p.put("java.naming.factory.initial", "weblogic.jndi.WLInitialContextFactory");
    p.put("java.naming.provider.url", "t3://localhost:7110");

    So your JBoss bean needs wlclient.jar in its classpath, so it can create weblogic.jndi.WLInitialContextFactory and get access to the EJBs.
  3. Yes[ Go to top ]

    Thanks Adrian for the response.
    I tried to add wlclient.jar to jboss but it fails complaining of classcastexception, because it has both the namingFactories (Jboss and WebLogic).
    Where should I put my wlclient.jar to avoid this classCastException.
    My problem is if i put wlclient.jar in jboss classpath, Jboss does not loads, as it also has it's NamingFactory.

    If i do not put wlclient.jar in Jboss classpath I get following error when i try to reference Weblogic bean from Jboss Bean.

    javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotFoundException: No ClassLoaders found for: weblogic.jndi.WLInitialContextFactory]

    Thanks in advance.
  4. Yes[ Go to top ]

    Yes, it must go in the ejb classpath rather than the server classpath. To do this, include wlclient.jar in the root of the ejb jar rather than in the server lib folder.

    Hope this helps.
  5. Yes[ Go to top ]

    Thanks Adrian.
    It worked. Thanks for the help.

  6. Just wondering[ Go to top ]

    Is this common practice, putting Weblogic class files on the path of an EJB deployed in another server such as Jboss? Just curious because I am about to expereince the same issue... the group I am dealing with that manages the Weblogic server does not know what IIOP is. My thinking was that IIOP was the preferred way of using interoperability. They tell me however that their other clients using Websphere etc. connect using the t3 protocol.
  7. Hi Adrain, I am RAM. I have to do some development which is as below. Tuxedo --->FML --->WEblogic --> xml -->jboss This communication is bidirectional. i want to achieve the weblogic Jboss communication. Question: -------- Can i use MDB's for this BEA--jbOSS Communication since they dont have Remote interface ? Please tell me the good option for the same. Please help me . Thanks in Advance. Ramkumar