Service Registry 3 2005Q4 Developer's Guide

Looking Up a Connection Factory

A JAXR provider can supply one or more preconfigured connection factories for use in J2EE applications. To obtain these factories, clients look them up using the Java Naming and Directory Interface (JNDI) API.

To use JAXR in a deployed J2EE application, you use a connection factory supplied by the JAXR Resource Adapter (RA). To access the connection factory, you need to use a connector resource whose JNDI name is eis/MYSOAR. The Registry configuration process creates this resource. To look up the connection factory in a J2EE component, use code like the following:

import javax.xml.registry.*;
import javax.naming.*;
...
    Context context = new InitialContext();
    ConnectionFactory connFactory = (ConnectionFactory)
         context.lookup("java:comp/env/eis/MYSOAR");