JCA Tuxedo Adapter with jboss
910188Jan 23 2012 — edited Feb 6 2012hi, i need some help to configure the jca tuxedo adapter in jboss application server.
i downloaded the rar file
modify ra.xml , i used com.oracle.tuxedo.adapter.TuxedoFBCResourceAdapter as a resource adapter, and in this file i configured my remote access to the tuxedo serv.
the ra.xml
<?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.TuxedoFBCResourceAdapter</resourceadapter-class>
<outbound-resourceadapter>
<connection-definition>
<managedconnectionfactory-class>com.oracle.tuxedo.adapter.spi.TuxedoFBCManagedConnectionFactory</managedconnectionfactory-class>
<config-property>
<config-property-name>dmconfig</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>/opt/jboss-5.1.0/server/default/deploy/dmconfig.xml</config-property-value>
</config-property>
<config-property>
<description>factory-wise AUTOTRAN setting, default to false, overrides adapter-wise setting</description>
<config-property-name>autoTran</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
</config-property>
<config-property>
<description>factory-wise Failure Reply Exception setting, default to true, overrides adapter-wise setting</description>
<config-property-name>throwFailureReplyException</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
</config-property>
<config-property>
<description>factory-wise application managed transaction or AUTOTRAN time out, overrides adapter-wise setting</description>
<config-property-name>appManagedLocalTxTimeout</config-property-name>
<config-property-type>java.lang.Integer</config-property-type>
</config-property>
<config-property>
<description>connection factory or pool name, this is required if XA or local application managed
transaction is required</description>
<config-property-name>connectionFactoryName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<description>application password in either clear text or cipher text using com.oracle.tuxedo.tools.EncryptPassword tool</description>
<config-property-name>applicationPassword</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<description>local access point specification of the format //hostname:port/domainId=DOMAINID</description>
<config-property-name>localAccessPointSpec</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<description>factory-wise SSL to configure whether mutual authentication is required, default to false</description>
<config-property-name>mutualAuthenticationRequired</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
</config-property>
<config-property>
<description>factory-wise SSL for configuring identity key store file name, must be configured if SSL is desired</description>
<config-property-name>identityKeyStoreFileName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<description>factory-wise SSL setting for private key alias used in the key store, must be configured if SSL is desired</description>
<config-property-name>privateKeyAlias</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<description>factory-wise trusted key store file name, must be configured if SSL is desired</description>
<config-property-name>trustedKeyStoreFileName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<description>factory-wise password for identityKeyStore in clear text</description>
<config-property-name>identityKeyStorePassPhrase</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<description>factory-wise password for privateKeyAlias in clear text</description>
<config-property-name>privateKeyAliasPassPhrase</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<description>factory-wise password for trustedKeyStore in clear text</description>
<config-property-name>trustedKeyStorePassPhrase</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<description>factory-wise RemoteAccessPoint specification of the format //hostname:port/domainId=DOMAINID</description>
<config-property-name>remoteAccessPointSpec</config-property-name>
<config-property-type>java.lang.String</config-property-type>
**<config-property-value>//192.168.1.111:2222</config-property-value>**
</config-property>
<config-property>
<description>factory-wise allow anonymous access to Tuxedo, default to false</description>
<config-property-name>rapAllowAnonymous</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
</config-property>
<config-property>
<description>factory-wise application key value for anonymous user, default to -1</description>
<config-property-name>rapDefaultApplicationKey</config-property-name>
<config-property-type>java.lang.Integer</config-property-type>
</config-property>
<config-property>
<description>factory-wise application key fully qualified class name for AppKey generator</description>
<config-property-name>rapApplicationKeyClass</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<description>factory-wise custom application key parameter</description>
<config-property-name>rapApplicationKeyClassParam</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<description>factory-wise session profile block timeout value, default to 60000 milliseconds</description>
<config-property-name>spBlockTime</config-property-name>
<config-property-type>java.lang.Integer</config-property-type>
</config-property>
<config-property>
<description>factory-wise whether allows interoperate with 6.5 Tuxedo Domain, default to false</description>
<config-property-name>spInteroperate</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
</config-property>
<config-property>
<description>factory-wise security setting, legal values: NONE, DM_PW, APP_PW</description>
<config-property-name>spSecurity</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<description>factory-wise credential propagation policy, either LOCAL or GLOBAL</description>
<config-property-name>spCredentialPolicy</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<description>factory-wise number of seconds that session waits between automatic connection establishment,
default to 60 seconds. A value of 0 disabled connection retry</description>
<config-property-name>spRetryInterval</config-property-name>
<config-property-type>java.lang.Long</config-property-type>
</config-property>
<config-property>
<description>factory-wise maximum number of times adapter will try to establish a session connection to
remote Tuxedo access point. Default value is Long.MAX_VALUE.</description>
<config-property-name>spMaxRetries</config-property-name>
<config-property-type>java.lang.Long</config-property-type>
</config-property>
<config-property>
<description>factory-wise compression threshold, default to Integer.MAX_VALUE</description>
<config-property-name>spCompressionLimit</config-property-name>
<config-property-type>java.lang.Integer</config-property-type>
</config-property>
<config-property>
<description>factory-wise minimum encryption strength requirement, legal values are 0, 40, 56, 128, 256.
Default value is 0.</description>
<config-property-name>spMinEncryptBits</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<description>factory-wise maximum encryption strength requirement, legal values are 0, 40, 56, 128, 256.
Default value is 128.</description>
<config-property-name>spMaxEncryptBits</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<description>factory-wise the maximum idle time before sending application level keep alive.
It is measured in millisecond, and roundup to seconds. Default value is 0.</description>
<config-property-name>spKeeyAlive</config-property-name>
<config-property-type>java.lang.Long</config-property-type>
</config-property>
<config-property>
<description>factory-wise how long adapter will wait for acknowledgement before adapter decides the
connection already lost. Measurement in millisecond, and its default value is 10 seconds.
A value of 0 will disable the wait, and thus will not close the connection</description>
<config-property-name>spKeepAliveWait</config-property-name>
<config-property-type>java.lang.Long</config-property-type>
</config-property>
<config-property>
<description>factory-wise valid Tuxedo service names in a comma-separated list. If not specified then
default import will be used and will grant all service request to remote Tuxedo domain</description>
<config-property-name>impResourceName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<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>
<transaction-support>LocalTransaction</transaction-support>
-->
<transaction-support>XATransaction</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>
the jboss descriptor is :
<resource-adapter>
<archive>
com.oracle.tuxedo.TuxedoAdapter.rar
</archive>
<transaction-support>
NoTransaction
</transaction-support>
<connection-definitions>
<connection-definition class-name="com.oracle.tuxedo.adapter.spi.TuxedoFBCManagedConnectionFactory"
jndi-name="eis/TuxedoConnectionFactory" enabled="true" use-java-context="false"/>
</connection-definitions>
</resource-adapter>
my java code is :
ctx = new InitialContext();
cf = (ConnectionFactory) ctx.lookup("eis/TuxedoConnectionFactory");
but the lookup always throws a NamingException.
the wls ubb conf in tuxedo is
# /WS servers
WSL ################## WSL
SRVGRP=GWSL SRVID=3010 ################## WSL
RESTART=Y GRACE=0 MAXGEN=2 ################## WSL
CLOPT="-A -o /test/WORK/tux/log/stdoutT8SBA -e /test/WORK/tux/log/stderrT8SBA -- -n //192.168.1.111:2222 -p 25700 -P 25899 -m 1 -M 50 -x 40 -K both" ################## WSL
what am i doing wrong???
thanks