GeeCON Prague 2014*
The moose likes BEA/Weblogic and the fly likes Weblogic 10 +XA Data Source Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Weblogic 10 +XA Data Source" Watch "Weblogic 10 +XA Data Source" New topic
Author

Weblogic 10 +XA Data Source

Venkat dasari
Ranch Hand

Joined: Nov 12, 2003
Posts: 67
Hi,
We use weblogic 10 and configured an XA datasource for the spring application. and i see that when i try to run a retrieve query on the application,
It says, "Cannot set auto-commit mode when using distributed transactions" though we are not doing any explicit setting to the autocommit. Does Spring or OpenJPA does this explicit set, if so, how do i override?

Any inputs?
Thanks in advance.

Regards,
Venkat Dasari


Regards,<br />Venkat Dasari<br />SCJP 1.4, SCBCD.
Fabricio Soares
Greenhorn

Joined: Jun 09, 2008
Posts: 1
Hi Venkat,

your environment realy need XA driver?
Because in XA driver, the parameter of auto-commit the default value is "false".

Regards,
Fabr´┐Żcio Soares
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"Fabricio Soares-BEA",
Please check your private messages regarding an important administrative matter.
-Ben


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
Originally posted by Venkat dasari:
Hi,
We use weblogic 10 and configured an XA datasource for the spring application. and i see that when i try to run a retrieve query on the application,
It says, "Cannot set auto-commit mode when using distributed transactions" though we are not doing any explicit setting to the autocommit. Does Spring or OpenJPA does this explicit set, if so, how do i override?

Any inputs?
Thanks in advance.

Regards,
Venkat Dasari


You problably don't have the correct XA driver loaded from classpath. XA drivers are already shipped with autocommit set to false. Check your driver packages and make sure they are XA enabled drivers.
Venkat dasari
Ranch Hand

Joined: Nov 12, 2003
Posts: 67
Hi,
Thanks for your replies. But i really need an XA driver and my kodos persistence.xml is attached as below. (I tried even using connection2properties also). And i still face the same problem. I am configuring the XA driver from weblogic console...(I am using Weblogic 10.0)

<?xml version="1.0"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="atmFrOmsJpaPersistence" transaction-type="JTA">
<jta-data-source>XA-Name</jta-data-source>
<mapping-file>atmfroms.properties</mapping-file>
<class>class....</class>
<properties>
<property name="kodo.LicenseKey" value="license.val"/>
<property name="kodo.ConnectionUsername" value="val"/>
<property name="kodo.ConnectionPassword" value="val"/>
<property name="kodo.ConnectionURL" value="jdbc racle:thin:@120.120.120.120:1521 ev1"/>
<property name="kodo.ConnectionDriverName" value="oracle.jdbc.xa.client.OracleXADataSource"/>
<property name="kodo.ConnectionFactoryProperties" value="MaxActive=20, MaxIdle=10"/>
<property name="kodo.TransactionMode" value="managed"/>
<property name="kodo.ConnectionFactoryMode" value="managed"/>
<!-- property name="kodo.DataCache" value="lru(CacheSize=5000, SoftReferenceSize=0)"/ -->
<!-- property name="kodo.Sequence" value="table(Table=KODOSEQ, Increment=100)"/ -->
</properties>

</persistence-unit>
</persistence>
 
GeeCON Prague 2014
 
subject: Weblogic 10 +XA Data Source