How do I enlist an Oracle XAResource?
A. This code will only work on the server side. It cannot be run in a client. Also note that enlistment is generally done transparently for JDBC resources that implement XAResource. // Here is the XAResource for oracle String URL = “jdbc:oracle:thin:@DbmsHost:DbmsPort:DbmsName”; DriverManager.registerDriver(new OracleDriver());// Create XA Connection OracleXADataSource oxds1 = new OracleXADataSource(); oxds1.setURL(URL); oxds1.setUser(“scott”); oxds1.setPassword(“tiger”); javax.sql.XAConnection pc1 = oxds1.getXAConnection(); m_oracleResource = pc1.getXAResource ();m_oracleConnection = pc1.getConnection();// Here is the source code for getting the TM. Context ctx = null; Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, “weblogic.jndi.WLInitialContextFactory”); // Parameters for the WebLogic Server. // Substitute the correct hostname, port number // user name, and password for your environment: env.put(Context.PROVIDER_URL, “t3://localhost:7001”); env.put(Context