Transaction marked rolled back
Hi
I'm have a FacadeBean F1 which uses Required transaction attribute which calls another Session Bean S1 which has default transaction attribute(Supports).This uses customized UserTransaction.
In bean S1 this is the sequence of steps
Method{
insert into db
try{
userTransactionBegin.
do some process
userTransaction commit.
}catch{
userTransaction rollback
}finally{
update
Now when a exception is thrown in the process section,The user transaction is rolled back but i get the following exception in the finally block when trying to update some table in DB.
Transaction BEA1-0EB167DB585FC3E8BBFA not active anymore. tx status = Marked rollback.
I believe this happens as the rollback in userTransaction would also cause the transaction to get inactivated and the request to get the fresh DB connection is thrown back with this exception.
Can someone please suggest me what i should do to resolve this issue.
Rgds
Ramraj
Ramraj Chauhan wrote:
Hi
I'm have a FacadeBean F1 which uses Required transaction attribute which calls another Session Bean S1 which has default transaction attribute(Supports).This uses customized UserTransaction.
In bean S1 this is the sequence of steps
Method{
insert into db
try{
userTransactionBegin.
do some process
userTransaction commit.
}catch{
userTransaction rollback
}finally{
update
Now when a exception is thrown in the process section,The user transaction is rolled back but i get the following exception in the finally block when trying to update some table in DB.
Transaction BEA1-0EB167DB585FC3E8BBFA not active anymore. tx status = Marked rollback.
I believe this happens as the rollback in userTransaction would also cause the transaction to get inactivated and the request to get the fresh DB connection is thrown back with this exception.
Can someone please suggest me what i should do to resolve this issue.
Rgds
RamrajHi. You are doing your own tx in the S1 bean, so that beand should be described as
a no-TX (doesn't support tx) bean. That way WLS won't try to involve it in any
calling transaction or control what you do, which is totally independent. You
can't have 'nested' transactions.
Joe
Similar Messages
-
Configuration:
- WLS 5.10 SP8
- Oracle 8.1.6
- TX DataSource connected to a Connection pool of oracle JDBC connections
I have a stateless session with a method register() that performs three insert operations in the oracle database via a connection fetched from tha TX Datasource object.
The method register has been marked with the transaction attribute required.
I recieve a SQLException from Oracle when trying to insert in one of the three tables and want to rollback the transaction.
I have tried to use setRollBackOnly(), throw an EJB exception
and i get the following message from WLS:
java.sql.SQLException: ORA-00001: unique constraint (ISACOWN.UK_ISIS_REFERENCE2) violated
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java, Compiled Code)
at oracle.jdbc.oci8.OCIDBAccess.executeFetch(OCIDBAccess.java, Compiled Code)
at oracle.jdbc.oci8.OCIDBAccess.parseExecuteFetch(OCIDBAccess.java:1235)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java, Compiled Code)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1232)
at oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.java:1353)
at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java, Compiled Code)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java, Compiled Code)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java, Compiled Code)
at weblogic.jdbc20.pool.PreparedStatement.executeUpdate(PreparedStatement.java:47)
at weblogic.jdbc20.rmi.internal.PreparedStatementImpl.executeUpdate(PreparedStatementImpl.java:54)
at weblogic.jdbc20.rmi.SerialPreparedStatement.executeUpdate(SerialPreparedStatement.java:55)
at net.astrazeneca.cmi.data.Crud.execDML(Crud.java:283)
at net.astrazeneca.cmi.data.dao.MolStructDAO.insertIsisRef(MolStructDAO.java:136)
at net.astrazeneca.cmi.data.dao.MolStructDAO.insert(MolStructDAO.java, Compiled Code)
at net.astrazeneca.cmi.data.dataservice.MolStructureDS.register(MolStructureDS.java, Compiled Code)
at net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl.register(MolStructureDSEOImpl.java, Compiled Code)
at net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl_WLSkel.invoke(MolStructureDSEOImpl_WLSkel.java, Compiled Code)
at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAdapter.java, Compiled Code)
at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandler.java, Compiled Code)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java, Compiled Code)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
ti jan 23 11:12:20 GMT+01:00 2001:<I> <EJB JAR deployment F:\Projects\MolStructureDS\MolStructureDS.jar> Transaction: '980237619834_1326' rolled back
due to EJB exception:
javax.ejb.EJBException
at net.astrazeneca.cmi.data.dataservice.MolStructureDS.register(MolStructureDS.java, Compiled Code)
Anybody got an idea ? at net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl.register(MolStructureDSEOImpl.java, Compiled Code)
at net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl_WLSkel.invoke(MolStructureDSEOImpl_WLSkel.java, Compiled Code)
at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAdapter.java, Compiled Code)
at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandler.java, Compiled Code)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java, Compiled Code)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
ti jan 23 11:12:20 GMT+01:00 2001:<E> <Adapter> Exception thrown by rmi server: [-3565031217135527434S157.96.215.53:[7001,7001,7002,7002,7001,-1]/466]
javax.ejb.EJBException
at net.astrazeneca.cmi.data.dataservice.MolStructureDS.register(MolStructureDS.java, Compiled Code)
at net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl.register(MolStructureDSEOImpl.java, Compiled Code)
at net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl_WLSkel.invoke(MolStructureDSEOImpl_WLSkel.java, Compiled Code)
at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAdapter.java, Compiled Code)
at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandler.java, Compiled Code)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java, Compiled Code)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
No matter what I have tried so far the two inserts that are OK are commited in Oracle. What I want is to make all three inserts in the transaction rolled back.
Anybody got an idea ?
Yes, all through the same connection and the connection is from a TX data source in
WLS 5.1 with SP8
But.... I do NOT fetch the connection inside the transaction..but I didn't think
that was nescessery... is it ?
When I tried this and checked the JDBC log the auto-commit was turned to off and
everything worked smoothly.
/Paul
"Cameron Purdy" <[email protected]> wrote:
>All through the same connection? And the connection is from a tx data
>source? And auto-commit is off?
>
>If so, then someone is committing the transaction.
>
>Is this 5.1?
>
>--
>Cameron Purdy
>Tangosol, Inc.
>http://www.tangosol.com
>+1.617.623.5782
>WebLogic Consulting Available
>
>
>"Paul Eriksson" <[email protected]> wrote in message
>news:[email protected]...
>>
>> I've already tried this but still... the tho first inserts are commited
>and the third that causes the rollback of course is not.
>>
>> /P
>>
>> "Cameron Purdy" <[email protected]> wrote:
>> >Don't set rollback only, just throw a runtime exception (like
>EJBException).
>> >
>> >--
>> >Cameron Purdy
>> >Tangosol, Inc.
>> >http://www.tangosol.com
>> >+1.617.623.5782
>> >WebLogic Consulting Available
>> >
>> >
>> >"Paul Eriksson" <[email protected]> wrote in message
>> >news:[email protected]...
>> >>
>> >> Configuration:
>> >>
>> >> - WLS 5.10 SP8
>> >> - Oracle 8.1.6
>> >> - TX DataSource connected to a Connection pool of oracle JDBC
>connections
>> >>
>> >> I have a stateless session with a method register() that performs three
>> >insert operations in the oracle database via a connection fetched from
>tha
>> >TX Datasource object.
>> >>
>> >> The method register has been marked with the transaction attribute
>> >required.
>> >>
>> >> I recieve a SQLException from Oracle when trying to insert in one of
>the
>> >three tables and want to rollback the transaction.
>> >>
>> >>
>> >> I have tried to use setRollBackOnly(), throw an EJB exception
>> >> and i get the following message from WLS:
>> >>
>> >>
>> >> java.sql.SQLException: ORA-00001: unique constraint
>> >(ISACOWN.UK_ISIS_REFERENCE2) violated
>> >>
>> >> at
>> >oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
>> >> at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java,
>> >Compiled Code)
>> >> at oracle.jdbc.oci8.OCIDBAccess.executeFetch(OCIDBAccess.java,
>> >Compiled Code)
>> >> at
>> >oracle.jdbc.oci8.OCIDBAccess.parseExecuteFetch(OCIDBAccess.java:1235)
>> >> at
>> >oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java,
>> >Compiled Code)
>> >> at
>>
>>oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1232
>)
>> >> at
>>
>>oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.java:
>1
>> >353)
>> >> at
>> >oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java,
>Compiled
>> >Code)
>> >> at
>>
>>oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.jav
>a
>> >, Compiled Code)
>> >> at
>>
>>oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStat
>e
>> >ment.java, Compiled Code)
>> >> at
>>
>>weblogic.jdbc20.pool.PreparedStatement.executeUpdate(PreparedStatement.java
>:
>> >47)
>> >> at
>>
>>weblogic.jdbc20.rmi.internal.PreparedStatementImpl.executeUpdate(PreparedSt
>a
>> >tementImpl.java:54)
>> >> at
>>
>>weblogic.jdbc20.rmi.SerialPreparedStatement.executeUpdate(SerialPreparedSta
>t
>> >ement.java:55)
>> >> at net.astrazeneca.cmi.data.Crud.execDML(Crud.java:283)
>> >> at
>>
>>net.astrazeneca.cmi.data.dao.MolStructDAO.insertIsisRef(MolStructDAO.java:1
>3
>> >6)
>> >> at
>> >net.astrazeneca.cmi.data.dao.MolStructDAO.insert(MolStructDAO.java,
>Compiled
>> >Code)
>> >> at
>>
>>net.astrazeneca.cmi.data.dataservice.MolStructureDS.register(MolStructureDS
>..
>> >java, Compiled Code)
>> >> at
>>
>>net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl.register(MolStruc
>t
>> >ureDSEOImpl.java, Compiled Code)
>> >> at
>>
>>net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl_WLSkel.invoke(Mol
>S
>> >tructureDSEOImpl_WLSkel.java, Compiled Code)
>> >> at
>>
>>weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAd
>a
>> >pter.java, Compiled Code)
>> >> at
>>
>>weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandl
>e
>> >r.java, Compiled Code)
>> >> at
>>
>>weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java,
>> >Compiled Code)
>> >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,
>Compiled
>> >Code)
>> >> ti jan 23 11:12:20 GMT+01:00 2001:<I> <EJB JAR deployment
>> >F:\Projects\MolStructureDS\MolStructureDS.jar> Transaction:
>> >'980237619834_1326' rolled back
>> >> due to EJB exception:
>> >> javax.ejb.EJBException
>> >> at
>>
>>net.astrazeneca.cmi.data.dataservice.MolStructureDS.register(MolStructureDS
>..
>> >java, Compiled Code)
>> >>
>> >> Anybody got an idea ? at
>>
>>net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl.register(MolStruc
>t
>> >ureDSEOImpl.java, Compiled Code)
>> >> at
>>
>>net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl_WLSkel.invoke(Mol
>S
>> >tructureDSEOImpl_WLSkel.java, Compiled Code)
>> >> at
>>
>>weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAd
>a
>> >pter.java, Compiled Code)
>> >> at
>>
>>weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandl
>e
>> >r.java, Compiled Code)
>> >> at
>>
>>weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java,
>> >Compiled Code)
>> >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,
>Compiled
>> >Code)
>> >>
>> >> ti jan 23 11:12:20 GMT+01:00 2001:<E> <Adapter> Exception thrown by
>rmi
>> >server:
>> >[-3565031217135527434S157.96.215.53:[7001,7001,7002,7002,7001,-1]/466]
>> >>
>> >> javax.ejb.EJBException
>> >> at
>>
>>net.astrazeneca.cmi.data.dataservice.MolStructureDS.register(MolStructureDS
>..
>> >java, Compiled Code)
>> >> at
>>
>>net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl.register(MolStruc
>t
>> >ureDSEOImpl.java, Compiled Code)
>> >> at
>>
>>net.astrazeneca.cmi.data.dataservice.MolStructureDSEOImpl_WLSkel.invoke(Mol
>S
>> >tructureDSEOImpl_WLSkel.java, Compiled Code)
>> >> at
>>
>>weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAd
>a
>> >pter.java, Compiled Code)
>> >> at
>>
>>weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandl
>e
>> >r.java, Compiled Code)
>> >> at
>>
>>weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java,
>> >Compiled Code)
>> >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,
>Compiled
>> >Code)
>> >>
>> >>
>> >>
>> >> No matter what I have tried so far the two inserts that are OK are
>> >commited in Oracle. What I want is to make all three inserts in the
>> >transaction rolled back.
>> >>
>> >> Anybody got an idea ?
>> >
>> >
>>
>
>
-
ORA-25402: transaction must roll back
I found this problem.ORA-25402: transaction must roll back
Please introduce , how resolve problem?
what view ? I'll able check for this problem.If you had a network problem it is unlikely that the client would still be connected and able to issue a rollback. I have seen this message but I cannot remember what the situation is when it occurs. What Oracle wants is for the client to issue an explicit rollback statement.
There is a bug that produces this error unfortunately the OP did not include their Oracle version. The bug could be in all versions from 8 - 9.2.0.3 but is only confirmed to be in 9.2.0.3 where after Transaction Failover a commit or rollback incorrectly produces this error. According to the note a Select should produce this error. This would need to be a RAC system that uses transaction failover for this to apply: Note:2652886.8 Also TAF problem: Note:2652845.8
But it seems to me you can get this error on a distributed transaction. Oracle wants the client to issue an explicit rollback so that all parties to the distributed transaction rollback. If the application terminates due to the error then RECO will rollback the transaction. If the application issues the rollback it can then continue with additional (or retry) distributed queries.
HTH -- Mark D Powell -- -
How to send payload to error queue if the transaction is rolled back.
Hey,
If we get a error then the transaction needs to be rolled back. I need to send the input payload to a errored Queue if the transaction is roled back (not to the actual Queue from which input payload is consumed). Can any body tell how to do it.
Thanks,
Rakes.Hi Rakes,
When a transaction is rolled back, the message (input payload ) will roll back to the "exception queue" of the initial queue. You may think of it as an error bucket inside the JMS queue. AIA provides manual scripts to resumbit this message once error is fixed.
If you are using AQ, you could specify your own queue as exception queue. You could have a custom SQL solution to move messages from initial exception queue to your custom queue.
Regards
Rohit -
JTA transaction unexpectedly rolled back
I have a Spring Java web app deployed on OC4J 10.1.3.3 using Toplink as the container managed persistence. When my app is launched a named query is executed that uses JPQL to load up collections of objects. It is failing with the subject line exception.
org.springframework.transaction.UnexpectedRollbackException: JTA transaction unexpectedly rolled back (maybe due to a timeout); nested exception is javax.transaction.RollbackException: Timed out
If, however, I then modify the URL and force an action that will re-execute the same query, it works fine.
Any ideas on which configuration settings I should investigage/change to enable this to work the first time through?
I am not dealing with large collections here. At this point, there are 11 main objects that have children/parents. Re-execution of the query happens very fast.
Thank you!
GinniHello,
It sounds like its not the query itself that is taking too long, but all the processing done before the query in the same transaction scope. The error is that the transaction is timing out, so you should start by checking when the transaction is started and if the timeout value needs to be increased to cover the time this process is taking, or if the transaction can be made smaller or broken up into smaller peices. Or, if the query is just returning data that isn't going to be modified, if a transaction is required at all.
Best Regards,
Chris -
Set transaction use roll back segmet
Hi all:
I have lot of packages with the statement set transaction use roll back segment RBS_BIG.I am working on upgrade project and using undo tablespaces.
Is there a quick way to grep the this statement from all the packages and remove off.Does the presence of this statement in packages of new database cause compilation errors ?
Thanks,
GaneshHi,
Set init.ora parameter as follows and restart database. All SET TRANSACTION USE ROLLBACK SEGMENT statements will have no effect and ignored.
UNDO_SUPPRESS_ERRORS=TRUE
You may use ALTER SYSTEM rather than restart db. If your database use spfile.ora, you have to execute:
ALTER SYSTEM SET UNDO_SUPPRESS_ERRORS=TRUE SCOPE=BOTH;
Best regards,
Dima -
Hi all:
I have lot of packages with the statement set transaction use roll back segment RBS_BIG.I am working on upgrade project and using undo tablespaces.
Is there a quick way to grep the this statement from all the packages and remove off.Does the presence of this statement in packages of new database cause compilation errors ?
Thanks,
GaneshThe set transaction use rollback segment <rbsegment> is ignored in 10g. In 9i databases this could cause errors when using automatic undo management. For your 9i databases you can suppress the errors by setting UNDO_SUPPRESS_ERRORS=true.
-
ORA-02050 transaction string rolled back, some remote DBs may be in-doubt
Hi...guys...How ru all...
I got follwoing error...and I searched in google but there is not clear information..plz help me ...
Error Message: ORA-02050 transaction string rolled back, some remote DBs may be in-doubt
Error Cause:
Network or remote failure during a two-phase commit.
Action:
Notify operations; remote databases will automatically re-sync when the failure is repaired.
SQL>SELECT local_tran_id, global_tran_id, state, mixed, host, commit#
FROM dba_2pc_pending
LOCAL_TRAN_ID GLOBAL_TRAN_ID STATE MIX HOST COMMIT#
5.44.98254 JICRACDB.e1ab4089.5.44.98254 collecti no JICN\ROOM9 1132915640
ng 7-ITC
SQL> SELECT local_tran_id, in_out, database, dbuser_owner, interface
2 FROM dba_2pc_neighbors
3 /
LOCAL_TRAN_ID IN_OUT DATABASE DBUSER_OWNER INT
5.44.98254 in JIC N
5.44.98254 out RC_DBLINK JIC N
SQL> ;
1 select state, tran_comment, advice from dba_2pc_pending
2* where local_tran_id ='5.44.98254'
SQL> /
STATE TRAN_COMMENT ADVICE
collecting
so how can I delete distributed transaction..plz provide me any Metalink Docids.See if following MOS note helps.
Manually Resolving In-Doubt Transactions: Different Scenarios (Doc ID 126069.1) -
How to call a trigger when a transaction is rolled back
Situation:
Using a trigger to propogate changes from an Oracle8 DB to a remote non-Oracle database ( it may not even be a rational database etc.). The trigger is connecting to a external procedure to send the change to the remote "database" - all updates are to be replicated - inserts, deletes etc.
Problem:
If an update transaction is aborted in the Oracle database, after the trigger has been called but before the transaction is committed. The transaction is rolled back successfully in the Oracle database, but nothing happens to the remote "database". Therefore there is now an data inconsistency !
How can I ensure that the transaction rollback occurs in the remote database as well ? There is no transaction monitor between the two databases. Can I get the trigger to be called again ?
Any ideas, suggestions ??
Many thanks in advance,
ismonHi;
You may use costum trigger which can be run after AP_CHECKS_ALL table has record
Regard
Helios -
Stateless SessionBean Transaction not Rolling Back
I have a situation to create two Entity Beans within a single Transaction,
so I created a Session Bean to create the two Entity Beans.
I have the Session bean with attribute
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
And 2 Entity beans with attributes:
<persistence-type>Container</persistence-type>
<trans-attribute>Required</trans-attribute>
Inside the Session Bean I have a method which calls the create on the two
Entity Beans.
create ContactInfo(){
Phone ph = phoneHome.Create(phoneData);
Address ad = addressHome.Create(addressData);
When the secound bean fails to create (Key voilation), my transaction is not
getting rolled back.
The Phone Create did not roll back eventhough the address create failed.
Please give me some suggetion which transaction attributes to use
I am using Weblogic 6.0
For Create Exceptions , the transactions may or may not rollback. Mostly it
wont rollback. You have to set the sessionctx.setRollbackOnly() to mark it
for rollback in the catch block of the Create Exception.
Regards,
Swaminathan K.N.
santo comar <[email protected]> wrote in message
news:3b8dbb61$[email protected]..
> I have a situation to create two Entity Beans within a single Transaction,
> so I created a Session Bean to create the two Entity Beans.
>
> I have the Session bean with attribute
>
> <session-type>Stateless</session-type>
> <transaction-type>Container</transaction-type>
>
> And 2 Entity beans with attributes:
>
> <persistence-type>Container</persistence-type>
> <trans-attribute>Required</trans-attribute>
>
> Inside the Session Bean I have a method which calls the create on the two
> Entity Beans.
>
> create ContactInfo(){
> Phone ph = phoneHome.Create(phoneData);
> Address ad = addressHome.Create(addressData);
> }
>
> When the secound bean fails to create (Key voilation), my transaction is
not
> getting rolled back.
> The Phone Create did not roll back eventhough the address create failed.
> Please give me some suggetion which transaction attributes to use
>
> I am using Weblogic 6.0
>
>
>
-
Container transaction NOT rolled back after a long period of time.
Hi, I am using Weblogic 6.1SP5 on RedHat 7.1 and I have seen an unexpected
behaviour with an MDB and I would like to know if there is any circumstance
in which a transaction is not rolled back automatically by the container
after the transaction timeout specified on MDB descriptor expired.
The fact is I have seen a thread locked for 3 entire days without any
exception being raised (the trans timeout was set to 900 seconds for
debugging porpouses)
Sadly I didn't thought on issuing a ps -ax and a netstat -np in order to see
if there was any connection active for any of the JVM threads.
As an aside note I had to throw a kill -9 to Weblogic's JVM in order to
completely stop it because using the standard "stopWeblogic.sh" script it
got stalled.
The only unusual thing that I can think of the MDB is doing is opening a
connection against a remote system via a socket.
My question is. Is it possible that a thread locked on I/O (in this case a
socket) to be out of control in terms of throwing at it a "Transaction
rolled back exception"?
I have modified my code in order to set SO_TIMEOUT on the socket just in
case the other peer hangs and never returns control. But I would like to
know the problem could be there.
I know for sure that at the time the thread stalled the other peer died
(exceptions on other MDBs trying to connect to remote system) but I expected
a "socket exception" to be thrown by the O.S. to the stalled thread instead
of having the thread waiting forever on that "open" socket.
Thanks in advance.
Ignacio.
While a tramsaction may be rolled back at the transaction timeout,
the thread is not stopped. The actual exception won't occur until
the MDB completes. If the MDB doesn't complete (as in this case),
you won't get the exception.
"Ignacio G. Dupont" <[email protected]> wrote in message news:[email protected]...
> Hi, I am using Weblogic 6.1SP5 on RedHat 7.1 and I have seen an unexpected
> behaviour with an MDB and I would like to know if there is any circumstance
> in which a transaction is not rolled back automatically by the container
> after the transaction timeout specified on MDB descriptor expired.
>
> The fact is I have seen a thread locked for 3 entire days without any
> exception being raised (the trans timeout was set to 900 seconds for
> debugging porpouses)
>
> Sadly I didn't thought on issuing a ps -ax and a netstat -np in order to see
> if there was any connection active for any of the JVM threads.
>
> As an aside note I had to throw a kill -9 to Weblogic's JVM in order to
> completely stop it because using the standard "stopWeblogic.sh" script it
> got stalled.
>
> The only unusual thing that I can think of the MDB is doing is opening a
> connection against a remote system via a socket.
>
> My question is. Is it possible that a thread locked on I/O (in this case a
> socket) to be out of control in terms of throwing at it a "Transaction
> rolled back exception"?
>
> I have modified my code in order to set SO_TIMEOUT on the socket just in
> case the other peer hangs and never returns control. But I would like to
> know the problem could be there.
>
> I know for sure that at the time the thread stalled the other peer died
> (exceptions on other MDBs trying to connect to remote system) but I expected
> a "socket exception" to be thrown by the O.S. to the stalled thread instead
> of having the thread waiting forever on that "open" socket.
>
> Thanks in advance.
>
> Ignacio.
>
>
-
Transaction not rolling back in stateless session bean
Hi,
I am facing a problem...
I have one stateless session bean which does multiple updates in SYBASE database.I
am using non-transactional datasource. Bean calls a method of data access obejct
whcih internally calls more than one one mehtod to update different tables.If
any of update fails then I am explicitly thorwing EJBException. Still it is not
rolling back.
I have one more application where similar situation is there but only difference
is that there we have Entity bean and updates are being done through store method.
In that case with same datasource it is rolling back perfectly.
I have tried with transactional datasource as well but it didn't work.Then I tried
to put setAutoCommit(false) in my connection class which gives me connection.But
then it is not allowing me to enter into my application.
In deployment descriptor for both the beans transaction attribute is required
for all methods.
Regards.
Rahul.
Hi,
I am facing a problem...
I have one stateless session bean which does multiple updates in SYBASE database.I
am using non-transactional datasource. Bean calls a method of data access obejct
whcih internally calls more than one one mehtod to update different tables.If
any of update fails then I am explicitly thorwing EJBException. Still it is not
rolling back.
I have one more application where similar situation is there but only difference
is that there we have Entity bean and updates are being done through store method.
In that case with same datasource it is rolling back perfectly.
I have tried with transactional datasource as well but it didn't work.Then I tried
to put setAutoCommit(false) in my connection class which gives me connection.But
then it is not allowing me to enter into my application.
In deployment descriptor for both the beans transaction attribute is required
for all methods.
Regards.
Rahul.
-
Hi,
In my stateless session bean , I am calling a function which
inserts two records in the db. I am failing the second insert ,
so the previous insert should also fail. But its not happening.
I am working on WL6.1. Using datasource.
When in my code, if I say connection.setAutoCommit(false) then
it is showing me the right behaviour even if the db server have
this option disabled already. I am using Oracle thin driver.
What I am doing wrong ?
Thanks
AshwaniOk, Thanks all for your replies
Ashwani
"Raj" <[email protected]> wrote:
>
Yes, instaed of using a DAtaSource in ur config files, create a TxDatasource
and use it.
"Ashwani Kalra" <[email protected]> wrote:
"Emmanuel Proulx" <[email protected]> wrote:
Are you using a TXDataSource?
Emmanuel
"Ashwani Kalra" <[email protected]> wrote in message
news:3d1159ed$[email protected]..
Hi,
In my stateless session bean , I am calling a function which
inserts two records in the db. I am failing the second insert ,
so the previous insert should also fail. But its not happening.
I am working on WL6.1. Using datasource.
When in my code, if I say connection.setAutoCommit(false) then
it is showing me the right behaviour even if the db server have
this option disabled already. I am using Oracle thin driver.
What I am doing wrong ?
Thanks
Ashwani
No, It means if I am using normal datasource then, I have to handle itin
my code.
Cant I set this at configuration time.
Thanks
Ashwani -
Rolled back JTA TX marked active/inflight
Hello. I am writing a message driven bean that utilizes container managed transaction
demarcation for the onMessage method (letting the container worry about msg acknowledgement).
The MDB relays message information to a legacy system. If the legacy system is
down, I want to retry message delivery at a later point, so I mark the current
transaction as rolled back (via the setRollbackOnly() method in my MessageDrivenContext).
This causes the EJB container to continually call onMessage() with my message
beans, creating a large amount of rolled back exceptions. These rolled back transactions,
however, are marked as active/inflight by the WLS transaction manager, leading
to resource starvation and inability to create transactions because of an overflow
of the "Active Transaction" watermark (configurable in mydomain->JTA->Active Transactions),
although the JTA monitoring tools clearly indicate that the TX has been rolled
back.
Eventually these "rolled back exceptions" are purged from the Inflight Transaction
list, and I can once again create transactions. Any ideas on how to fix this/workarounds/bugfixes?
Please cc: me if you respond as well
Thanks,
Alex
---- snippets follow ----
Here is a snippet from the mydomain->myserver->Monitoring->JTA->Inflight Transactions
page
Name Status Servers Resources Properties
(key=value)
(none) Rolled back. [Reason = weblogic.transaction.internal.AppSetRollbackOnlyException]
alexd {JMS_jmsStoreTest=rolledback} (none)
And a listing of the JTA monitoring info
Total Transactions: 45060
Total Committed: 131
Total Rolled Back: 44929
Timeout Rollbacks: 0
Resource Rollbacks: 0
Application Rollbacks: 44929
I know this is fixed in WLS 6.1's GA release. Basically, the problem is
that the EJB container is marking the transaction for rollback where it
should be rolling it back. That's why you have so many tx's in-flight.
They are waiting to time-out.
-- Rob
Alex DeNeui wrote:
>
> Hello. I am writing a message driven bean that utilizes container managed transaction
> demarcation for the onMessage method (letting the container worry about msg acknowledgement).
>
> The MDB relays message information to a legacy system. If the legacy system is
> down, I want to retry message delivery at a later point, so I mark the current
> transaction as rolled back (via the setRollbackOnly() method in my MessageDrivenContext).
> This causes the EJB container to continually call onMessage() with my message
> beans, creating a large amount of rolled back exceptions. These rolled back transactions,
> however, are marked as active/inflight by the WLS transaction manager, leading
> to resource starvation and inability to create transactions because of an overflow
> of the "Active Transaction" watermark (configurable in mydomain->JTA->Active Transactions),
> although the JTA monitoring tools clearly indicate that the TX has been rolled
> back.
>
> Eventually these "rolled back exceptions" are purged from the Inflight Transaction
> list, and I can once again create transactions. Any ideas on how to fix this/workarounds/bugfixes?
>
> Please cc: me if you respond as well
>
> Thanks,
> Alex
>
> ---- snippets follow ----
>
> Here is a snippet from the mydomain->myserver->Monitoring->JTA->Inflight Transactions
> page
> -----------------
> Name Status Servers Resources Properties
> (key=value)
> (none) Rolled back. [Reason = weblogic.transaction.internal.AppSetRollbackOnlyException]
> alexd {JMS_jmsStoreTest=rolledback} (none)
> -----------------
>
> And a listing of the JTA monitoring info
> -----------------
> Total Transactions: 45060
> Total Committed: 131
> Total Rolled Back: 44929
> Timeout Rollbacks: 0
> Resource Rollbacks: 0
> Application Rollbacks: 44929
> ------------------
Coming Soon: Building J2EE Applications & BEA WebLogic Server
by Michael Girdley, Rob Woollen, and Sandra Emerson
http://learnweblogic.com
-
Avoid transaction roll back using exception handler
Hi everybody!
I've created a proxy service in OSB using a DB adapter for polling from a database table. I've configured the service to be transactional with same transaction for reponse. The proxy has a route node that routes to a business service created from a db adapter for storing the polled data. Insert table has a db trigger associated wich raises a custom exception in certain cases. I need to catch that exception in the route exception handler to avoid the full transaction to be marked rolled back. For this, I've setup a response with failure action in the handler.
After testing the service I realized that it's not working as expected as transaction is being rolled back when the trigger raises the exception (so registry is not marked as polled in source table).
Could anyone explain me which action should be taken to avoid a rollback when handling exception?
Best regards,
Daniel.Hi Athhek,
If I set reply with success then both route node and system error handlers are executed. I get following response metadata
<con:metadata xmlns:con="http://www.bea.com/wli/sb/test/config">
<tran:response-code xmlns:tran="http://www.bea.com/wli/sb/transports">1</tran:response-code>
</con:metadata>
and also following error reaches system handler:
<con:fault xmlns:con="http://www.bea.com/wli/sb/context">
<con:errorCode>BEA-382050</con:errorCode>
<con:reason>
Expected active transaction, actual transaction status: Marked Rollback
</con:reason>
<con:location>
<con:path>response-pipeline</con:path>
</con:location>
</con:fault>
When I set reply with error only route node handler is executed but I still get
<con:metadata xmlns:con="http://www.bea.com/wli/sb/test/config">
<tran:response-code xmlns:tran="http://www.bea.com/wli/sb/transports">1</tran:response-code>
</con:metadata>
Thank you.
Maybe you are looking for
-
Table Required to trace Confirmation of EBP based on Material Doc inR3
Hi, can any one suggest the procedure to get the confirmation of EBP in R3 by giving the input parameter as Material document(GR). i can find through Query also let me know the procedure regards subhash
-
Urgent! Application tier and Data tier on different platforms
Hello! I would be very grateful if someone confirms that the deployment of the Beehive, where Application tier and Data tier are placed on different platforms, is supported. For example, Oracle Database (Data tier) on Linux, and Oracle Application Se
-
Price is not changing in sales order in line item
dear all., price is not changing in sales order on line item,error comes "CHECK ORDER STRUCTURE. Regards, Praveen
-
I bought a Z22 that I used for my dell/ windows. I now have an imac and wondering how use the Z22 with the imac. I did not receive a download disc with the Z22 and paid to have a computer person to do work on my dell and he loaded the Z22 to the
-
Missing Deployment context in Ear deployment
I am using JDev 10.1.3.3 and I am missing the context root when trying to deloy to ear file. Can anyone help me?