6 Replies Latest reply: May 8, 2012 9:33 PM by 679490 RSS

    how to send msgs to tuxedo and read from tuxedousing jca adapter at jboss6

    934759
      Hi i had only Tuxedo ip and port number.i have to send messsages to tuxedo server and read from tuxedo server i did below changes at ra.xml and dmconfig.xml
      what are the services i have to use plz give me reply .Thanks in advance.

      my ra.xml is
      <?xml version="1.0" encoding="UTF-8"?>
      <connector xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
      version="1.5">
      <display-name>Tuxedo JCA Adapter</display-name>
      <vendor-name>Oracle</vendor-name>
      <eis-type>Tuxedo</eis-type>
      <resourceadapter-version>11gR1(11.1.1.2.1)</resourceadapter-version>
      <license>
      <description>Tuxedo SALT license</description>
      <license-required>false</license-required>
      </license>
      <resourceadapter>
      <resourceadapter-class>com.oracle.tuxedo.adapter.TuxedoResourceAdapter</resourceadapter-class>
      <config-property>
      <config-property-name>traceLevel</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>80000</config-property-value>
      </config-property>
      <config-property>
      <config-property-name>xaAffinity</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>true</config-property-value>
      </config-property>
      <config-property>
      <config-property-name>keyFileName</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value></config-property-value>
      </config-property>
      <config-property>
      <config-property-name>dmconfig</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>D:\jboss-6.1.0.Final\server\mpayv4_dev\deploy\dmconfig.xml</config-property-value>
      </config-property>
      <outbound-resourceadapter>
      <connection-definition>
      <managedconnectionfactory-class>com.oracle.tuxedo.adapter.spi.TuxedoManagedConnectionFactory</managedconnectionfactory-class>
      <connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>
      <connectionfactory-impl-class>com.oracle.tuxedo.adapter.cci.TuxedoConnectionFactory</connectionfactory-impl-class>
      <connection-interface>javax.resource.cci.Connection</connection-interface>
      <connection-impl-class>com.oracle.tuxedo.adapter.cci.TuxedoJCAConnection</connection-impl-class>
      </connection-definition>
      <transaction-support>NoTransaction</transaction-support>
      <authentication-mechanism>
      <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
      <credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
      </authentication-mechanism>
      <reauthentication-support>false</reauthentication-support>
      </outbound-resourceadapter>
      </resourceadapter>
      </connector>

      ==========================
      and dmconfig.xml is

      <?xml version="1.0" encoding="UTF-8"?>
      <TuxedoConnector>
      <LocalAccessPoint name="local_1">
      <AccessPointId>dev_scurtis</AccessPointId>
      <NetworkAddress>//ip:port</NetworkAddress>
      </LocalAccessPoint>
      <RemoteAccessPoint name="e1tst_tdtux01">
      <AccessPointId>e1tst_tdtux01</AccessPointId>
      <NetworkAddress>//ip:port</NetworkAddress>
      </RemoteAccessPoint>
      <Import name="TOUPPER">
      <RemoteName>TOUPPER</RemoteName>
      <SessionName>session_1</SessionName>
      <LoadBalancing>RoundRobin</LoadBalancing>
      </Import>
      <Import name="ECHO">
      <RemoteName>ECHO</RemoteName>
      <SessionName>session_1</SessionName>
      <LoadBalancing>RoundRobin</LoadBalancing>
      </Import>
      </TuxedoConnector>
        • 1. Re: how to send msgs to tuxedo and read from tuxedousing jca adapter at jboss6
          Todd Little-Oracle
          Hi,

          Based upon the dmconfig you provided, you are currently importing the TOUPPER and ECHO services, so those would be the service names you would use in your Java application.

          Regards,
          Todd Little
          Oracle Tuxedo Chief Architect
          • 2. Re: how to send msgs to tuxedo and read from tuxedousing jca adapter at jboss6
            934759
            Hi todd Thanks for your reply
            iam using below java code in jsp ,iam not getting the response plz suggest me any changes
            <%@ page import ="javax.naming.Context,
            javax.naming.InitialContext,
            javax.naming.NamingException,
            javax.ejb.CreateException,
            javax.resource.cci.ConnectionFactory,
            javax.resource.cci.Connection,
            javax.resource.cci.Interaction,
            javax.resource.cci.InteractionSpec,
            javax.resource.ResourceException,
            weblogic.wtc.jatmi.TPException,
            weblogic.wtc.jatmi.TPReplyException,
            com.oracle.tuxedo.adapter.TuxedoReplyException,
            com.oracle.tuxedo.adapter.cci.TuxedoStringRecord,
            com.oracle.tuxedo.adapter.cci.TuxedoInteractionSpec" %>
            <html>
            <head>
            </head>
            <body>

            <h1>Tuxedo Test</h1>
            <%
            System.out.println("Check Connection JNDI");
            String result="";
            result=Toupper("harikrishna");

            %>
            <%!
            public String Toupper(String string_to_convert) throws TPException, TuxedoReplyException
            {

            Context ctx;
            ConnectionFactory cf;
            Connection c;
            Interaction ix;
            TuxedoStringRecord inRec;
            TuxedoStringRecord outRec;
            TuxedoInteractionSpec ixspec;

            try {
            ctx = new InitialContext();


            cf = (ConnectionFactory)ctx.lookup("java:jca/tuxedo");
            c = cf.getConnection();
            ix = c.createInteraction();

                 ixspec = new TuxedoInteractionSpec();
                 ixspec.setFunctionName("TOUPPER");
                 ixspec.setInteractionVerb(InteractionSpec.SYNC_SEND_RECEIVE);
                 inRec = new TuxedoStringRecord();
                 outRec = new TuxedoStringRecord();
                 inRec.setRecordName("MyInputData");
                 outRec.setRecordName("MyOutputData");
                 outRec.setString(string_to_convert);
                 ix.execute(ixspec, inRec, outRec);
                 ix.close();
                 c.close();
                 String returned_data = outRec.getString();
                 return returned_data;
                 }
                 catch (NamingException ne) {
                 throw new TPException(TPException.TPESYSTEM,
                 "Could not get TuxedoConnectionFactory"+ne);
                 }
                 catch (ResourceException re) {
                 throw new TPException(TPException.TPESYSTEM,
                 "ResourceException occurred, reason: " + re);
            }
            }
            %>
            </body>
            </html>
            =======================================
            In tuxedo.lod at my jboo6/bin iam getting this informatin

            e property Security.
            4/30/12:2:59:09 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0188:INFO: Use ON_STARTUP to create default session profile property ConnectionPolicy.
            4/30/12:2:59:09 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0188:INFO: Use 60,000 to create default session profile property BlockTime.
            4/30/12:2:59:09 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0188:INFO: Use false to create default session profile property Interoperate.
            4/30/12:2:59:09 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0188:INFO: Use 60 to create default session profile property RetryInterval.
            4/30/12:2:59:09 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0188:INFO: Use 9,223,372,036,854,775,807 to create default session profile property MaxRetries.
            4/30/12:2:59:09 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0188:INFO: Use 2,147,483,647 to create default session profile property CompressionLimit.
            4/30/12:2:59:09 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0188:INFO: Use 0 to create default session profile property KeepAlive.
            4/30/12:2:59:09 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0188:INFO: Use 10,000 to create default session profile property KeepAliveWait.
            4/30/12:2:59:09 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0189:INFO: Default session profile created.
            4/30/12:2:59:09 AM:11:INFO[,]factory = null
            4/30/12:2:59:09 AM:11:INFO[,]name = TOUPPER
            4/30/12:2:59:09 AM:11:INFO[,]iname = TOUPPER
            4/30/12:2:59:09 AM:11:INFO[,]rsvc == null, create new ArrayList with key= TOUPPER
            4/30/12:2:59:09 AM:11:INFO[,]factory = null
            4/30/12:2:59:09 AM:11:INFO[,]name = ECHO
            4/30/12:2:59:09 AM:11:INFO[,]iname = ECHO
            4/30/12:2:59:09 AM:11:INFO[,]rsvc == null, create new ArrayList with key= ECHO
            4/30/12:2:59:09 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSession]TJA_0193:INFO: Default session created between LocalAccessPoint local_1 and RemoteAccessPoint e1tst_tdtux01.
            • 3. Re: how to send msgs to tuxedo and read from tuxedousing jca adapter at jboss6
              934759
              Hi iam getting below error when i run jsp is there any thing iam missing?Please suggest me

              Apr-27-2012 07:27:58 ERROR [jboss.web].[localhost].[tiaxa].[jsp] invoke.309 - Servlet.service() for servlet jsp threw
              exception: TPESYSTEM(12):0:0:TPED_MINVAL(0):QMNONE(0):0:ResourceException occurred, reason: javax.resource.ResourceException:
              TPCALL failed TPException:TPENOENT(6):0:0:TPED_MINVAL(0):QMNONE(0):0:No local or remote domain available for TOUPPER
              at org.apache.jsp.tuxedoConn_jsp.Toupper(tuxedoConn_jsp.java:65)
              at org.apache.jsp.tuxedoConn_jsp._jspService(tuxedoConn_jsp.java:123)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)
              at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)
              at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)
              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
              at java.lang.Thread.run(Thread.java:662)
              • 4. Re: how to send msgs to tuxedo and read from tuxedousing jca adapter at jboss6
                user730249
                You need to configure session "session_1" and its profile. Add the following entries in you dmconfig.xml file.

                ...
                <SessionProfile name="profile_1">
                ...
                </SessionProfile>
                <Session name="session_1">
                <LocalAccessPointName>local_1</LocalAccessPointName>
                <RemoteAccessPointName>e1tst_tdtux01</RemoteAccessPointName>
                <ProfileName>profile_1</ProfileName>
                </Session>
                ...
                • 5. Re: how to send msgs to tuxedo and read from tuxedousing jca adapter at jboss6
                  Mingliang Wang-Oracle
                  Please refer to the following configuration :

                  It will import the Tuxedo domain "TDOM1" 's service TOUPPER and VIEW32_SVC VIEW_SVC
                  And you also can find the <Resources> for view32 and view configurations

                  <?xml version="1.0" encoding="UTF-8"?><TuxedoConnector>
                  <Resources>
                  <ViewFile16Classes>com.oracle.tuxedo.qa.jca.lib.myView</ViewFile16Classes>
                  <ViewFile32Classes>com.oracle.tuxedo.qa.jca.lib.myView32</ViewFile32Classes>
                  </Resources>
                  <LocalAccessPoint name="JDOM">
                  <AccessPointId>JDOM</AccessPointId>
                  <NetworkAddress>//IP:10801</NetworkAddress>
                  </LocalAccessPoint>
                  <RemoteAccessPoint name="TDOM1">
                  <AccessPointId>TDOM1</AccessPointId>
                  <NetworkAddress>//IP:12478</NetworkAddress>
                  </RemoteAccessPoint>
                  <SessionProfile name="profile_1">
                  <CompressionLimit>1000000</CompressionLimit>
                  </SessionProfile>
                  <Session name="session_1">
                  <LocalAccessPointName>JDOM</LocalAccessPointName>
                  <RemoteAccessPointName>TDOM1</RemoteAccessPointName>
                  <ProfileName>profile_1</ProfileName>
                  </Session>
                  <Import name="TOUPPER">
                  <RemoteName>TOUPPER</RemoteName>
                  <SessionName>session_1</SessionName>
                  <LoadBalancing>RoundRobin</LoadBalancing>
                  </Import>

                  <Import name="VIEW32_SVC">
                  <RemoteName>VIEW32_SVC</RemoteName>
                  <SessionName>session_1</SessionName>
                  <LoadBalancing>RoundRobin</LoadBalancing>
                  </Import>

                  <Import name="VIEW_SVC">
                  <RemoteName>VIEW_SVC</RemoteName>
                  <SessionName>session_1</SessionName>
                  <LoadBalancing>RoundRobin</LoadBalancing>
                  </Import>
                  • 6. Re: how to send msgs to tuxedo and read from tuxedousing jca adapter at jboss6
                    679490
                    Hi,

                    From the error message and the tuxedo0.log you posted, it seem the connection is not established between JCA and tuxedo. If all are ok, below normal inforamtion should be found in tuxedo0.log and ULOG:

                    1) tuxedo0.log:

                    10/7/11:11:32:05 PM:12:INFO[TuxedoAdapterSupervisor,createDefaultSession]TJA_0193:INFO: Default session created between LocalAccessPoint 7FUEQzzlS6rsVQRDPOVLqg== and RemoteAccessPoint TDOM1.
                    10/7/11:11:32:05 PM:12:WARN[TuxedoAdapterSupervisor,registerClientSideResourceAdapter]TJA_0158:Default global imported service activated!
                    10/7/11:11:32:05 PM:51:INFO[dsession,do_connect]TJA_0130:Established connection to remote domain TDOM1.
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

                    2) ULOG:
                    233750.bej301180!simpserv.30683.3082467008.0: Welcome to the simple server
                    233752.bej301180!GWTDOMAIN.30682.3054201744.0: LIBGWT_CAT:1128: INFO: Connection accepted from domain (domainid=<7FUEQzzlS6rsVQRDPOVLqg==>)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

                    Please check and set both connection policy to ON_STARTUP, and all configurations in both dmconfig.xml and dubb. Need wait about 60 seconds if first time connection is not established.

                    BTW, please try JCA sample at first and then develop your own application in case there are some error configuration.

                    Regards,
                    Xu He