EJB 3.0 and JTA (Distributed transactions)

hi, first of all sorry for my english.
then :)
i'm working with JBoss Aplication Server an Oracle DataBase using EJB 3.0
i have no problem before ... but now i want work with multiple database and i wand to manage transactions ... how i understand JTA (Java Transaction Api) is a technology for it.
i think that i need two datasource file for example oracle-xa-ds.xml and postgres-ds.xml
<datasources>
  <xa-datasource>
    <jndi-name>XAOracleDS</jndi-name>
    <track-connection-by-tx/>
    <isSameRM-override-value>false</isSameRM-override-value>    <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
    <xa-datasource-property name="URL">jdbc:oracle:thin:@192.9.200.177:1521:devnbtwo</xa-datasource-property>
    <xa-datasource-property name="User">paata</xa-datasource-property>
    <xa-datasource-property name="Password">1982226</xa-datasource-property>   <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
    <no-tx-separate-pools/>
      <metadata>
         <type-mapping>Oracle9i</type-mapping>
      </metadata>
  </xa-datasource>
  <mbean code="org.jboss.resource.adapter.jdbc.vendor.OracleXAExceptionFormatter"
         name="jboss.jca:service=OracleXAExceptionFormatter">
    <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
  </mbean>
</datasources>
<datasources>
  <local-tx-datasource>
    <jndi-name>PostgresDS</jndi-name>
   <connection-url>jdbc:postgresql://localhost:5432/Test</connection-url>
    <driver-class>org.postgresql.Driver</driver-class>
    <user-name>postgres</user-name>
    <password>1982226</password>
        <new-connection-sql>select 1</new-connection-sql>
      <metadata>
         <type-mapping>PostgreSQL 7.2</type-mapping>
      </metadata>
  </local-tx-datasource>
</datasources>and i dont know what should i do in my persistance.xml file ..... when i was working with single database my persistance.xml file was working
<?xml version="1.0" encoding="UTF-8" ?>
<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="Oracle" transaction-type="JTA">
          <jta-data-source>java:/XAOracleDS</jta-data-source>
          <class>com.magti.businesslayer.ejb3entity.Group</class>
          <class>com.magti.businesslayer.ejb3entity.Student</class>
          <properties>
               <property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect"/>
               <property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver"/>
               <property name="hibernate.connection.url" value="jdbc:oracle:thin:@192.9.200.177:1521:devnbtwo"/>
               <property name="hibernate.connection.username" value="paata"/>
               <property name="hibernate.connection.password" value="1982226"/>
               <property name="hibernate.default_schema" value="PAATA"/>
          </properties>
     </persistence-unit>     
</persistence>but then i added anothe unit for second database and i get error
     <persistence-unit name="PostgreSql" transaction-type="JTA">
          <jta-data-source>java:/PostgresDS</jta-data-source>
          <class>com.magti.businesslayer.ejb3entity.Group</class>
          <class>com.magti.businesslayer.ejb3entity.Student</class>
          <properties>
               <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
               <property name="hibernate.connection.driver_class" value="org.postgresql.Driver"/>
               <property name="hibernate.connection.url" value="jdbc:postgresql://localhost:5432/Test"/>
               <property name="hibernate.connection.username" value="postgres"/>
               <property name="hibernate.connection.password" value="1982226"/>
               <property name="hibernate.default_schema" value="postgres"/>
          </properties>
     </persistence-unit>     i don't know how i resolve it .
i can't find any simple exaplme about distributed transactions on net ...
can anybody help me ....
thanks.

Check this one:
http://www.webagesolutions.com/knowledgebase/javakb/jkb005/index.html

Similar Messages

  • Jta - distributed transactions

    hello,
    I'm working on 2 DB 9.2 databases with oc4j version 9.0.2.
    I'm trying to implement a distributed transaction using JTA.
    I found out that the commit-coordinator must be defined in the application.xml and not in the orion-application.xml, and the data source used for it should be defined in the global data-sources.xml (in the config dir), but now i'm still getting following error when i commit my transaction (on utx.commit(); )
    error in execute() : javax.transaction.SystemException: Could not commit: error code 29540- for additional error code check Oracle log file.
    What oracle log file ? what code is it giving back ? Is it a ora-... or something else ? Where can i find more info ?
    I already start the oc4j container with option
    " -Ddatasource.verbose=true -Djdbc.connection.debug=true "
    but it doesn't give me more info.
    plz help !

    Chris,
    It seems that there is no Oracle 9i version 9.2.0.4 for
    Solaris or NT ?Yes ther is. We are using Oracle 9.2.0.4 on both Solaris 7 and Solaris 9 (on SUN [sparc] computers).
    You should be able to get a patch (probably from the MetaLink Web site) that will upgrade your database from 9.2.0.1 to 9.2.04
    Good Luck,
    Avi.

  • Using ATMI and tuxedo to institue distributed transactions across multiple DBs

    I am creating the framework for a given application that needs to ensure that data
    integrity is maintained spanning multiple databases not necessarily within an
    instance of weblogic. In other words, I need to basically have 2 phase commit
    "internet transactions" between a given coordinator and n participants without
    having any real knowlegde of their internal system.
    Originally I was thinking of using Weblogic but it appears that I may need to
    have all my particular data stores registered with my weblogic instance. This
    cannot be the case as I will not have access to that information for the other
    participating sytems.
    I next thought I would write my own TP...ouch. Everytime I get through another
    iteration I kept hitting the same issue of falling into an infinite loop trying
    to ensure that my coordinator and the set of participants were each able to perform
    the directed action.
    My next attempt has led me to the world of ATMI. Would ATMI be able to help me
    here. Granted I am using JAVA so I am assuming that I would have to use CORBA
    to make the calls but will ATMI enable me to truly manage and create distributed
    transactions across multiple databases. Please, any advice at all would be greatly
    appreciated.
    Thanks
    Chris

    Andy
    I will not have multiple instances of weblogic as I cannot enfore that
    the other participants involved in the transaction have weblogic as
    their application server. That being said, I may not have the choice
    but to use WTC.
    Does this make more sense?
    Andy Piper <[email protected]> wrote in message news:<[email protected]>...
    "Chris" <[email protected]> writes:
    I am creating the framework for a given application that needs to ensure that data
    integrity is maintained spanning multiple databases not necessarily within an
    instance of weblogic. In other words, I need to basically have 2 phase commit
    "internet transactions" between a given coordinator and n participants without
    having any real knowlegde of their internal system.
    Originally I was thinking of using Weblogic but it appears that I may need to
    have all my particular data stores registered with my weblogic instance. This
    cannot be the case as I will not have access to that information for the other
    participating sytems.I don't really understand this. From 6.0 onwards you can do 2PC
    between weblogic instances, so as long as the things you are calling
    are transaction (EJBs for instance) it should all work out fine.
    I next thought I would write my own TP...ouch. Everytime I get through another
    iteration I kept hitting the same issue of falling into an infinite loop trying
    to ensure that my coordinator and the set of participants were each able to perform
    the directed action.
    My next attempt has led me to the world of ATMI. Would ATMI be able to help me
    here. Granted I am using JAVA so I am assuming that I would have to use CORBA
    to make the calls but will ATMI enable me to truly manage and create distributed
    transactions across multiple databases. Please, any advice at all would be greatly
    appreciated.I don't see that ATMI would give you anything different. Transaction
    management Tux is fairly similar to WebLogic (it was written by the
    same people). If you are trying to do interposed transactions
    (i.e. multiple co-ordinators) then WTC would give you this but it is
    only a beta feature in WLS 6.1. Using Tux domain gateways would also
    give you interposed behaviour but would require you write your servers
    in C or C++ ....
    andy

  • Distributed Transaction Coordinator not displaying remotely on a server core cluster node..

    We setup a server core single node cluster (W2012 R2).  The MS DTC is running, and the Distributed Transaction Coordinator firewall rules are enabled.  I can connect to the firewall rules and compmgmt.msc remotely for this server.  When
    I attempt to connect to the Component Services Management console with this server, the MS DTC object is not displayed.  Only the COM+ applications are displayed.   We've setup other server core instances with out clustering and DTC is displayed.

    Hi Steve,
    We just finished the local test and found this behavior is by design. It’s expected that we can’t see the DTC remotely from component services for a cluster node.
    In my lab, 2012R2 node3 is a single node cluster and has DTC role.

  • How to start and finish a transaction using EJB 3.0 in JDeveloper

    Hello everybody!
    Does anybody can explain how to start and finish a transaction using EJB 3.0. I need to start a transaction insert some information in some tables and if everything was fine commit the information.
    I put the annotation @TransactionManagement(TransactionManagementType.BEAN) in my session bean and @Resource SessionContext ejbContext; but I don't what anything else I have to do.
    Any help will be appreciate.

    I tryied to use in the client the statement EntityTransaction transaction = myBean.getTransact(); but I receive the EJBException: Cannot use resource level transactions with a container managed EntityManager
    I just need to start a transaction something like this: transaction.begin(); and finish the transaction, something like this: transaction.commit();
    Does anybody can help?

  • ORA-00164 Autonomous and Distributed Transactions in Oracle 8i - Forms6i

    Hi, in Forms6i I'm using Autonomous transactions (insert and update), and I want to use also a database link to make a query in a remote database (Distributed transaction). Even when this request are done in different PL/SQL within Forms6i, I get the error message ORA-00164 Distributed transactions disallowed within autonomous transactions. Is there a way to avoid this error message?
    Thanx

    Hello,
    I had a similar Problem, when I tried to log errormessages while selecting by db-link.
    I use pipes now to send the errormessages. The pipe is read at regular intervals and then I can Insert without using autonomous transactions.
    I hope, this will help you
    Marcus

  • Is Distributed Transaction Coordinator services of the application role are required by SQL Server 2012 for clustering and support of SharePoint 2013.

    All I want to know is if Distributed Transaction Coordinator services of the application role are required by SQL Server 2012 for clustering and support of SharePoint 2013.
    I have been planning and deploying my companies first Windows Server 2012/SQL Server 2012 Always On cluster and Always On Availability Groups Multi-Subnet cluster and instances for SharePoint 2013, and I will be brutally honest, the documentation on either
    the MSDN and TechNet leave alot to be desired. Continually finding links in the documentation will take me from a Windows 2012 reference to a page talking about Windows Server 2008 or R2, The differences of which there are so many when it comes to configurations,
    settings, roles, services when working with SQL Server 2012. I have been confused, frustrated, screaming mad, with all the misdirection in this documentation.  The documentation takes me windows 2008 R2 which is different than 2012!
    Tired and trying to pick myself up off the floor!
    Greg
    Gman

    In general, DTC is not required for SQL 2012.  But, since you are asking specifically about SharePoint, it would be better to ask in a SharePoint forum.  They would be more likely to know those situations where FTC might be needed by SharePoint. 
    .:|:.:|:. tim

  • Distributed transactions and 2-phase commit in a SAP Netweaver environment

    Hello,
    I am a Java architect., I don't know very much the SAP technologies. I tried to found on forums or technical papers if SAP does support distributed transactions and two-phase commit, it's not clear. I found something on SAP WAS but my project is using a  SAP PI 7.0 and I cannot find anything on the subject.
    My goal is to include a SAP server (via PI 7.0) in a distributed transaction handled by a J2EE ESB (Oracle, ex-BEA Aqualogic) based on XA capabilities.
    Does anyone have experience or feedback on this topic ?
    Thanks.

    Hi,
    Do you know this white paper ?
    [Distributed Transaction and 2 phase commit|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3732d690-0201-0010-a993-b92aab79701f]
    Regards,
    Olivier

  • Using Distributed Transaction with oracle 9i and VB

    How to I get distributed transaction to work between a COM + object in VB and oracle using MSDAORA.1 driver? I keep getting the following error:
    error number:
    -2147168229
    error description:
    Cannot connect to the transaction manager or the transaction manager is unavailable.

    Oracle 9i works great with VB.NET. I would recommend you to use Oracle Data Provider .NET (ODP.NET) as a database driver
    http://otn.oracle.com/tech/windows/odpnet/content.html
    for better performance and get full advantage of Oracle 9i features.
    Regards
    Jagriti
    OTN Team @IDC

  • Weblogic 5.1, Distributed Transaction and Oracle Database Link

    We are planning to add a new functionality to run in Weblogic server and it
    needs to update tables in two different Oracle databases. Since we are using
    Weblogic 5.1 and it is unrealistic to upgrade to 6.1 in short term, we have
    to deal with the fact that distributed transaction is not supported by JTS
    on 5.1.
    One workaround we can think of is to utilize Oracle database link. Instead
    of having two connection pools, the application talks to only one database
    and access the tables on the other ones through Oracle database link.
    Therefore, when a session bean tries to update two tables on database 1 in
    one transaction, one of the tables is just a link to the other database. We
    hope that even though distributed transaction is not supported by JTS in
    Weblogic 5.1, but since it is supported by Orable, it would work.
    Do you think the above workaround would work? Does anyone have experience on
    something like that?
    Thanks in advance,
    David Chen
    [email protected]

    Hi. You should be able to use any JDBC driver with WebLogic 5.1.
    It may be the JVM that complains, if you use too old a JVM...
    Joe Weinstein at BEA Systems

  • Distributed Transactions and Linked Servers

    I'm somewhat of a novice with SQL Server but I'm learning rapidly from an application I'm developing that uses SQL Server very heavily. In conjunction with the development of this application, I have 3-4 systems set up running SQL Server and I am using those
    systems to develop the database that will ultimately support the application. I decided to try to use linked servers because I am moving data back-and-forth among the different servers frequently and I ran into some consequences that I wasn't expecting.
    I was doing a simple delete query on one of the servers (Delete from TableName Where ...) and I was expecting, of course, that it would only impact the server I was running it on; however, when the query finished after running for a long time, it was apparent
    that SQL Server had automatically escalated that simple delete query into a distributed transaction and applied it to all four of the linked servers I had defined.  I was totally surprised by that and it took some time to recover the data that was inadvertently
    lost on the other servers.
    I want to ensure that this doesn't happen again without me expecting it - I think the right way to prevent this from happening is to run the following stored procedure:
    EXEC sp_serveroption 'servername', 'remote proc transaction promotion', 'false';
    Can someone please verify that this assumption is correct and will prevent SQL Server from automatically creating distributed transactions impacting multiple servers?
    Thanks,
    Chuck

    Hello,
    Based on your description, it seems that when you connect to a SQL Server database and execute a DELETE statement to delete a recode on a table, and then the same recode were delete in the linked server which has the same table.
    As pre my understand, the statement executed on one server will not  apply to the linked servers unless you specify the logic yourself in the application. For example, you use dynamic query and exec the query synchronously on  linked servers.
    What's more, did you specify replication between this linked server?
    If I have any misunderstanding, please let me know.
    Regards,
    Fanny Liu
    If you have any feedback on our support, please click here.
    Fanny Liu
    TechNet Community Support

  • Distributed transactions and connection pooling

    Hi,
    We have a problem with the enlistment of connections in distributed transactions.
    The following very simple C# program does not work correctly (a simple form with one button and a class hosted in COM+). If you put a breakpoint on "cnOraTx.Close();" you will see that the inserted record is already visible in the database although the transaction has not commited yet.
    If you comment out the lines between //START and //END everything works as expected.
    Also, if we use "Pooling=false" in the connection string, everything works fine again, but since we are writing a web application, we really need the connection pooling.
    We are using ODP.NET 9.2.0.2.102 (I also tried with the ODP.NET 9.2.0.4.0 BETA) and an oracle 8.1.7 database.
    Best Regards,
    Piet
    private void button1_Click(object sender, System.EventArgs e)
    //When commenting the following lines the connection is enlisted in the distributed transaction
    //START
    OracleConnection cnOraTx;
    cnOraTx = new Oracle.DataAccess.Client.OracleConnection("Data Source=ECOMP532;User ID=USER;Password=PWD");
    cnOraTx.Open();
    cnOraTx.Close();
    cnOraTx.Dispose();
    //END
    OpenOraTransConn obj = new OpenOraTransConn();
    obj.Connect();
    //This class is going to be hosted within COM+
    [Transaction(TransactionOption.Required)]
    public class OpenOraTransConn: ServicedComponent
    private OracleConnection cnOraTx;
    private OracleCommand cmd;
    internal void Connect()
    cnOraTx = new OracleConnection("Data Source=ECOMP532;User ID=USER;Password=PWD");          
    cnOraTx.Open();
    cmd = new OracleCommand();
    cmd.Connection = cnOraTx;
    cmd.CommandText = "INSERT INTO SYSADM.PERSON (PE_KEY) VALUES(130000)";
    cmd.ExecuteNonQuery();
    cnOraTx.Close();
    cnOraTx.Dispose();
    ContextUtil.SetComplete();

    Hello:
    We are experiencing the exact same problem. INSERT, UPDATE or DELETE statements that should roll back because an exception is being thrown from inside our ServicedComponent-derived class (which is set to TransactionOption.Required and uses AutoComplete) are not -- and instead are being committed to the database.
    Were you able to figure out why this is happening, and what can be done to get around it? We too were able to avoid the problem by setting Pooling=False to our connect string, but for a variety of reasons we want to use connection pooling ...!

  • Distributed Transactions HA and DR

    We have a few SQL Server environments besides Biztalk and its speciall HA and DR configuration(SQL Server failover cluster and Biztalk Log Shipping) that use distributed transactions. Is there a HA or DR solution that supports distributed transactions
    other than failover clustering? I am aware that database mirroring is not supported for distributed transactions. How about log shipping or replication? Is there any official documentation on this?
    Thank you in advance

    Hello,
    As Shanky post, there is limitation of distributed transactions when using database mirroring or log shipping. When using Microsoft Distributed Transaction Coordinator (MSDTC) transactions, the local transaction coordinator has a resource ID that identifies
    the server on which it is running. When a mirroring or log shipping failover occurs, the principal database becomes hosted on a different server (the mirroring partner or secondary server), and so the resource ID of the transaction coordinator is different.
    Regards,
    Fanny Liu
    If you have any feedback on our support, please click here.
    Fanny Liu
    TechNet Community Support

  • Need basic primer on distributed transactions and java

    Hello,
              I am new to distributed transactions in Java...
              I am wondering if there is useful link that will
              explain the basics....
              How is it supported in J2EE, etc.?
              How is it supported in WLS?
              How does 2-phase commit work, etc.?
              Thanks,
              Jason
              

    Hi,
              I fond the following a good clear, concise (non vendor specific) intro to
              transactions.
              http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Transaction.html
              Cheers,
              SB
              "Jason Rosenberg" <[email protected]> wrote in message
              news:3eba8128$[email protected]..
              > Hello,
              >
              > I am new to distributed transactions in Java...
              >
              > I am wondering if there is useful link that will
              > explain the basics....
              >
              > How is it supported in J2EE, etc.?
              > How is it supported in WLS?
              > How does 2-phase commit work, etc.?
              >
              > Thanks,
              >
              > Jason
              >
              >
              

  • "in-doubt distributed transaction" (WLS 8.1 SP2/Oracle 9.2.0.4)

              I've developed an MDB that reads a message from a queue, performs database updates
              against up to 2 databases, and sends an outgoing JMS message when all is complete.
              The MDB uses container-managed transactions to ensure that all DB updates and
              JMS messages are committed or rolled back together. I have had a lot of problems
              related to transactions failing, becoming "in-doubt" in the database and locking
              database resources indefinitely.
              My environment is configured as follows:
              WebLogic 8.1.2 Server
              Oracle 9.2.0.4 database with RAC
              XA Connection Pool with WebLogic Type 2 Oracle Driver OR Oracle 9.2.0.4
              OCI Driver
              I have read the BEA/HP white paper regarding Weblogic 8.1 with Oracle 9i RAC (http://dev2dev.bea.com/products/wlserver81/whitepapers/wls_bea_hp.jsp)
              and have tried all of the solutions suggested in that paper. The only solution
              that worked consistently without causing the in-doubt transactions was to change
              my connection pools to point directly to a single node of the RAC cluster, not
              to the shared instance. However, even with this configuration, I have seen these
              errors occur when certain database failures occur.
              A side-effect of this problem is that the associated WebLogic connection pools
              begin to "forget" connections. The pool thinks that all of the connections are
              in use (even though I am always calling Statement.close() and Connection.close()),
              and the connection pool cannot be reset manually. The only way to clear the connection
              pool is to bounce WebLogic.
              The only posts I have found related to this error were regarding Oracle 8.1.7
              and WebLogic 6.1. Any help would be greatly appreciated.
              Exceptions:
              <Mar 23, 2004 2:59:36 PM EST> <Error> <EJB> <BEA-010026> <Exception occurred during
              commit of transaction Xid=BEA1-0526A28664707F28EDB9(6412513),Status=Rolled back.
              [Reason=javax.transaction.xa.XAException
              : prepare failed for XAResource 'ProfilingPool' with error XAER_NOTA : The XID
              is not valid],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=2,seconds
              left=60,XAServerResourceInfo[JMS_my
              JmsStore]=(ServerResourceInfo[JMS_myJmsStore]=(state=rolledback,assigned=myserver),xar=JMS_myJmsStore),XAServerResourceInfo[ProfilingPool]=(ServerResourceInfo[ProfilingPool]=(state=rolledback,ass
              igned=myserver),xar=ProfilingPool),SCInfo[mydomain+myserver]=(state=rolledback),local
              properties=({}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=myserver+10.41.0.61:7001+m
              ydomain+t3+, XAResources={JMS_myJmsStore, JMS_FileStore, ProfilingPool, SearchManagementPool,
              AnnouncementsTxPool},NonXAResources={})],CoordinatorURL=myserver+10.41.0.61:7001+mydomain+t3+):
              javax.tran
              saction.xa.XAException: prepare failed for XAResource 'ProfilingPool' with error
              XAER_NOTA : The XID is not valid
              at weblogic.jdbc.oci.xa.XA.createException(XA.java:386)
              at weblogic.jdbc.oci.xa.XADataSource.internalPrepare(XADataSource.java:905)
              at weblogic.jdbc.oci.xa.XADataSource.prepare(XADataSource.java:885)
              at weblogic.jdbc.jta.DataSource.prepare(DataSource.java:846)
              at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:1167)
              at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:401)
              at weblogic.transaction.internal.ServerSCInfo$1.execute(ServerSCInfo.java:253)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              --------------- nested within: ------------------
              weblogic.transaction.RollbackException: Could not prepare resource 'ProfilingPool
              prepare failed for XAResource 'ProfilingPool' with error XAER_NOTA : The XID is
              not valid - with nested exception:
              [javax.transaction.xa.XAException: prepare failed for XAResource 'ProfilingPool'
              with error XAER_NOTA : The XID is not valid]
              at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1644)
              at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:300)
              at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
              at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
              at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
              at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
              at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
              at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              2004-03-23 15:00:45,406 ERROR IS003989 [ExecuteThread: '17' for queue: 'ProfileCompleteListenerBean.ExecuteQueue']
              my.package.search.business.ProfiledHoldingDAO.setProfilingStatus(ProfiledHoldingDAO.java:350
              ) - Failed to update profiling status for holding 10014 [] (-2)
              java.sql.SQLException: ORA-02049: timeout: distributed transaction waiting for
              lock
              at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:282)
              at weblogic.jdbc.oci.PreparedStatement.executeUpdate(PreparedStatement.java:226)
              at weblogic.jdbc.oci.xa.PreparedStatement.executeUpdate(PreparedStatement.java:81)
              at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:94)
              at my.package.search.business.ProfiledHoldingDAO.setProfilingStatus(ProfiledHoldingDAO.java:345)
              at my.package.search.business.ProfilingManager.disseminateAndAcknowledge(ProfilingManager.java:254)
              at my.package.search.business.ProfileCompleteListenerBean.onMessage(ProfileCompleteListenerBean.java:128)
              at weblogic.ejb20.internal.MDListener.execute(MDListener.java:382)
              at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
              at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
              at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
              at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              2004-03-23 15:01:43,093 ERROR IS003989 [ExecuteThread: '18' for queue: 'HoldingStatusListenerBean.ExecuteQueue']
              my.package.search.business.ProfiledHoldingDAO.getProfilingStatus(ProfiledHoldingDAO.java:265)
              - Failed to retrieve profiling results for holding 10060 [] (-2)
              java.sql.SQLException: ORA-01591: lock held by in-doubt distributed transaction
              189.47.12
              at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:282)
              at weblogic.jdbc.oci.PreparedStatement.executeQuery(PreparedStatement.java:152)
              at weblogic.jdbc.oci.xa.PreparedStatement.executeQuery(PreparedStatement.java:48)
              at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:80)
              at my.package.search.business.ProfiledHoldingDAO.getProfilingStatus(ProfiledHoldingDAO.java:256)
              at my.package.search.business.ProfiledHoldingDAO.storeHoldingMetadata(ProfiledHoldingDAO.java:489)
              at my.package.search.business.ProfiledHoldingDAO.storeNewHolding(ProfiledHoldingDAO.java:406)
              at my.package.search.business.ProfilingManager.profileHolding(ProfilingManager.java:128)
              at my.package.search.business.HoldingStatusListenerBean.onMessage(HoldingStatusListenerBean.java:121)
              at weblogic.ejb20.internal.MDListener.execute(MDListener.java:382)
              at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
              at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
              at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
              at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              

    Hi. There is a serious bug in the Oracle DBMS (all versions) where in-doubt
              transactions have their data locked in the DBMS by page rather than by row,
              so it will indefinitely prevent access to all data on the page, including
              logically uninvolved data. Oracle understands the problem but currently
              says they will never fix it (it would take too much work). They offer the
              alternative that you configure your table data to ensure that no more than
              one datarow resides on a page.
              Joe
              Matt Smith wrote:
              > I've developed an MDB that reads a message from a queue, performs database updates
              > against up to 2 databases, and sends an outgoing JMS message when all is complete.
              > The MDB uses container-managed transactions to ensure that all DB updates and
              > JMS messages are committed or rolled back together. I have had a lot of problems
              > related to transactions failing, becoming "in-doubt" in the database and locking
              > database resources indefinitely.
              >
              > My environment is configured as follows:
              > WebLogic 8.1.2 Server
              > Oracle 9.2.0.4 database with RAC
              > XA Connection Pool with WebLogic Type 2 Oracle Driver OR Oracle 9.2.0.4
              > OCI Driver
              >
              > I have read the BEA/HP white paper regarding Weblogic 8.1 with Oracle 9i RAC (http://dev2dev.bea.com/products/wlserver81/whitepapers/wls_bea_hp.jsp)
              > and have tried all of the solutions suggested in that paper. The only solution
              > that worked consistently without causing the in-doubt transactions was to change
              > my connection pools to point directly to a single node of the RAC cluster, not
              > to the shared instance. However, even with this configuration, I have seen these
              > errors occur when certain database failures occur.
              >
              > A side-effect of this problem is that the associated WebLogic connection pools
              > begin to "forget" connections. The pool thinks that all of the connections are
              > in use (even though I am always calling Statement.close() and Connection.close()),
              > and the connection pool cannot be reset manually. The only way to clear the connection
              > pool is to bounce WebLogic.
              >
              > The only posts I have found related to this error were regarding Oracle 8.1.7
              > and WebLogic 6.1. Any help would be greatly appreciated.
              >
              > Exceptions:
              > -----------------
              > <Mar 23, 2004 2:59:36 PM EST> <Error> <EJB> <BEA-010026> <Exception occurred during
              > commit of transaction Xid=BEA1-0526A28664707F28EDB9(6412513),Status=Rolled back.
              > [Reason=javax.transaction.xa.XAException
              > : prepare failed for XAResource 'ProfilingPool' with error XAER_NOTA : The XID
              > is not valid],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=2,seconds
              > left=60,XAServerResourceInfo[JMS_my
              > JmsStore]=(ServerResourceInfo[JMS_myJmsStore]=(state=rolledback,assigned=myserver),xar=JMS_myJmsStore),XAServerResourceInfo[ProfilingPool]=(ServerResourceInfo[ProfilingPool]=(state=rolledback,ass
              > igned=myserver),xar=ProfilingPool),SCInfo[mydomain+myserver]=(state=rolledback),local
              > properties=({}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=myserver+10.41.0.61:7001+m
              > ydomain+t3+, XAResources={JMS_myJmsStore, JMS_FileStore, ProfilingPool, SearchManagementPool,
              > AnnouncementsTxPool},NonXAResources={})],CoordinatorURL=myserver+10.41.0.61:7001+mydomain+t3+):
              > javax.tran
              > saction.xa.XAException: prepare failed for XAResource 'ProfilingPool' with error
              > XAER_NOTA : The XID is not valid
              > at weblogic.jdbc.oci.xa.XA.createException(XA.java:386)
              > at weblogic.jdbc.oci.xa.XADataSource.internalPrepare(XADataSource.java:905)
              > at weblogic.jdbc.oci.xa.XADataSource.prepare(XADataSource.java:885)
              > at weblogic.jdbc.jta.DataSource.prepare(DataSource.java:846)
              > at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:1167)
              > at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:401)
              > at weblogic.transaction.internal.ServerSCInfo$1.execute(ServerSCInfo.java:253)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              > --------------- nested within: ------------------
              > weblogic.transaction.RollbackException: Could not prepare resource 'ProfilingPool
              > prepare failed for XAResource 'ProfilingPool' with error XAER_NOTA : The XID is
              > not valid - with nested exception:
              > [javax.transaction.xa.XAException: prepare failed for XAResource 'ProfilingPool'
              > with error XAER_NOTA : The XID is not valid]
              > at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1644)
              > at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:300)
              > at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
              > at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
              > at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
              > at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
              > at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
              > at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              > ...
              > 2004-03-23 15:00:45,406 ERROR IS003989 [ExecuteThread: '17' for queue: 'ProfileCompleteListenerBean.ExecuteQueue']
              > my.package.search.business.ProfiledHoldingDAO.setProfilingStatus(ProfiledHoldingDAO.java:350
              > ) - Failed to update profiling status for holding 10014 [] (-2)
              > java.sql.SQLException: ORA-02049: timeout: distributed transaction waiting for
              > lock
              > at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:282)
              > at weblogic.jdbc.oci.PreparedStatement.executeUpdate(PreparedStatement.java:226)
              > at weblogic.jdbc.oci.xa.PreparedStatement.executeUpdate(PreparedStatement.java:81)
              > at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:94)
              > at my.package.search.business.ProfiledHoldingDAO.setProfilingStatus(ProfiledHoldingDAO.java:345)
              > at my.package.search.business.ProfilingManager.disseminateAndAcknowledge(ProfilingManager.java:254)
              > at my.package.search.business.ProfileCompleteListenerBean.onMessage(ProfileCompleteListenerBean.java:128)
              > at weblogic.ejb20.internal.MDListener.execute(MDListener.java:382)
              > at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
              > at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
              > at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
              > at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              > ...
              > 2004-03-23 15:01:43,093 ERROR IS003989 [ExecuteThread: '18' for queue: 'HoldingStatusListenerBean.ExecuteQueue']
              > my.package.search.business.ProfiledHoldingDAO.getProfilingStatus(ProfiledHoldingDAO.java:265)
              > - Failed to retrieve profiling results for holding 10060 [] (-2)
              > java.sql.SQLException: ORA-01591: lock held by in-doubt distributed transaction
              > 189.47.12
              > at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:282)
              > at weblogic.jdbc.oci.PreparedStatement.executeQuery(PreparedStatement.java:152)
              > at weblogic.jdbc.oci.xa.PreparedStatement.executeQuery(PreparedStatement.java:48)
              > at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:80)
              > at my.package.search.business.ProfiledHoldingDAO.getProfilingStatus(ProfiledHoldingDAO.java:256)
              > at my.package.search.business.ProfiledHoldingDAO.storeHoldingMetadata(ProfiledHoldingDAO.java:489)
              > at my.package.search.business.ProfiledHoldingDAO.storeNewHolding(ProfiledHoldingDAO.java:406)
              > at my.package.search.business.ProfilingManager.profileHolding(ProfilingManager.java:128)
              > at my.package.search.business.HoldingStatusListenerBean.onMessage(HoldingStatusListenerBean.java:121)
              > at weblogic.ejb20.internal.MDListener.execute(MDListener.java:382)
              > at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
              > at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
              > at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
              > at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              >
              >
              

Maybe you are looking for

  • SSO java sample application problem

    Hi all, I am trying to run the SSO java sample application, but am experiencing a problem: When I request the papp.jsp page I end up in an infinte loop, caught between papp.jsp and ssosignon.jsp. An earlier thread in this forum discussed the same pro

  • Time Machine gets stuck on 'Making Backup Disk Available'

    This has been happening a few days now. Time machine kicks off a backup but it never gets anywhere. It just keeps spinning and saying 'Making Backup Disk Available' The log says only: Starting standard backup Attempting to mount network destination u

  • A Plethora of questions concerning my brand new Vision: M 3

    . Charging. So, I know that it is possible to charge it on my computer after installing the software. I installed the Windows Media Player version. Now...is it possible to charge my player:A. On a different computer that has not had the software inst

  • Problems with download BB world

    Dear, I got problems with Blackberry bold. BB world. This app need upgrade. When I accept it, it send me direct to BB pages for download, but nothing happend. On page is mentioned times run out. Could you help me please? Stepan Solved! Go to Solution

  • JSlider using double values instead of INT

    I need to create a slider that uses double values instead of ints... the default constructor is JSlider temp = new JSlider(JSlider.HORIZONTAL, int, int, int)....but i need to use JSlider temp = new JSlider(JSlider.HORIZONTAL, double,double,double) I