3 Replies Latest reply: Jul 16, 2014 4:31 PM by Todd Little-Oracle RSS

    Hi ,  I need to Communicate with Tuxedo Server ,we are using Jboss6 App server .Please Suggest me How to approach to send Transactions to tuxedo server from My Jboss App server

    af343e74-a2db-4443-a413-cb2c87fcae63

      Hi ,

       

      I need to Communicate with Tuxedo Server ,we are using Jboss6 App server .Please Suggest me How to approach to send Transactions to tuxedo server from My Jboss App server


      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>/apps/jboss/jboss-6.1.0.Final/server/mpay5/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>

      ----------------

      my java file is

      ------------

      /* ____________________________________________________________________________

        File Name   *   ClientTuxedo.java

        Year        *   Aug 25, 2009

        Abstract    *   This page is for ValidateLogin.

        @copyright ONPL

      ___________________________________________________________________________ */

       

      my dm cinfig file is

      ------------------

      <?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>//172.28.62.10:17800</NetworkAddress>

      </LocalAccessPoint>

      <RemoteAccessPoint name="TDOM1">

      <AccessPointId>TDOM1</AccessPointId>

      <NetworkAddress>//10.10.132.105:5562</NetworkAddress>

      </RemoteAccessPoint>

      <SessionProfile name="profile_1">

      <ConnectionPolicy>ON_STARTUP</ConnectionPolicy>

      <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>

      </TuxedoConnector>

      ----------------

      my tuxedo-ds file is

      -----------------------

      <!DOCTYPE connection-factories PUBLIC

                "-//JBoss//DTD JBOSS JCA Config 1.5//EN"

                "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">

      <!--   Oracle Tuxedo Adapter Configuration  -->

      <connection-factories>

          <no-tx-connection-factory>

              <jndi-name>jca/tuxedo</jndi-name>

              <rar-name>tuxedoadapter.rar</rar-name>

              <connection-definition>

                   javax.resource.cci.ConnectionFactory

              </connection-definition>

          </no-tx-connection-factory>

      </connection-factories>

      ------------------------------

      ---------------------

       

      package com.tiaxa.tiaxaservices.services;

       

       

      import javax.naming.Context;

      import javax.naming.InitialContext;

      import javax.naming.NamingException;

      import javax.ejb.CreateException;

      import javax.resource.cci.ConnectionFactory;

      import javax.resource.cci.Connection;

      import javax.resource.cci.Interaction;

      import javax.resource.cci.InteractionSpec;

      //import javax.resource.cci.Interactionspec;

      import javax.resource.ResourceException;

      import weblogic.wtc.jatmi.TPException;

      import weblogic.wtc.jatmi.TPReplyException;

      import com.oracle.tuxedo.adapter.TuxedoReplyException;

      import com.oracle.tuxedo.adapter.cci.TuxedoStringRecord;

      import com.oracle.tuxedo.adapter.cci.TuxedoInteractionSpec;

       

       

      public class ClientTuxedo {

       

       

        /**

        * This method is used to upper the string

        *

        * @param String string_to_convert

        * @return string

        */

       

       

      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();

       

       

        System.out.println("before lookup for connection factory");

       

       

        cf = (ConnectionFactory) ctx.lookup("java:jca/tuxedo");

        c = cf.getConnection();

        ix = c.createInteraction();

      System.out.println("Connection ************"+c);

        System.out.println("after lookup for connection factory");

        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();

        System.out.println("Connection *****After*******"+c+"**outRec.getString()***"+outRec.getString());

        String returned_data = outRec.getString();

        return returned_data;

        }

        catch (NamingException ne) {

        throw new TPException(TPException.TPESYSTEM,

        "Could not get TuxedoConnectionFactory");

        }

        catch (ResourceException re) {

        throw new TPException(TPException.TPESYSTEM,

        "ResourceException occurred, reason: " + re);

          }

      }

       

       

      }

      ------------------------

      when iam calling TOUPPER method

       

      my tuxedo log is updated with

       

       

       

       

       

      7/9/14:1:31:04 AM:11:INFO[TuxedoAdapterSupervisor,registerResourceAdapter]TJA_0220:Tuxedo JCA Adapter, release 11gR1(11.1.1.2.1), resource archive version 1.1.0.0, build date: October 29 2010.

      7/9/14:1:31:04 AM:11:INFO[TuxedoAdapterSupervisor,initEncryptionService]TJA_0105:No key file configured for Tuxedo JCA Adapter.

      7/9/14:1:31:04 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0188:INFO: Use Local to create default session profile property CredentialPolicy.

      7/9/14:1:31:04 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0188:INFO: Use 0 to create default session profile property MinEncryptBits.

      7/9/14:1:31:04 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0188:INFO: Use 128 to create default session profile property MaxEncryptBits.

      7/9/14:1:31:04 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0188:INFO: Use NONE to create default session profile property Security.

      7/9/14:1:31:04 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0188:INFO: Use ON_STARTUP to create default session profile property ConnectionPolicy.

      7/9/14:1:31:04 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0188:INFO: Use 60,000 to create default session profile property BlockTime.

      7/9/14:1:31:04 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0188:INFO: Use false to create default session profile property Interoperate.

      7/9/14:1:31:04 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0188:INFO: Use 60 to create default session profile property RetryInterval.

      7/9/14:1:31:04 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0188:INFO: Use 9,223,372,036,854,775,807 to create default session profile property MaxRetries.

      7/9/14:1:31:04 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0188:INFO: Use 2,147,483,647 to create default session profile property CompressionLimit.

      7/9/14:1:31:04 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0188:INFO: Use 0 to create default session profile property KeepAlive.

      7/9/14:1:31:04 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0188:INFO: Use 10,000 to create default session profile property KeepAliveWait.

      7/9/14:1:31:04 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSessionProfile]TJA_0189:INFO: Default session profile created.

      7/9/14:1:31:04 AM:11:INFO[TuxedoAdapterSupervisor,createDefaultSession]TJA_0193:INFO: Default session created between LocalAccessPoint JDOM and RemoteAccessPoint TDOM.

      7/9/14:1:31:04 AM:11:INFO[,]factory = null

      7/9/14:1:31:04 AM:11:INFO[,]name    = *

       

      ----------------------

      and iam getting error in jboss log like

       

       

       

      Jul-09-2014 02:49:10 INFO  STDOUT write.71  - after lookup for connection factory

      Jul-09-2014 02:49:10 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 com.tiaxa.tiaxaservices.services.ClientTuxedo.Toupper(ClientTuxedo.java:74)

              at org.apache.jsp.clientTuxedo_jsp._jspService(clientTuxedo_jsp.java:63)

              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

              --------------------

              Jul-09-2014 02:49:10 INFO  org.jboss.resource.connectionmanager.CachedConnectionManager closeConnection.520  - Closing a connection for you.  Please close them yourself: com.oracle.tuxedo.adapter.cci.TuxedoJCAConnection@cb70f0: java.lang.Throwable: STACKTRACE

               at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:278)

               at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:524)

               at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)

               at com.oracle.tuxedo.adapter.cci.TuxedoConnectionFactory.getConnection(TuxedoConnectionFactory.java:239)

               at com.tiaxa.tiaxaservices.services.ClientTuxedo.Toupper(ClientTuxedo.java:50)

              at org.apache.jsp.clientTuxedo_jsp._jspService(clientTuxedo_jsp.java:63)

       

      what is the solution .and where can i find ulog file.

       

       

       

      thanks in advance