• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Weblogic 10 +XA Data Source

 
Venkat dasari
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Fabricio Soares
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Fabricio Soares-BEA",
Please check your private messages regarding an important administrative matter.
-Ben
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic