I recently swapped in the Oracle XA JDBC driver to replace the non-XA driver I had used before. Now, suddenly I get a *lot* of the following in the console output:
So, this raises two questions:
(1) Why am I getting an XAException from the connection test? What can I do to stop it? What am I doing wrong?
(2) Is there any way to filter out those "connection for ... closed" and "connection for ... refreshed" messages from the log? They would be alright if I'd put the console output to /dev/null but since I have to pipe it into a log file (nohup.out), I'm worrying that the size of those log files will grow too fast (I've already seen one nohup.out file of 2 gigs which got all sorts of red lights flashing but that was due to a WebLogic bug...).
can you provide some more information about what versions of Oracle database,WebLogic Server, oracle driver(JDBC 2.0?) you are using and the setting of ur connection pool and datasource? maybe u didnt select honor global transactions for your datasource and u changed the driver of ur connection pool, or u should delete the existing datasource and create a new one with honor global transactions to use the connection pool. It seems that the failure occurred at javax.transaction.xa.XAResource.prepare() in ur situation. By the way don't create two Tx Data Sources that point to the same connection pool. If a transaction uses two different Tx Data Sources which are both pointed to the same connection pool, you will get an XA_PROTO error when you try to access the second connection.
BEA 8.1 Certified Administrator, IBM Certified Solution Developer For XML 1.1 and Related Technologies, SCJP, SCWCD, SCBCD, SCDJWS, SCJD, SCEA,
Oracle Certified Master Java EE 5 Enterprise Architect
posted 15 years ago
I'm pretty sure I enabled global transactions but I'll post that and other configuration details tomorrow when I'm at the office again.
This is what I remember about the product versions: - WebLogic 8.1 sp3 - Oracle 9.2.x - Oracle 10.x driver, the one that comes with WLS 8.1 SP3
Originally posted by Billy Tsai: can you provide some more information about what versions of Oracle database,WebLogic Server, oracle driver(JDBC 2.0?) you are using and the setting of ur connection pool and datasource?
Ok. Here's the DataSource/ConnectionPool configs from my config.xml:
Val, that didn't work. The problem was that someone somewhere uses local transactions with the pool and when someone else creates a global transaction, it all comes to pieces...
Mark, may I ask why you use the verbose (foo=bar) format? I've only seen people use that with the OCI driver (tnsnames.ora).
Anyway, I think I figured out a solution. I switched to using WebLogic's own Oracle JDBC XA driver (weblogic.jdbcx.oracle.OracleDataSource) and set the RollbackLocalTxUponConnClose property for the connection pool to "true" (effectively causing all those local transactions to finish along with the connection being returned back to the pool.
I'll let you know whether I broke anything with that...
Originally posted by Mark Spritzler: What do you actually mean by that all the properties of the tag are name=value. Is there a specific one you are talking about. Are you talking about the part to get past our internal Firewalls?