Weblogic always emits COMMIT or ROLLBACK?

weblogic 5.1sp11
Oracle 8.1.7
Oracle type 2 driver
Windows 2000
At the closing of a database transaction (even an implied transaction, like
a single SELECT), does Weblogic issue a COMMIT (or ROLLBACK if necessary)
EVERY TIME?
Our Oracle database connects using dblinks to a DB2 database. If we perform
a select across that DB2 link, but don't issue a COMMIT, then the
Oracle-managed DB2 connection goes corrupt.
Is there a way to configure Weblogic to always issue either a COMMIT or
ROLLBACK?
Thanks,
j

Jason Collins wrote:
weblogic 5.1sp11
Oracle 8.1.7
Oracle type 2 driver
Windows 2000
At the closing of a database transaction (even an implied transaction, like
a single SELECT), does Weblogic issue a COMMIT (or ROLLBACK if necessary)
EVERY TIME?No, nor is that even part of the JDBC spec. If the JDBC connection is in it's
default state (autoCommit(true)), then the DBMS assumes all responsibility
for the 'commit' of every SQL statement executed by any client, including the
jdbc driver. Ie, whenever a JDBC SQL statement is executed, the DBMS is
expected to obtain the locks needed to do the SQL, do the SQL, then release
those locks automatically. If you are doing something with your SQL that accesses
another DBMS that is in autoCommit(false) mode, it will be your responsibillity to
issue the SQL to that remote DBMS to release whatever locks it holds when you
want. Even if you were to issue a commit() on the JDBC connection, especially if the
connection is in autoCommit(true) mode, I doubt that it would propagate to a remote
DBMS.
Joe
>
>
Our Oracle database connects using dblinks to a DB2 database. If we perform
a select across that DB2 link, but don't issue a COMMIT, then the
Oracle-managed DB2 connection goes corrupt.
Is there a way to configure Weblogic to always issue either a COMMIT or
ROLLBACK?
Thanks,
j

Similar Messages

  • Commit and rollback on session level

    Hi All,
    I am calling one stored procedure and I am doing some dml operation in that sp. there after I calling another sp which contain some ddl operations. if process may be fail in somewhere I wanted to rollback all dml transactions.
    So I wanted to commit and rollback on session level. Is such kind of concept available in oracle.
    Prashant.

    Prashant,
    Not sure what you are talking about.
    Commit and rollback is always on session level!!!!
    Also all DDL statements are automatically committed, and rollback in case of errors is always statement level rollback.
    So let's assume
    begin
    insert into foo...;
    update foo...;
    execute immediate 'alter table foo add (last_update date)';
    end;
    exit
    and the alter table fails:
    1 alter table is rolled back
    2 insert and updates are not rolled back.
    If the alter table succeeds
    all statements are committed and you can't roll them back anymore.
    This is why issuing DDL in stored procedures has unwanted side effects and should be conisdered pure evil.
    Sybrand Bakker
    Senior Oracle DBA
    Experts: those who did read the documentation.

  • ORA-14552: cannot perform a DDL, commit or rollback inside a query or DML;;

    Hi all,
    I have a problem!
    I have one PL SQL function doing an Update and insert into some oracle tables, this function return one number (0 or 1 or 2).
    I'm excuting this query from one PHP program to call the function :
    SELECT SALE.DB_FUNC_ASSOCIATE_TB2U('[email protected]',123)
    FROM dual;
    the problem that I have these errors :
    ERROR DB_FUNC_ASSOCIATE_TB2U Level 1 : ORA-01403: no data found
    ERROR DB_FUNC_ASSOCIATE_TB2U : ORA-14552: cannot perform a DDL, commit or rollback inside a query or DML
    there's a mean that i can do to call this function from PHP without getting this Error such as I tested this function using the script below and it works fine:
    declare
    a number;
    begin
    a:= SALE.DB_FUNC_ASSOCIATE_TB2U('[email protected]',123) ;
    end;
    Please help me :)
    regards,

    Sure, it works in the sense that you would no longer get an error.
    Creating this as an autonomous transaction, however, is going to blow your transactional integrity. You've now got code that is being called as the result of a SELECT operation (something that everyone that comes after you will assume is read-only) that commits outside of the current transaction scope. That is almost always a bad thing.
    In addition, having a WHEN OTHERS without a RAISE is almost always a bug. You're completely hiding the error message plus you're discarding proper exception handling in order to provide a return code and assuming that the caller is going to check the status. Relying on return status codes is normally a bad idea because it's very easy on the client side to forget to check the return code. Even if the client were to check the return code, it has no idea what went wrong, so it can't even log the root cause of the error.
    Justin

  • How to use commit and rollback transaction if my i am using MS Access as a

    as per my knowledge the transactions commit and rollback is not work if my data base is MS Access then plz give me the logic how i used these transaction with MS Access.
    waiting for response
    plz mail ur respose if possible at [email protected]

    Same as every other relational database you can connect to with JDBC.
    try
        connection.setAutoCommit(false);
         // Perform your unit of work here
         connection.commit();
    catch (SQLException e)
        connection.rollback();
         e.printStackTrace();
    finally
        try { if (connection != null) connection.close(); } catch (SQLException ignore) {}
    }%

  • Cannot commit or rollback  a JDBC Connection from CAF project

    Hi Everybody,
    I'm working in CE 7.10. I have a CAF Project that gets a JDBC connection from a Custom Datasource to an external Database.
    Here is the code:
      try
        Context ctx = new InitialContext();
        DataSource ds = (DataSource) ctx.lookup("jdbc/MYDATABASE");               
        con = ds.getConnection();
        con.setAutoCommit(false);
        Statement statement = con.createStatement();
        String updateStatement = "UPDATE TABLE...";
        statement.executeUpdate(updateStatement);
        con.commit();
        catch(SQLException sqle){
             con.rollback();
    I got the following exception on line "con.setAutoCommit(false);":  --> "Cannot begin JDBC transaction from this connection of "MYDATABASE" DataSource. JTA transaction has already started."
    and the following on line "con.commit() / con.rollback()" : --> "Cannot commit JDBC transaction from this connection of "MYDATABASE" DataSource. This resource participates in a JTA transaction."
    If I run the same code from a webDynpro or a J2EE project it works ok, but not from a CAF Application Service. I tried to do it in a simple Class in the CAF Project and call this clas from the Application service, but I get the same error.
    Any Ideas??
    Thanks a lot!
    Regards.

    Solved with   "SessionContext.setRollbackOnly()" instruccion.
    Regards.

  • How to use COMMIT and ROLLBACK in BAPIs

    Hi experts,
        Can we use COMMIT or ROLLBACK in the BAPI just like how we implement it in the ABAP programming ?? If it is yes,
        Where can we exactly use normal COMMIT and where we use BAPI_TRANSACTION_COMMIT when we are implementing BAPIs ?
    Please clarify this. Any reply is really appreciated !!
    Thank you in advance.

    Hi
    see commit is the thing which saves the changes you made to the
    database otherwise imean if u have not done the commit work what
    happens is the changes will be killed once the your program life has
    been killed i think you got why we will do commit work
    BAPI's are the methods through which we can input the data i mean it
    is an interface technique it is a direct input method.
    for example you have inserted some data into one table by using this
    BAPI technique but you not done the Commit BAPI then wht happens is
    the changes u made to the database cannot been seen in the table these
    will get effective once u have Done the Commit BAPI
    i think i am clear to u
    Rollback
    see by taking the above example only we can know wht is Rollback it is nothing but UNDO option in ms office se untill saving if we want one step back we will do it by undo option am i right similalry untill commit ing i.e. nothing until saving the changes made u can delete the modified change i.e. u can go to the stage how it was previously ok
    i think u got me
    plzz reward if i am clear to u.......
    see once u have done commit u cant rollback
    same as once  u saved one document u cant undo the document changes i think u got me
    Thanks and regards
    plzz dont forget to reward if i am useful....
    u can contact me as my details are in my business card if u want any further clarification....

  • ORA-20001: Oracle error -20001: ORA-20001: Oracle error -14552: ORA-14552: cannot perform a DDL, commit or rollback inside a query or DML has been detected in fnd_global.set_nls.set_parameter('NLS_LANGUAGE','AMERICAN'). has been detected in fnd_global.set

    ORA-20001: Oracle error -20001: ORA-20001: Oracle error -14552: ORA-14552: cannot perform a DDL, commit or rollback inside a query or DML has been detected in fnd_global.set_nls.set_parameter('NLS_LANGUAGE','AMERICAN'). has been detected in fnd_global.set_nls.
    this error generates everytime when i run a apex application
    i did call the package in session state with  dbms_session.set_nls('NLS_LANGUAGE','AMERICAN'); but still it shows the error in the report any solution please

    Hi Amrit
    Can you put the FND_GLOBAL calls in a pre map trigger/process rather than as part of the map?
    Cheers
    David

  • Weblogic Two Phase commit

    Dears,
    we are facing slowness problem while migration application from weblogic 7 to weblogic 11g.
    Our Application use EJB 2.1 CMP and oracle database
    In web-logic 7 we use global transaction and emulate two phase commit .Our application works fine
    If we set global transaction as last logging resource or Emulate two phase commit in weblogic 11g we found so much slowness in the application.
    Kindly help me in this regard

    Hi,
              Jolt is just a Java client API for Tuxedo services. Typically, Jolt is
              used by a client to invoke a Tuxedo service. From what I could gather
              from your post, you are probably doing some JDBC work and then calling
              out to a Tuxedo service and want the work done with the JDBC/XA driver
              and the database work done by the Tuxedo service to be comitted/aborted
              transactionally? Is this correct?
              If so, then you probably want to look at the JET API (essentially Jolt
              without the need for a JSL/JSH) for invoking Tuxedo services directly
              (instead of through the JSH) from a WLE Java Server. It should be fully
              capable of doing what I have described above.
              Hope this helps,
              Robert
              Hwa Min Tan wrote:
              > I have read that the WLE 5.1 supports the Open XA standard for
              > two-phase (distributed) commits.
              > However, I have been unable to find any documentation / code
              > samples that demonstrates that JOLT is also able to perform
              > two-phase commits, even though its architecture is
              > inherently Tuxedo.
              > We'd like to use two-phase commit on two separate databases
              > (one connected by Jolt and another using the WLE JDBC/XA driver.
              >
              > Does Jolt support two-phase commit and the Open XA standard?
              >
              > Many thanks for your help,
              >
              > Hwa Min
              

  • Commit or Rollback?

              Hi,
              I have a stateful session bean that references an XA capable resource adapter.
              All the methods on the session bean have trans-attribute of Required. Whenever
              a method is invoked, WLS will start an XA transaction by calling XAResource.start().
              When the method returns, WLS calls XAResource.commit(). But when the method throws
              an exception, WLS still calls XAResource.commit(). Shouldn't it call XAResource.rollback()
              instead? Does it matter what kind of exception was thrown?
              Thank you.
              Yongtao You
              [email protected]
              

    Dear Yongtao,
              I believe you need to use the EJBContext::setRollbackOnly() method to
              instruct the container to rollback the transaction vs. relying on an
              exception-based mechanism.
              Best regards,
              Timothy Potter
              Senior Software Engineer
              eCommerce Server Division
              BEA Systems, Inc.
              "Yongtao You" <[email protected]> wrote in message
              news:[email protected]..
              >
              > Hi,
              >
              > I have a stateful session bean that references an XA capable resource
              adapter.
              > All the methods on the session bean have trans-attribute of Required.
              Whenever
              > a method is invoked, WLS will start an XA transaction by calling
              XAResource.start().
              > When the method returns, WLS calls XAResource.commit(). But when the
              method throws
              > an exception, WLS still calls XAResource.commit(). Shouldn't it call
              XAResource.rollback()
              > instead? Does it matter what kind of exception was thrown?
              >
              > Thank you.
              >
              > Yongtao You
              > [email protected]
              >
              

  • Row selection in adf table issue after commit or rollback

    Using jdev 11g (11.1.1.62)
    I have a adf table with multi select enabled. There is a child table bounded at BC4J level via a VL
    On the rowSelectionListener I attached a bean method. This bean method bascially finds the selected row from UI and then based on it query the child vo again and then finally refreshes the child table.
    This works fine as expected.
    However, what happens is when the Cancel button is called on UI which is bound to a rollback action in the AMImpl then the UI refreshes. And the master table still shows the previously selected row but the child VO shows the rows of the first master VO row rather the selected one.
    How to fix this? Further as old row is already selected in the master table so reclicking on the same row does nothing,

    just to update after the rollback is called in the cancel button i wrote following code which does not change the row focus to the first row
    DCBindingContainer bc =
    (DCBindingContainer)BindingUtils.getBindingContext().getCurrentBindingsEntry();
    DCIteratorBinding profItr =
    bc.findIteratorBinding("ProfileSearchInstIterator");
    Row cRow = profItr.getRowAtRangeIndex(0);
    if(cRow != null){
    System.out.println("Current row is not null so fixed ");
    profItr.setCurrentRowIndexInRange(0);
    RowKeySetImpl rks = new RowKeySetImpl();
    ArrayList keyList = new ArrayList();
    keyList.add(cRow.getKey());
    rks.add(keyList);
    profileTable.setSelectedRowKeys(rks);
    AdfFacesContext.getCurrentInstance().addPartialTarget(profileTable);
    }

  • I need a trigger that only fires on commit or rollback

    I have an after-update trigger that kicks off a java stored procedure. The jsp communicates with an external system. Problem is that the trigger (and thus the external communication) takes place when the data in question is updated. If I rollback the data changes now I have communicated the database event to the external system in question even though the triggering 'event' has been voided.
    It should be possible, if I could detect when a transaction is rolled back, to resend a communication to the external system that would in effect 'rollback' the communicated event.
    Ideas?

    If I understand you right you want to get a signal when the transaction is commited.
    look and dbms_alert and/or AQ

  • Managing commit and rollback via XSU

    Hi there
    I am using the XSU for Java version 8.1.7. on an Oracle 8.1.7 database.
    I am managing updates on multiple tables from a single XML document, by splitting the XML into sections and calling insertXML, updateXML and deleteXML for each table requiring changes.
    I would like to know how I can manage any commits on the database, so that the whole batch may be rolled back if some data is not committed. Is there a call in the XSU to handle this, or should it be done on the JDBC connection? I have looked at the setBatchSize and setCommitBatch functions, but they seem to be dependent on the number of rows of XML being processed, and I just want to commit after all calls to the XSU have completed successfully.
    Can anyone help or enlighten me?
    TIA
    Tim McMaster

    Trouble using forums?
    Can this be solved
    Still having problems!
    Why would you want to start a new thread?
    This just makes it harder for people to help you because all of a sudden they have to
    * ask you lots of questions because you don't really provide enough info, or
    * search for the old threads and read through what happened so far.
    Have you done basic troubleshooting?
    [ like making a test table with all the same columns [b]except that infamous 'Postco' column - and test inserting into this test table? ]

  • Is there a method that is Invoked when client calls commit or rollback ?

    Jdev 10.1.3.3 Jclient

    I looked at the JUNavigationBar soltion even though we dont use the navbar we use the same approach as our current work around but its not that great and it still sets the stage for having the same problem if you want to act on other BC exposed actions/ methods in the pageDef.
    It would be great if there was a way to add a lisitener to the pagedef
    exposed method, something like (panelBinding.pageDefMethodListener("Commit") )that would allow us to act on the action without having to hard wire the logic and then pass the action around to every panel that need to respond to it.

  • UserTransaction of Session Bean

    There are 3 session beans: SB1, SB2and SB3, both are use Bean managed Transaction.
    In SB1,
    public void method1() {
    UserTransaction ut = context.getUserTransaction();
    try {
    ut.begin();
    SB2.method2();
    SB3.method3();
    ut.commit();
    catch (Exception ex) {
    ut.rollback();
    In SB2, SB3 are similar,
    public void method2/3() {
    UserTransaction ut = context.getUserTransaction();
    try {
    ut.begin();
    ut.commit();
    catch (Exception ex) {
    ut.rollback();
    If SB3.method3 throw exception, I want all of the method1, 2, 3 rollback. For the previous program, method2 will commit, and method1, 3 rollback. How can I rollback all the methods? Any idea to pass the transaction of method1 to method2, 3??
    Thank you!

    First, thanks for your reply.
    I have a question of Q&A 5, Stateless session beans should always either commit or rollback a transaction before the business method returns.
    If a method of Stateless session bean (SB2) is called by another Stateless session bean (SB1), then SB2 should either commit or rollback. Is this any solution for SB2 use transaction of SB1? Normally, a session bean may call different methods of other session beans. If any one throw exception, then the whole transaction is rollback. How call bean managed bean do that???

  • Configure  Weblogic to force JTA transactions to commit.

    Hello Everyone,
    I have a webservice running on a Tomcat Server and connected to an Oracle DB.
    Data is being selected, pulled out and send through the weblogic JMS client.
    This data is marked as sent but my code is restricted by the system´s design and is not allowed to commit the transactions. This is responsibility of the Weblogic’s JTA layer.
    Here is the problem: my code is being called every minute and it is retrieving records that should already be marked.
    And worst: the Java webservice code can’t be modified by client’s request.
    How can I setup my Weblogic server to ensure the mark?
    Is there any other place I should look?
    Thanks in advance.
    M.
    Edited by: 914451 on Feb 15, 2012 5:17 AM

    The configuration for JTA can be found in the admin console. The domain configuration, JTA tab shows how JTA is configured.
    On the deployments, monitoring tab you can find all the subsystems runtime information. What you are probably interested in
    is the JDBC (data sources and connection pooling). Here you can enable (by clicking on customize this table) how many active
    connections are present at the current moment. When the active connections keep growing (or the leaked connection count)
    there is probably never any commit or rollback issued (and maybe worse the connections are not returned to the pool)
    When the third party is using EJB's, you see information about the transaction in the monitoring, EJBs tab. Here also you
    need to customize the table to add the transactions committed, rolled back, timed out attributes.
    The specific JTA information for a particular server (to which the application is deployed) can be found in the environment, servers, server_name,
    monitoring, JTA. Here you see different tabs, such as Summary (that gives you an overview of the transactions). There is also an Transactions
    tab that gives you the possibility the commit, roll back transactions.
    When you want to get behind what is really going on you have to know what the third party is doing.

Maybe you are looking for

  • GR/IR Clearing GL Account

    How to clear GR/IR CLEARING GL account in FI if all MIGO done and PO closed for the financial year 2009-10 How to clear GR/IR CLEARING (Without PO) GL Account in FI for yea end closing activity How to clear SR/IR CLEARING (Without PO) GL Account in F

  • Edit as new not working with draft messages?

    Occasionally I want to send two similar messages at the same time. I write one message and save it as a draft - usually at this stage without any addresses specified. I visit the Drafts folder and use Edit as New to open the draft message as what I e

  • How do I delete applications?

    Hi everyone, I know this is probably the stupidest question you've ever heard, but how do I delete the applications on my Tour that I didn't download? I don't use AIM, Yahoo! Messenger, or anything like that, and I can't figure out how to delete them

  • Upgradeing oracle 9i Windows 32 bit to Oracle 10.2.0.3 Windows 64bit

    I have a DB in oracle 9.2.0.5. I have two questios 1 ) How can I upgrade this to Widnows 64 bit oracle 10.2.0.3 without doing an export import. 2) Is it possible to upgrade 9.2.0.5 straight to 10.2.0.3 Windows 64 bit without export import. My plan is

  • Search Distribution Program

    Hello Everybody, Can someone tell me, how to look for the distribution program using the Segment or the Basic type. Thanks, Sneha Singh.