Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I enlist an Oracle XAResource?

enlist Oracle XAResource
0
Posted

How do I enlist an Oracle XAResource?

0

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

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.