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!
Ginni

Hello,
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

Similar Messages

  • 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

  • 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

  • Transaction not rolled back

              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 ?
              >> >
              >> >
              >>
              >
              >
              

  • 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,
    Ganesh

    Hi,
    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

  • Set transaction use roll back

    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,
    Ganesh

    The 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)

  • 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 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,
    ismon

    Hi;
    You may use costum trigger which can be run after AP_CHECKS_ALL table has record
    Regard
    Helios

  • 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.
              >
              >
              

  • JTA succeeds, database rolls back?

    Hi All,
         I am using a stateless session bean (EJB) to interact with eight
    stored procedures under a container managed transaction. The issue is
    the database is rolling back but not reporting it's error to the JTA.
    The result, the application informs the user that the operation was
    successful and the database does not record the data.
    Side notes:
    1. The public method called on the EJB is not set to be transactional
    , a private method which is called by the public method is.
    2. The transaction level of the private method on the EJB is set to
    "REQUIRED"
    3. The database rollback happens sporadically the majority of the
    transactions write data to the database successfully
    4. I am having difficulty reproducing the rollback in test
    5. During testing I am forcing the transaction to fail by changing
    stored procedures, and changing row level permission. Both worked
    fine. The stored procedure throws an exception which triggers the JTA
    and reported a error back to the user.
    6.     Stored procedures are not explicitly calling RAISE EXCEPTION
    My guess is it has something to do with SQL Server and its
    communication with the JTA. Ether on the JTA level, JDBC Driver Level
    or the SQL server itself.
    Environment: WebLogic 6.1, MS SQL Server 7, Type 4 WebLogic SQL Server
    7 JDBC Drivers, all Running on windows NT 4.0
         Any help would be greatly appreciated
         Thanks in advance
         James Nordstrom

    Hi Cameron,
    &#8220;Do your sp's rollback or commit or manipulate @@trancount in any way
    including setting savepoints etc. ???          We are seeing a lot of &#8220;if(@@transcount > 0) rollack
    transaction set implicit_transactions off WebLogic JDBC Driver&#8221;
         According to our DBA the stored procedure do not handle the
    transaction, so they do not have an explicit rollback or commit or
    manipulate status, please correct us if we are wrong.
         Could you please clarify the term &#8220;savepoints &#8220; then I
    can speak intelligently to the DBA.
         Thanks in advance.
         James Nordstrom
    "Cameron Purdy" <[email protected]> wrote in message news:<[email protected]>...
    Do your sp's rollback or commit or manipulate @@trancount in any way
    including setting savepoints etc. ???
    Peace,
    Cameron Purdy
    Tangosol Inc.
    << Tangosol Server: How Weblogic applications are customized >>
    << Download now from http://www.tangosol.com/download.jsp >>
    "James Nordstrom" <[email protected]> wrote in message
    news:[email protected]...
    Hi All,
    I am using a stateless session bean (EJB) to interact with eight
    stored procedures under a container managed transaction. The issue is
    the database is rolling back but not reporting it's error to the JTA.
    The result, the application informs the user that the operation was
    successful and the database does not record the data.
    Side notes:
    1. The public method called on the EJB is not set to be transactional
    , a private method which is called by the public method is.
    2. The transaction level of the private method on the EJB is set to
    "REQUIRED"
    3. The database rollback happens sporadically the majority of the
    transactions write data to the database successfully
    4. I am having difficulty reproducing the rollback in test
    5. During testing I am forcing the transaction to fail by changing
    stored procedures, and changing row level permission. Both worked
    fine. The stored procedure throws an exception which triggers the JTA
    and reported a error back to the user.
    6. Stored procedures are not explicitly calling RAISE EXCEPTION
    My guess is it has something to do with SQL Server and its
    communication with the JTA. Ether on the JTA level, JDBC Driver Level
    or the SQL server itself.
    Environment: WebLogic 6.1, MS SQL Server 7, Type 4 WebLogic SQL Server
    7 JDBC Drivers, all Running on windows NT 4.0
    Any help would be greatly appreciated
    Thanks in advance
    James Nordstrom

  • 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.
              

  • 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
              >
              >
              >
              

  • Transaction not rolling back

    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

    Ok, 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

  • Transaction - the subprocess rolling back parent JTA

    According to Oracle documentation,
    "if the caller partner link specifies transaction=participate and the subprocess also specifies transaction=participate, the subprocess rolls back the client JTA transaction."
    But what I experience is if I just set transaction=participate for the partner link alone (and not having transaction=participate in the subprocess), when the subprocess rolls back, it rolls back parent JTA transaction also.
    In fact, if we have just transaction=participate for the partner link (and not having transaction=participate in the subprocess), then the rollback in either Parent or Subprocess, is rolling back both Parent and Subprocess.
    Can somebody provide the exact usage of using transaction=participate at the subprocess level?
    Thanks,
    Joe

    Joe,
    You are seeing expected behaviour. Even though both flags are called "transaction" and both are set to "participate", they do different things.
    By specifying transaction=participate on the partner link, you are instructing the subprocess to enlist in the transaction. When the subprocess starts, it will then enlist itself. That's all. Now if a rollback occurs, all participating processes will be rolled back.
    If you specify transaction=participate at the process level, it has a different effect, and doesn't affect whether or not the transaction is rolled back or not. As I said in the previous paragraph, if the partner link specified transaction=participate, the subprocess will roll back if a rollback is issued, no matter what other settings you have.
    So what effect does that setting have at the process level? According to the doc:
    When transaction=participate, the process produces a fault that is not handled by fault handlers, which calls the transaction to be rolled back.
    This is not exactly crystal clear, to me, anyway. In practice if this is set and your subprocess throws an unhandled fault, it triggers a rollback instead of throwing a fault as it normally would. This exception goes immediately back to the calling process since it is participating on the transaction as well.
    If the property is not set, and the subprocess throws an unhandled fault, you get the normal behavior. Namely, the process will be flagged as faulted, and the calling process will wait until it gets a transaction timeout (no relation to the JTA transaction we're talking about here).
    It's a simple test. Create two processes, then run it twice. Once with that property set, and one without.
    The key is to remember that although they are both called "transaction=participate", the effect they have is very different. It was probably not a good move to use the same name and value like that. Hope this helps.
    Regards,
    Robin.

Maybe you are looking for

  • How do I set the font in firefox 4.0 using ubuntu?

    The zoom feature is OK but I want to permanently set the font size on my firefox pages using the Ubuntu operating system. I don't see anything under Tools and there doesn't seem to be a lot of questions previously asked in the Help area about Firefox

  • File Split based on Condition

    Hello I have a scenario where I get a file and need to split it into two based on a condition. Is it possible to accomplish this scenario at the file adapter configuration or do I need a mapping for this. Sample File  ABC1234asdfasfasdfasdfsdfasdfsdf

  • T420s battery being discharges even when laptop is closed

    So my T420s, even when I close the lid the battery still discharges. I talked to Lenovo help and they said it was the battery but I bought a new one and the problem is still exactly the same. Please help me! Any ideas what to do?

  • How do I include stock market index on webpage?

    Hi, My client wants a webpage that has the index numbers of the Ney York stock Exchange, the DOW, The Nikkei, several European Stock Market Index, etc. Can anyone point me to a service that supplies this for a website? I expect there are apps/scripts

  • Airport Extreme and USB printer

    This past week upgraded my home system to Verizon's FIOS--new router, wiring, etc. Got the Airport up and running without too many glitches. I did have to unplug it a few times in the process. But now I find the Airport no longer sees my Lexmark C510