1 Reply Latest reply on Nov 14, 2012 3:53 PM by Honghsi Lo-Oracle

    TUXEDO JCA Adapter - EJB Implementation problem

    915367
      We got the POJO working and we need to move to EJB module now.

      We followed: http://docs.oracle.com/cd/E35855_01/jca/docs12c/prog/jca_program.html#wp1071130
      to code and configure our EJB in a way the JCA Adapter documentation suggests:

      OurEJBClass.java

      +@Stateless(name = "OurEJBName", mappedName = "tuxedo.services.ServiceA")+
      +@Remote+
      +public class OurEJBClass implements TuxedoService {+

      +@Override+
      +public Reply service(TPServiceInformation tpsi) throws TPException, TPReplyException, RemoteException {+
      accountInquiryData = new AccountInquiryData();
      TypedFML32 receivedData = (TypedFML32)tpsi.getServiceData();
      packageDataForBusiness (receivedData);
      +... do some business here+
      TypedFML32 replyBuffer;
      replyBuffer = prepareReply();
      tpsi.setReplyBuffer(replyBuffer);
      return tpsi;
      +}+

      +... other Overrides from TuxedoService ( getEJBHome, getPrimaryKey, remove, getHandle, isIdentical), returning null;+
      +}+

      ejb-jar.xml
      +<ejb-jar xmlns = "http://java.sun.com/xml/ns/javaee"+
      version = "3.1"
      xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd">
      +<enterprise-beans>+
      +<session>+
      +<ejb-name>OurEJBName</ejb-name>+
      +<ejb-class>com.fiserv.ws.gateway.OurEJBClass</ejb-class>+
      +<home>weblogic.wtc.jatmi.TuxedoServiceHome</home>+
      +<remote>weblogic.wtc.jatmi.TuxedoService</remote>+
      +</session>+
      +</enterprise-beans>+
      +</ejb-jar>+

      dmconfig.xml
      +<Export name="ServiceA">+
      +<RemoteName>ServiceA</RemoteName>+
      +<SessionName>session_fiserv</SessionName>+
      +<Type>EJB</Type>+
      +<Source>tuxedo.services.ServiceA</Source>+
      +</Export>+

      DMCONFIG on the TUXEDO domain has ServiceA in the DM_REMOTE section.

      When the ejb gets deployed we see the following in the log:
      +<Oct 22, 2012 4:22:54 PM CDT> <Info> <EJB> <BEA-010009> <EJB deployed EJB with JNDI name tuxedo.services.ServiceA#weblogic.wtc.jatmi.TuxedoServiceHome.>+
      +<Oct 22, 2012 4:22:54 PM CDT> <Info> <EJB> <BEA-014022> <weblogic.wtc.jatmi.TuxedoServiceHome is bound with JNDI name java:module/OurEJBName!weblogic.wtc.jatmi.TuxedoServiceHome.>+
      +<Oct 22, 2012 4:22:54 PM CDT> <Info> <EJB> <BEA-014022> <weblogic.wtc.jatmi.TuxedoServiceHome is bound with JNDI name java:app/OurEJBJar/OurEJBName!weblogic.wtc.jatmi.TuxedoServiceHome.>+
      +<Oct 22, 2012 4:22:54 PM CDT> <Info> <EJB> <BEA-014022> <weblogic.wtc.jatmi.TuxedoServiceHome is bound with JNDI name java:global/OurEJBJar/ServiceA!weblogic.wtc.jatmi.TuxedoServiceHome.>+

      There are no errors or warnings while deployment.

      When ServiceA is executed from the TUXEDO Domain, we see the control coming over to weblogic server.
      But we get the NameNotFoundErrorException
      javax.naming.NameNotFoundException: Unable to resolve 'tuxedo.services.ServiceA'. Resolved 'tuxedo.services'; remaining name 'ServiceA'
      at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
      at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:252)
      at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
      at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
      at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
      at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
      at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:250)
      at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:406)
      at javax.naming.InitialContext.lookup(InitialContext.java:392)
      at com.oracle.tuxedo.adapter.tdom.InboundEJBRequest.execute(InboundEJBRequest.java:1044)
      at com.oracle.tuxedo.adapter.tja.TJATaskHandler.run(TJATaskHandler.java:34)
      at weblogic.connector.security.layer.WorkImpl.runIt(WorkImpl.java:70)
      at weblogic.connector.security.layer.WorkImpl.run(WorkImpl.java:45)
      at weblogic.connector.work.WorkRequest.run(WorkRequest.java:123)
      at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

      This is same behavior on Weblogic server and JBOSS server.
      What are we missing in the code/configuration?

      Thank you.

      Sincere Regards,
      Mrugendra