Distributed Transaction in weblogic 5.1
Hi all,
Does Weblogic 5.1 support Distributed Transactions?.
While they aren't java-specific, if you're looking for XA/2PC details,
these 2 are good:
Transaction Processing: Concepts and Techniques (Morgan Kaufmann Series
in Data Management Systems)
by Jim Gray, Andreas Reuter
Principles of Transaction Processing
by Philip A. Bernstein, Eric Newcomer (Contributor)
5.1 does not support XA or 2 phase-commit. However, it does allow
multiple cluster members to enlist in the same transaction as long as
all database access goes through the same JDBC connection.
WLS 6.0 and later do support XA and 2PC.
-- Rob
chandrasekar wrote:
Hi all,
Does Weblogic 5.1 support Distributed Transactions?.Please suggest me some
books or documentation regarding Distributed Transactions, and about the XA compliant
resources.
Similar Messages
-
How to disable distributed transaction in Weblogic 8.1?
Hi I'm using WL8.1 running EJB. I wish to disable distributed transaction, whatever
that is. It is preventing me from doing and AutoCommit(true) in my database. Please
help. Thanks!
You cannot disable transactions if you are using entity EJBs but you can
get your connections from a non-TX DataSource (just define a regular
DataSource and not TXDataSource in your configuration) and then those
connections will not be transaction aware so you'll be able to do
setAutoCommit(true) in fact it might already be the default setting when
you get the connection.
Regards,
Dejan
Fred wrote:
>Hi I'm using WL8.1 running EJB. I wish to disable distributed transaction, whatever
>that is. It is preventing me from doing and AutoCommit(true) in my database. Please
>help. Thanks!
>
>
-
Distributed transaction error in WL 7.1
Hi,
I'm trying to set-up distributed transactions for weblogic. We have a requirement
to go against 2 different databases within a single transaction.
My config.xml looks like:
<JDBCConnectionPool CapacityIncrement="1"
DriverName="oracle.jdbc.xa.client.OracleXADataSource"
InitialCapacity="1" MaxCapacity="2" Name="PAWSPool"
Properties="user=STARTESTDATA;url=jdbc:oracle:thin:@s0489dev.dev.schwab.com:1521:ACSTAR;password=STARTESTDATA;dll=ocijdbc9;protocol=thin"
RefreshMinutes="5" ShrinkingEnabled="true"
SupportsLocalTransaction="true" Targets="sps_space"
TestConnectionsOnReserve="true" TestTableName="DUAL"
URL="jdbc:oracle:thin:@s0489dev.dev.schwab.com:1521:ACSTAR"/>
<JDBCTxDataSource JNDIName="jdbc/paws"
Name="PAWSDataSource" PoolName="PAWSPool" Targets="sps_space"/>
and the pseduo code that produces the problem looks like this:
UserTransction.begin(); //assume valid lookup in jndi occurred already
Connection con = dataSource.getConnection(); //datsource obtained from jndi lookup
PreparedStatement ps = con.prepareStatement("sql string");
the error
HELP!!!!!what is the error ? if you could cut and paste the log / stdout that shows
the error that could be useful.
Also did youmean to say you are using WLS7.0SP1?
sree
"John Byrnes" <[email protected]> wrote in message
news:3f1af184$[email protected]..
>
Hi,
I'm trying to set-up distributed transactions for weblogic. We have arequirement
to go against 2 different databases within a single transaction.
My config.xml looks like:
<JDBCConnectionPool CapacityIncrement="1"
DriverName="oracle.jdbc.xa.client.OracleXADataSource"
InitialCapacity="1" MaxCapacity="2" Name="PAWSPool"
Properties="user=STARTESTDATA;url=jdbc:oracle:thin:@s0489dev.dev.schwab.com:
1521:ACSTAR;password=STARTESTDATA;dll=ocijdbc9;protocol=thin"
RefreshMinutes="5" ShrinkingEnabled="true"
SupportsLocalTransaction="true" Targets="sps_space"
TestConnectionsOnReserve="true" TestTableName="DUAL"
URL="jdbc:oracle:thin:@s0489dev.dev.schwab.com:1521:ACSTAR"/>
<JDBCTxDataSource JNDIName="jdbc/paws"
Name="PAWSDataSource" PoolName="PAWSPool" Targets="sps_space"/>
and the pseduo code that produces the problem looks like this:
UserTransction.begin(); //assume valid lookup in jndi occurred already
Connection con = dataSource.getConnection(); //datsource obtained fromjndi lookup
PreparedStatement ps = con.prepareStatement("sql string");
the error
HELP!!!!! -
Lock held by in-doubt distributed transaction
I'm having an intermittent problem in our server where a distributed transaction
between WebLogic JMS (6.1 sp3) and Oracle (using the 9.1.2 XA driver) doesn't
complete and subsequent attempts to access the rows in question result in:
java.sql.SQLException: ORA-01591: lock held by in-doubt distributed transaction
4.33.52658
Has anybody else seen anything like this?
Rao,
The BEA patch is CR095835_610SP4. Apparently there is a corresponding patch for
SP3 as well. When configuring the jdbc connection pool set XaSetTransactionTimeout
= true and
XaTransactionTimeout = yourTimeoutValueInSeconds. This will instruct the Transaction
manager to set the timeout value on Oracle's XAResource during the two-phase commit
process. I believe Oracle refers to the timeout value as SesTm.
Cheers,
Tony
"Rao Boppana" <[email protected]> wrote:
>
>We are currently facing the same problem. Could you let us know more
>details about
>the patch BEA put out to fix this? Is there a patch #/bug #? We are currently
>running SP4, Oracle 9.2.3 using 9.2.0.1 drivers. We really cannot set
>our JTA
>timeout to less than 1 minute and hence we are left with option2. Any
>help would
>be greatly appreciated.
>
>
>"Tony Necakov" <[email protected]> wrote:
>>
>>Jane,
>>Thanks for the reply. After talking to Oracle support, we believe we've
>>discovered
>>the cause of the problem. Apparently, setting the JTA transaction timeout
>>does
>>not affect the default timeout from Oracle's point of view. Consequently,
>> XA
>>transactions exceeding 1 minute (Oracle's default) were being marked
>>by Oracle
>>as in-doubt. Subsequent commits or rollback from the transaction manager
>>were
>>being ignored. The solution is to either knock the JTA timeout value
>>to something
>>below Oracle's default or install a BEA patch which allows the transaction
>>manager
>>to set the timeout on the Oracle resource manager.
>>
>>"Jane Sampson" <[email protected]> wrote:
>>>Hi Tony,
>>>
>>>Yes, I believe there were some problems with 8.1.7. I believe it requires
>>>an Oracle patch AND a JDriver patch (if you are using the WebLogic
>JDriver).
>>>Open a case with support for details.
>>>
>>>Thanks,
>>>
>>>Jane
>>>BEA Support
>>>
>>>
>>>"Tony Necakov" <[email protected]> wrote in message
>>>news:[email protected]...
>>>>
>>>> We're seeing the same intermittent problem with Oracle 8.1.7.2 and
>>>8.1.7.4. The
>>>> problem occurs with WLS 6.1 service pack 3 and service pack 4.
>>>>
>>>> "Jane Sampson" <[email protected]> wrote:
>>>> >Hi Tim,
>>>> >
>>>> >There is an issue has been reported for Oracle 9.2.0.1 Database/Oracle
>>>> >9.2.0.1 Thin Driver and exhibits this behavior and is being address
>>>by
>>>> >both
>>>> >BEA and Oracle. I would suggest you open a case with Customer Support
>>>> >and
>>>> >mention CR090816. It could be the same problem.
>>>> >
>>>> >Thanks,
>>>> >
>>>> >Jane
>>>> >BEA Support
>>>> >
>>>> >"Tim Dawson" <[email protected]> wrote in message
>>>> >news:[email protected]...
>>>> >>
>>>> >> I'm having an intermittent problem in our server where a distributed
>>>> >transaction
>>>> >> between WebLogic JMS (6.1 sp3) and Oracle (using the 9.1.2 XA
>driver)
>>>> >doesn't
>>>> >> complete and subsequent attempts to access the rows in question
>>>result
>>>> >in:
>>>> >>
>>>> >> java.sql.SQLException: ORA-01591: lock held by in-doubt distributed
>>>> >transaction
>>>> >> 4.33.52658
>>>> >>
>>>> >> Has anybody else seen anything like this?
>>>> >
>>>> >
>>>>
>>>
>>>
>>
>
-
Which version of jdbc thin driver should i use to achieve distributed transaction
with oracle 8.1.5 in weblogic 6.1 sp2
right now if iam using the driver classes provided in weblogic.jar iam gettig the
following Exception
AccountBean.ejbCreate( id = accountId, initial balance = $ 3000.0)
java.sql.SQLException: XA error: XAER_RMERR : A resource manager error has occured
in the transaction branch start(
) failed on resource 'OracleXAPool' Unexpected error during start for XAResource
'OracleXAPool': null
at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1044)
at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1010)
at weblogic.jdbc.jta.Connection.getXAConn(Connection.java:148)
at weblogic.jdbc.jta.Connection.prepareStatement(Connection.java:226)
at weblogic.jdbc.rmi.internal.ConnectionImpl.prepareStatement(ConnectionImpl.java:135)
at weblogic.jdbc.rmi.SerialConnection.prepareStatement(SerialConnection.java:76)
at examples.ejb.basic.beanManaged.AccountBean.ejbCreate(Unknown Source)
at examples.ejb.basic.beanManaged.AccountBean_g1748h_Impl.ejbCreate(AccountBean_g1748h_Impl.java:172)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.ejb20.manager.DBManager.create(DBManager.java:492)
at weblogic.ejb20.manager.DBManager.remoteCreate(DBManager.java:462)
at weblogic.ejb20.internal.EntityEJBHome.create(EntityEJBHome.java:190)
at examples.ejb.basic.beanManaged.AccountBean_g1748h_HomeImpl.create(AccountBean_g1748h_HomeImpl.java:76)
at examples.ejb.basic.beanManaged.AccountBean_g1748h_HomeImpl_WLSkel.invoke(Unknown
Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:257)
at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:158)
at weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:92)
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:112)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:253)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:220)
at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
at $Proxy126.create(Unknown Source)
at examples.wtc.atmi.simpapp.ToupperBean.putMessage(ToupperBean.java:194)
at examples.wtc.atmi.simpapp.ToupperBean_8roqg7_EOImpl.putMessage(ToupperBean_8roqg7_EOImpl.java:284)
at examples.wtc.atmi.simpapp.ToupperBean_8roqg7_EOImpl_WLSkel.invoke(Unknown
Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:257)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Regards
Ranga Rao
Oracle Server 8.1.5 does not provide support for 2PC.
Full XA support is provided from version 8.1.7.
Sergi
"Lawrence" <[email protected]> wrote:
>
>Ranga,
>Please use classes12.zip for this.If you still find problem, please let
>me know.
>Thanks
>Lawrence
>
>"Ranga Rao" <[email protected]> wrote:
>>
>>
>>Which version of jdbc thin driver should i use to achieve distributed transaction
>>with oracle 8.1.5 in weblogic 6.1 sp2
>>
>>right now if iam using the driver classes provided in weblogic.jar iam
>gettig
>>the
>>following Exception
>>
>>////////////////////////////////////////////////////////////////////////////////////////////
>>AccountBean.ejbCreate( id = accountId, initial balance = $ 3000.0)
>>java.sql.SQLException: XA error: XAER_RMERR : A resource manager error
>has
>>occured
>>in the transaction branch start(
>>) failed on resource 'OracleXAPool' Unexpected error during start for XAResource
>>'OracleXAPool': null
>> at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1044)
>> at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1010)
>> at weblogic.jdbc.jta.Connection.getXAConn(Connection.java:148)
>> at weblogic.jdbc.jta.Connection.prepareStatement(Connection.java:226)
>> at weblogic.jdbc.rmi.internal.ConnectionImpl.prepareStatement(ConnectionImpl.java:135)
>> at weblogic.jdbc.rmi.SerialConnection.prepareStatement(SerialConnection.java:76)
>> at examples.ejb.basic.beanManaged.AccountBean.ejbCreate(Unknown
>>Source)
>> at examples.ejb.basic.beanManaged.AccountBean_g1748h_Impl.ejbCreate(AccountBean_g1748h_Impl.java:172)
>> at java.lang.reflect.Method.invoke(Native Method)
>> at weblogic.ejb20.manager.DBManager.create(DBManager.java:492)
>> at weblogic.ejb20.manager.DBManager.remoteCreate(DBManager.java:462)
>> at weblogic.ejb20.internal.EntityEJBHome.create(EntityEJBHome.java:190)
>> at examples.ejb.basic.beanManaged.AccountBean_g1748h_HomeImpl.create(AccountBean_g1748h_HomeImpl.java:76)
>> at examples.ejb.basic.beanManaged.AccountBean_g1748h_HomeImpl_WLSkel.invoke(Unknown
>>Source)
>> at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
>> at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
>> at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:257)
>> at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:158)
>> at weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:92)
>> at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:112)
>> at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:253)
>> at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:220)
>> at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
>> at $Proxy126.create(Unknown Source)
>> at examples.wtc.atmi.simpapp.ToupperBean.putMessage(ToupperBean.java:194)
>> at examples.wtc.atmi.simpapp.ToupperBean_8roqg7_EOImpl.putMessage(ToupperBean_8roqg7_EOImpl.java:284)
>> at examples.wtc.atmi.simpapp.ToupperBean_8roqg7_EOImpl_WLSkel.invoke(Unknown
>>Source)
>> at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
>> at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:257)
>> at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
>> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
>> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>>/////////////////////////////////////////////////////////////////////////////////
>>
>>Regards
>>Ranga Rao
>>
>>
>
-
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 -
Configuring Weblogic's jDriver for Oracle to use in distributed transactions
Here is some errata to the instructions at "Configuring XA JDBC drivers" section of the online beta documentation:
http://www.weblogic.com/docs60/adminguide/managetx.html#1041268
The sample JDBC connection pool using Weblogic jDriver for Oracle should be:
<JDBCConnectionPool
Name="fundsXferAppPool"
Targets="myserver"
URL="jdbc:weblogic:oracle:localdb"
DriverName="weblogic.jdbc.oci.xa.XADataSource"
InitialCapacity="0"
MaxCapacity="5"
CapacityIncrement="1"
Properties="user=scott;password=tiger;server=localdb;rmid=0"
/>
<JDBCTxDataSource
Name="fundsXferDataSource"
Targets="myserver,server1"
JNDIName="myapp.fundsXfer"
PoolName="fundsXferAppPool"
/>
Here is an example of an additional XA connection pool for a second database instance:
<JDBCConnectionPool
Name="fundsXferAppPool2"
Targets="myserver"
URL="jdbc:weblogic:oracle:localdb2"
DriverName="weblogic.jdbc.oci.xa.XADataSource"
InitialCapacity="0"
MaxCapacity="5"
CapacityIncrement="1"
Properties="user=scott;password=tiger;server=localdb2;rmid=1"
/>
<JDBCTxDataSource
Name="fundsXferDataSource2"
Targets="myserver,server1"
JNDIName="myapp.fundsXfer2"
PoolName="fundsXferAppPool2"
/>
Please note the different "rmid" values for the 2 different database instances. Note also that the above sample only applies for Beta 1. Instructions may change in the future for Beta 2.
Also, all the names of the data source properties shown in "Table 8-2 Data Source Properties for WebLogic jDriver for Oracle" should start with lower case.
The Beta 1 online documentation will soon be updated to reflect the above. Our apologies for any inconvenience caused.
-- Priscilla Fung, BEA Systems, Inc.
Thanks
Mark
"Sree Bodapati" <[email protected]> wrote:
>Hi Mark,
>
>Yes you need 8.1.6 DB Server or higher for WebLogic's jDriver for Oracle/XA
>as well.
>
>/
>sree
>
>
>"Mark Cordobal" <[email protected]> wrote in message
>news:[email protected]..
>>
>> I read that XA features require version Oracle8i release 8.1.6 or later
>of
>the Oracle
>> server.
>> Does this apply only to Oracle JDBC drivers (which implement 2pc on top
>of
>JAVA_XA
>> package) or also to Weblogic's jDriver for Oracle/XA ?
>> I mean, if I have two Oracle 8.06 (or however < 8.1.6) jdbc Resource
>Manager, can
>> I implement (wlserver 6.1sp2) a distributed xa transaction using
>Weblogic's jDriver
>> for Oracle/XA ?
>> Or is it (jdriver) built also on top of JAVA_XA package, and so the db
>server XA
>> compliancy is a must ?
>>
>> Thanks in advance
>>
>> Mark
>
>
-
Can not commit distributed transaction
Hi
We get error "can not commit distributed transaction" during
commit the transaction in which we have create NEW entities.
Update-transactions on existing enitites work correct.
Our problem is probably due to seauences for object IDs: we are using oracle native sequences:
<sequence name="SeqErrRecObj" strategy="nontransactional" factory-class="native(Sequence=BUYING.SEQ_ERRRECOBJ)"/>
As soon we use strategy="nontransactional" in managed environment,
we get "can not commit distributed transaction" error by creating new instance.
Switching to strategy="transactional" seems to eleminate this problem.
I did not found any hint in about this in documentation.
Can some one confirm our assumption that using nontransactional oracle sequences in manageg (WebLogic 9.2) environment
is responsible for "can not commit distributed transaction" error and "strategy=transactional" is the right solution.
Probably we are completely wrong and tehre is some other explanation for this error ?
kind regards
Andre TeshlerHi Andre,
It sounds like you have not configured a non-transactional datasource. See section "4.2.1. Managed and XA DataSources" in the <kodo>/docs/jdo/pdf/manual.pdf. Connection is for the managed datasource and Connection2 for the non-transactional.
David Ezzio -
Database to Middleware distributed transaction control
Hello!
I'm using RMI in a JAVA stored procedure to invoke an external remote object's method (deployed in an application server). Is there any solution to manage the global transaction between database and middleware?
I've the same kind of invocations but from middleware to middleware and in that cases JTA (weblogic transaction manager) manage the transaction.
I've this big challenge in hands. Any idea?
Thanks a lotHi Kata,
this won't work as the ALL_TABLES is not a table that exists in your SQl Server - instead it is a "mimicked" table. This means the gateway will check if you have on your SQL Server a table called all_tables and when there's no table it will start an internal mechanism to check out what sort of tables exist in your SQL Server database. So the gateway is starting internally another transaction to get details from the foreign database and DG4ODBC can't participate in distributed transactions at all. Instead of using all_tables you have to use a real SQL Server table like SQ Server sys.objects or sys.tables.
- Klaus -
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)
>
>
-
ORA-02049: timeout: distributed transaction waiting for lock
Hi,
My name is Guneet and I'm working on an application running on BEA Weblogic Server 9.2 running on a Red Hat Linux box using Oracle 10g as the database. My problem is that recently our code started getting the following exception while updating a database table.
java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-02049: timeout: distributed transaction waiting for lock
Application Details
* Using Stateless Session EJB
* Only one Business method in this EJB with transaction attribute set to "required"
* This method executes two select queries & one update query
* We are using JDBC to access the database.
* We have configured a Data Source & are using it to get a database connection.
* Weblogic's Oracle Driver is being used.
More details
* The application has been running well since a month.
* Two days ago,the update query failed with the above error.
* At that time, a single client was accessing the system.
* Once this problem occurs, it starts appearing frequently.
* Eventually a request to get a connection from the Data Source times out & the exception copied at the end is thrown
* At this stage the application gets stuck and all requests trying to get a connection end up with this exception.
* Fortunately, Restarting the Weblogic Server gets us out of this problem and transactions resume normally.
Now my questions are
# Why is this error happening & what does it mean?
# It looks like the second exception (unable to get a connection from ds) is an after effect of the first problem (ORA-02049) once it appears for a couple of times. Can somebody validate this?
# Though I don't understand JTA well but I don't think this application needs distributed transactions so, I'm thinking of modifying the driver type to non-XA oracle driver. Any advise/pointers/comments on this front is welcome !!!!!!!!
Thanks
Guneet Sahai
Exception Trace
Dec 27, 2006 4:47:50 PM | com.gisil.themis.db | SEVERE | Unable to load merchant DEL = 911168900164. Reason - java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_RMERR start() failed on resource 'themis-ds': XAER_RMERR : A resource manager error has occured in the transaction branch
javax.transaction.xa.XAException: Unexpected error during start for XAResource 'themis-ds': Transaction timed out after 29 seconds
BEA1-252DE51AC930078CA638
at weblogic.jdbc.wrapper.XA.createException(XA.java:103)
at weblogic.jdbc.jta.DataSource.start(DataSource.java:753)
at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1182)
at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1115)
at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:274)
at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:497)
at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:429)
at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1408)
at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1332)
at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:440)
at weblogic.jdbc.jta.DataSource.connect(DataSource.java:396)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
at com.gisil.themis.db.impl1.DbManagerImpl.isPinValid(DbManagerImpl.java:872)
at com.gisil.themis.ejb.ThemisBean.isPinValid(ThemisBean.java:185)
at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl.isPinValid(Themis_aqqc4k_EOImpl.java:207)
at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:403)
at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:56)
at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:934)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1413)
at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1332)
at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:440)
at weblogic.jdbc.jta.DataSource.connect(DataSource.java:396)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
at com.gisil.themis.db.impl1.DbManagerImpl.isPinValid(DbManagerImpl.java:872)
at com.gisil.themis.ejb.ThemisBean.isPinValid(ThemisBean.java:185)
at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl.isPinValid(Themis_aqqc4k_EOImpl.java:207)
at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:403)
at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:56)
at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:934)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)guneet sahai wrote:
Hi,
My name is Guneet and I'm working on an application running on BEA Weblogic Server 9.2 running on a Red Hat Linux box using Oracle 10g as the database. My problem is that recently our code started getting the following exception while updating a database table.
java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-02049: timeout: distributed transaction waiting for lock
Application Details
* Using Stateless Session EJB
* Only one Business method in this EJB with transaction attribute set to "required"
* This method executes two select queries & one update query
* We are using JDBC to access the database.
* We have configured a Data Source & are using it to get a database connection.
* Weblogic's Oracle Driver is being used.
More details
* The application has been running well since a month.
* Two days ago,the update query failed with the above error.
* At that time, a single client was accessing the system.
* Once this problem occurs, it starts appearing frequently.
* Eventually a request to get a connection from the Data Source times out & the exception copied at the end is thrown
* At this stage the application gets stuck and all requests trying to get a connection end up with this exception.
* Fortunately, Restarting the Weblogic Server gets us out of this problem and transactions resume normally.
Now my questions are
# Why is this error happening & what does it mean?
# It looks like the second exception (unable to get a connection from ds) is an after effect of the first problem (ORA-02049) once it appears for a couple of times. Can somebody validate this?
# Though I don't understand JTA well but I don't think this application needs distributed transactions so, I'm thinking of modifying the driver type to non-XA oracle driver. Any advise/pointers/comments on this front is welcome !!!!!!!!
Thanks
Guneet SahaiHi Guneet. If you want to debug the JTA issue, I suggest opening an official
support case. They will lead you through producing the JTA debug information.
However, I believe you are correct that the transaction you describe is
completely doable with a simple local transaction, so if you were to alter
your pool to use the non-XA driver, it would probably be faster, simpler,
and just work.
Let me know...
Joe
>
Exception Trace
Dec 27, 2006 4:47:50 PM | com.gisil.themis.db | SEVERE | Unable to load merchant DEL = 911168900164. Reason - java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_RMERR start() failed on resource 'themis-ds': XAER_RMERR : A resource manager error has occured in the transaction branch
javax.transaction.xa.XAException: Unexpected error during start for XAResource 'themis-ds': Transaction timed out after 29 seconds
BEA1-252DE51AC930078CA638
at weblogic.jdbc.wrapper.XA.createException(XA.java:103)
at weblogic.jdbc.jta.DataSource.start(DataSource.java:753)
at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1182)
at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1115)
at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:274)
at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:497)
at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:429)
at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1408)
at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1332)
at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:440)
at weblogic.jdbc.jta.DataSource.connect(DataSource.java:396)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
at com.gisil.themis.db.impl1.DbManagerImpl.isPinValid(DbManagerImpl.java:872)
at com.gisil.themis.ejb.ThemisBean.isPinValid(ThemisBean.java:185)
at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl.isPinValid(Themis_aqqc4k_EOImpl.java:207)
at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:403)
at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:56)
at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:934)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1413)
at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1332)
at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:440)
at weblogic.jdbc.jta.DataSource.connect(DataSource.java:396)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
at com.gisil.themis.db.impl1.DbManagerImpl.isPinValid(DbManagerImpl.java:872)
at com.gisil.themis.ejb.ThemisBean.isPinValid(ThemisBean.java:185)
at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl.isPinValid(Themis_aqqc4k_EOImpl.java:207)
at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:403)
at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:56)
at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:934)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181) -
Distributed transactions/jdbc problem WL60
Hi
Our company has aworking application running on WLS5.1sp9.
Im in the process of migrating it to WL6.0sp2.
Our domain has 2 clusters each running 2 servers:
1) servlet engines (handling http requests from clients, running servlets
and jsp's)
2) ejb containers (runnigour entities and session beans, working with Oracle
8i database using connection pool and TxDataSource)
The scenario:
- a client request invokes a servlet on one of the servlet engines.
- the servlet opens a jndi context to one of the ejb containers
- the servlet open a transaction on a UserTransaction stub on that ejb.
- then the servlet calls an entity bean using a home interface looked up
using the same context.
- the entity bean uses DataSource lookup in its own servers jndi to rerieve
a connection.
and then i get the following exception:
java.sql.SQLException: No default driver for database type:
jdbc:weblogic:jts
at
weblogic.jdbcbase.t3.Driver.seeIfWeNeedToInferDriverNameAndUrlFrom(Driver.ja
va:456)
at weblogic.jdbcbase.t3.Driver.getAllPropsFrom(Driver.java:255)
at weblogic.jdbcbase.t3.Driver.connect(Driver.java:75)
at weblogic.jdbcbase.jts.Driver.createRemoteConnection(Driver.java:199)
at weblogic.jdbcbase.jts.Driver.connect(Driver.java:134)
at
weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java
:44)
at com.unisfair.util.DBHelper.getConnection(DBHelper.java:43)
the transaction toString() gives:
transaction=(IdHash=7541556,Name = [EJB
UserBeanImpl.generateSessionSuffix()],Xid=2:b53da78d3c1badbb,Status=Active,n
umRepliesOwedMe=0,numRepliesOwedOthers=1,seconds since begin=0,seconds
left=30,activeThread=Thread[ExecuteThread: '8' for queue: 'default',5,Thread
Group for Queue:
'default'],ServerResourceInfo[weblogic.jdbc.jts.Connection]=(state=new,assig
ned=none),SCInfo[ejb2]=(state=active),SCInfo[servlet2]=(state=active),SCInfo
[ejb1]=(state=active),properties=({weblogic.transaction.name=[EJB
UserBeanImpl.generateSessionSuffix()], weblogic.jdbc=t3://10.0.0.31:7007}))
However the error happens on the other ejb server 10.0.0.33:7007
It seems that the jts driver tries to get a remote connection on the server
that coordinates the transaction but uses the deprecated t3 driver.
I hope someone can help us since this problem is a good enough reason for us
not moving on to WL6.0 we also looked at WL6.1 Beta and theres nothing new
about it either.
thanks
Dror Last
Senior Software Engineer
Unisfair Inc.
12 Yad Haruzim St. Tel Aviv 67778 Israel
Tel: +972-3-5373738 Ext. 243
Fax: +972-3-5373731
GSM: +972-55-723710
mailto:[email protected]
http://www.unisfair.com/
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JDBC_TX ():
In the readme file of Oracle JDBC drivers 8.1.6.0.1 (http://technet.oracle.com/software/tech/java/sqlj_jdbc/files/Readme_01.txt)
it mentioned that it supports "distributed transactions".
As I understand, JDBC transaction is connection based and uses Oracle internal transaction manager. In order to do "distributed transactions", I must have at least two connections open at the same time each to its own database instance. How does the two connections coordinate the transactions? I thought in order to support "distributed transactions", one has to build a higher layer to encapsulate the two connections and therefore coordinate the distributed transactions. Any examples will be welcome.<HR></BLOCKQUOTE>
The two branches of the transaction are coordinated using 2-phase commit.
For samples look under
$ORACLE_HOME/jdbc/demo/samples/oci8/jdbc20-samples/
null -
Transaction in Weblogic 5.1 Server
Hi All,
Can any one tell me How to set XA DataSource details in weblogic.properties
file in weblogic 5.1 server.
Thanx
Ramana Murthy
While they aren't java-specific, if you're looking for XA/2PC details,
these 2 are good:
Transaction Processing: Concepts and Techniques (Morgan Kaufmann Series
in Data Management Systems)
by Jim Gray, Andreas Reuter
Principles of Transaction Processing
by Philip A. Bernstein, Eric Newcomer (Contributor)
5.1 does not support XA or 2 phase-commit. However, it does allow
multiple cluster members to enlist in the same transaction as long as
all database access goes through the same JDBC connection.
WLS 6.0 and later do support XA and 2PC.
-- Rob
chandrasekar wrote:
Hi all,
Does Weblogic 5.1 support Distributed Transactions?.Please suggest me some
books or documentation regarding Distributed Transactions, and about the XA compliant
resources. -
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
ChrisAndy
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 transactions with container-managed MDBs
I have built a framework that employs a high rate of code reuse while abstracting
the complexities of inter-application communication. This allows application
developers to focus on solving their business needs and not worry about "the plumbing"
between the applications.
At this point, the framework is using container-managed MDBs for Topic destinations.
MDBs were chosen because of their concurrent nature for processing JMS messages.
Now that I have this framework up and running, I am trying to add distributed
transaction support and am having trouble understanding what I need to do. Here
is how the framework works:
The MDB will recieve a message, unmarshall it into a business object, and then
route that object to the appropriate business class where it is then processed
accordingly. In most cases, the processing of this message object will require
database interaction. If any error should occur while processing the message,
all XAResources within the transaction should rollback and ultimately, the JMS
message will be redelivered later.
Here is what I'm trying to find out:
1. When control is passed to an application and it gets a DB connection, will
that DB resource be dynamically enlisted with the transaction?
2. Must the DB connection come from the WLS DB pool to be enlisted with the transaction?
I ask this because the current standard at this company is to use a home-grown
DB connection pool for getting DB connections. This is due to the fact that not
all applications here run in a WLS environment and they wanted a standard way
of retrieving a DB connection across applications. They also sited problems with
WLS 4.5.1 connection pool.
3. The documentation states that only one database may be involved in a transaction.
If a connection to another database is required, but not needed in the current
transaction, will WLS ignore enlisting the 2nd DB resource, or throw an exception?
4. Where can I find <B>detailed</B> information about this subject? Everything
that I have read so far has barely scratched the surface for this specific topic.
Thanks,
Bob.
Hi Bob,
If you are using WLS's XA connection pool, then the XAResource associated with
the XA connections are enlisted with the transaction transparently for you. Enlistments
actually occur not at getConnection, but on demand when the JDBC objects are actually
used.
If you are not using WLS connection pools, then you would need to enlist the XAResource
associated with the XA connections yourself. You can obtain the transaction associated
with the current thread by calling weblogic.transaction.TxHelper.getTransaction(),
and then call enlistResource on the transaction.
Weblogic has provisions that allow one (and only one) non-XA connection pool to
participate in a distributed transaction. In this case, you will get a SQLException
when you try to obtain a connection from a second connection pool in the same
distributed transaction. However, if you are using real XA connection pools,
there is no limitation and any number of XA connection pools can participate in
the same distributed transaction.
We will try to incorporate more info in our online docs in the future.
-- Priscilla Fung, BEA Systems, Inc.
"Bob Peroutka" <[email protected]> wrote:
>
>I have built a framework that employs a high rate of code reuse while
>abstracting
>the complexities of inter-application communication. This allows application
>developers to focus on solving their business needs and not worry about
>"the plumbing"
>between the applications.
>
>At this point, the framework is using container-managed MDBs for Topic
>destinations.
> MDBs were chosen because of their concurrent nature for processing JMS
>messages.
>
>Now that I have this framework up and running, I am trying to add distributed
>transaction support and am having trouble understanding what I need to
>do. Here
>is how the framework works:
>
>The MDB will recieve a message, unmarshall it into a business object,
>and then
>route that object to the appropriate business class where it is then
>processed
>accordingly. In most cases, the processing of this message object will
>require
>database interaction. If any error should occur while processing the
>message,
>all XAResources within the transaction should rollback and ultimately,
>the JMS
>message will be redelivered later.
>
>Here is what I'm trying to find out:
>
>1. When control is passed to an application and it gets a DB connection,
>will
>that DB resource be dynamically enlisted with the transaction?
>
>2. Must the DB connection come from the WLS DB pool to be enlisted with
>the transaction?
>
>I ask this because the current standard at this company is to use a home-grown
>DB connection pool for getting DB connections. This is due to the fact
>that not
>all applications here run in a WLS environment and they wanted a standard
>way
>of retrieving a DB connection across applications. They also sited problems
>with
>WLS 4.5.1 connection pool.
>
>3. The documentation states that only one database may be involved in
>a transaction.
> If a connection to another database is required, but not needed in the
>current
>transaction, will WLS ignore enlisting the 2nd DB resource, or throw
>an exception?
>
>4. Where can I find <B>detailed</B> information about this subject?
> Everything
>that I have read so far has barely scratched the surface for this specific
>topic.
>
>Thanks,
>
>Bob.
Maybe you are looking for
-
ITunes purchases appear on some devices, not all...
I bought a movie in iTunes yesterday (Prometheus) using my Apple ID on my MacBook. This is the first movie I've purchased in iTunes so this all may be user error, so please bear with me. On my iPhone I see the movie in iTunes under ... More > Purcha
-
Feedback: Why isn't Print to PDF a default option in Windows 8.1 RT on Surface 2?
Why isn't PRINT TO PDF a stock feature of Windows 8.1 RT and IE 11? One of the biggest reasons why people prefer chrome over IE is the built-in print to PDF. while you can easily get around this on full 8.1, on Windows RT, print and apps are very lim
-
Time Machine backup to another Mac on the network
Hi, my wife is getting a new iMac. I was wondering if I partitioned the new drive in the iMac, one for the iMac OS X installation & the other for backing up my MacBook Pro over the network. Would this work? So it would be: iMac backed up to exteral f
-
How to enable logging on partition table in oracle 11G . Regards
-
Transformations Export into Excel
Hi BI Guru`s, Can we export transformations into excel sheet? If it is possible please let me know, how to do it? Thanks in advance, Venkat