Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

JCA Tuxedo Adapter with jboss

910188Jan 23 2012 — edited Feb 6 2012
hi, 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

Comments

Markus Flechtner

Hi,

please do not use "XE" as the container name.

It's the name of the instance (ORACLE_SID) and the name of the container database, but not the name of the container

Leave "container name" empty => you will connect to the root container CDB$ROOT

Enter "CDB$ROOT" ==> root container CDB$ROOT

Enter "XEPDB1" ==> you will connect to the PDB "XEPDB1"

HTH

Markus

Nikola Smuk

I was able to connect to EM when i leave container name empty.

But when i enter xepdb1 ( uppercase or lowercase ) i get new windows popup that says:

"https://db_server_name:5500 is requesting your username and password. The site says: “XDB”

Username:

Password:

I enter sys and sys password but can't get in EM.

Markus Flechtner

Hi,

is the PDB XEPDB1 open?

Please try "show pdbs" when connected in SQL*Plus

Regards

Markus

Haniel Burton

Hi Markus,

I'm having the same issue.

XEPDB1 is in open READ/WRITE mode.

I can login to EM Express using SYS and blank container name, but if I specify a PDB then the web browser asks for what looks like basic HTTP auth credentials.

Any thoughts?

I'm thinking some configuration or access rights are missing at the PDB level.

Thanks,
Haniel Burton

Haniel Burton

After fiddling around some more I found a work around and was able to set a specific HTTPS port for XEPDB1 by following documentation for 12c multi-tenant architecture.

Resources (In order used):

You can configure EM Express on a separate port that is specific to the PDB you're trying to access by doing the following:

  1. Connect to sqlplus as sysdba
    1. alter session set container=XEPDB1;
    2. select dbms_xdb_config.gethttpsport() from dual;
  2. If port returned is zero, then you need to manually configure an HTTPS port for the PDB
    1. exec DBMS_XDB_CONFIG.SETHTTPSPORT(5502);
  3. Allow access to EM Express from non-local address
    1. sqlplus system
    2. EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
    3. Run 2. again, but first alter your session to use xepdb1 container
  4. You should now be able to access EM Express at the new port and only see information for XEPDB1 by logging in as SYS or another privileged user.

Note: This is what worked for me, I may not have had to enable listener access at the CDB level and only at the PDB level, but it works now so I'm going to work on getting ORDS and APEX installed next.

Hope this helps!

I know it still doesn't solve the issue with entering the PDB name into the container field.

Thanks,
Haniel Burton

f7a19a6e-08cb-4f72-b579-6691a9fea0d5

Jesus always saves. Sorry I did not resist the joke. But yes, its placement solved my installation on a CentOS 7. Even after I freed the 5500 and 8080 ports on the firewall, I continued to have trouble accessing EM. But now for me it's all solved in my virutal testing machine.

Tamás Bene

By default every PDB and also the root container has its own EM listener port in Oracle XE 18c. If you don't like to access EM for every PDB on different port, then you can enable EM Global Access. It means, you will be able to specify container on EM login screen (empty string for the root container and XEPDB1 for the first container created by oracle installer).

Enter the following command into SQL Developer or SQL Plus:

DBMS_XDB_CONFIG.SETGLOBALPORTENABLED(true);

Resource:

https://docs.oracle.com/en/database/oracle/oracle-database/12.2/arpls/DBMS_XDB_CONFIG.html

1 - 7
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 5 2012
Added on Jan 23 2012
5 comments
717 views