Storing ConnectionFactory objects

You can store ConnectionFactory objects for later reuse, so that your application doesn't need to rebuild them. Inside a J2EE server environment, IBM® recommends that you register your ConnectionFactory object, which has links to your EIS connection information, in the J2EE Java™ Naming and Directory Interface (JNDI) service. This makes migration from nonmanaged to managed Java environments easier because applications can get ConnectionFactory objects in the same manner. However, this may not be possible outside a JNDI environment unless either an LDAP server, or an appropriate JNDI Service Provider, is available within your environment.

The resource adapter ConnectionFactory objects support both the serializable and referenceable Java interfaces. This means that you can choose how to register them in the JNDI. For more information, refer to the J2EE Connector Architecture Specification.

If you plan to use serializable interfaces, refer to J2EE Tracing, in the CICS® Transaction Gateway: Administration book for your operating system. This gives information on how serialization and deserialization of ConnectionFactory objects affects the setting of the LogWriter property.