Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Weblogic 10 +XA Data Source

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Fabricio Soares-BEA",
Please check your private messages regarding an important administrative matter.
-Ben
 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic