Using XMLink

Appendix B. New Features in XMLink

This appendix discusses the changes in XMLink.

XMLink 3.1

XMLink 3.0

Changes to Connection Factory Properties

J2C 1.5 supports the notion of resource adapter properties, in addition to connection factory properties. For XMLink 3.0, several of XMLink 2.60's connection factory properties (actually properties of ManagedConnectionFactoryImpl) were replaced with resource adapter properties. These are properties of the new ResourceAdapterImpl class.

For a current list of Connection Factory properties, refer to "Setting Properties on a Connection Factory."

No Default Setting for XMLink.tconn

The default setting for XMLink.tconn has been removed in XMLink 3.0, in favor of specifying the ConnectionType connection factory property. However, support is still available for setting this property either in the JVM or on the command line.

If XMLink.tconn is used, the native library is loaded when Tuxedo.class is loaded. Otherwise, using ConnectionType, the resource adapter is loaded only when it is started by the J2EE Application Server. For WebSphere 6, the administrative console does not let the user control starting and stopping the resource adapter, but some J2EE Application Servers support that.

Also, in the non-managed environment, ResourceAdapter.start is not called, so XMLink.tconn must be used.

Improved XML support

XMLink 3.0 contains improved XML support:

XMLink 2.6

The features for XMLink 2.6 include:

Embedded FML

Using the new addIn method on FML32Record allows you to create embedded FML for Oracle Tuxedo versions 7.1 and higher which contain support for this feature:

	public void addIn(String name, FML32Record value)

Character Encoding Support

Java strings are in Unicode. By default, XMLink passes to Tuxedo only the low order byte of each Unicode character. For characters in English and other European languages, this is sufficient since only the low order byte is significant.

Since other languages may need additional support, each of XMLink's Record classes offers setEncoding() and getEncoding() methods. The default encoding is ISO-8859-1, which is a single byte per character encoding. A multibyte encoding, such as UTF8, can be used for foreign characters. The Tuxedo server must be able to support and decode/encode according to the specified encoding setting.

XMLink 2.1

For XMLink 2.1, a new Resource Adapter archive was added for use specifically with Tuxedo 6.5, Tconn6.rar.

XMLink 2.0

JNDI Lookup

For XMLink version 1.1, the documentation contained the following code to demonstrate a connection to a Java client:

ManagedConnectionFactoryImpl mcf =
new ManagedConnectionFactoryImpl();

javax.resource.ConnectionFactory cxf =

// get a connection
javax.resource.Connection cx = cxf.getConnection();

In XMLink 2.0, it is recommended to change the code as follows to incorporate the changes made for JNDI lookups:

// get an initial JNDI naming context
javax.naming.Context initctx = new InitialContext();

// do JNDI lookup to get connection factory
// note that lookup doesn't return a ConnectionFactory,
// so a cast is needed
javax.resource.ConnectionFactory cxf =

// get a connection
Connection cx = cxf.getConnection();

Installation Issues

XMLink's directory structure has changed in version 2.0, and a Resource Adapter Archive (Tconn.rar) has been added for use with WebSphere.

Also tconnxmlout.jar is available, a WebSphere deployable JAR file which can be imported into an Enterprise Application for XML connectivity to the resource adapter from an EJB.

Setting Properties for Connections and Connection Factories

More properties are available in XMLink 2.0 for connections and connection factories which correspond to settings in an Oracle Tuxedo configuration. If you are using WebSphere, you can set those properties in the WebSphere Administrative Console. For an explanation of the each property, refer to Oracle Tuxedo documentation.

Deploying in a Non-managed Environment

To facilitate deployment in a non-managed environment, a new class was added, TConnTool. The class supports a set of methods that can be used to build a customized deployment tool. It also includes a main() that supports a rudimentary command line interface. For more information, see "Deploying in a Non-managed Environment."