Skip to Content
avatar image
Former Member

JDBC adapter Commit/Rollback

Hi Guys, I got a question regarding JDBC adapter auto commit. Hopefully you guys can help me :). Until now, when my XI calling a storedprocedure in ORACLE using JDBC adapter, it will automatically commit the calling. When i see my configuration for the JDBC adapter receiver, the checkbox for Enable Autocommit is thicked. My question is, is there anyway that we handle the commit or rollback ourself. How we can handle that? Is it from the BPM or just from the Configuration.

Thank you very much in advance for all replies, advices and answer. Cheers guys..

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Jun 27, 2007 at 04:54 AM

    Hi

    Try this out

    You can programmatically set auto commit to true as in follows

    // Load the Oracle JDBC driver

    DriverManager.registerDriver(new oracle.jdbc.OracleDriver());

    // Connect to the database

    // You can put a database hostname after the @ sign in the connection URL.

    Connection conn =

    DriverManager.getConnection ("jdbc:oracle:oci:@", "scott", "tiger");

    // It's faster when auto commit is off

    <b>conn.setAutoCommit (true); </b>

    // Create a Statement

    Statement stmt = conn.createStatement ();

    regards

    krishna

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 27, 2007 at 01:48 AM

    Wardana,

    If you see SAP help it says that we should not set this indicator if the JDBC driver supports transactions. Check this SAP help for more information on this:

    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm

    Regards,

    ---Satish

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 27, 2007 at 04:51 AM

    the use of autocommit is mainly inteded for single queries (DML) ...most probably for a stored procedure the transactions are handled inside it say by having multiple savepoints and then rollbacks / commits as per requirement.

    so ...check with your stored procedure developers and confirm about the transaction handling inside the SP and in that case the autocommit flag state wont make much difference..:)

    HTH

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 27, 2007 at 05:02 AM

    Well not so sure abt this but only 2 wayz that a transaction auto commit can be handled can be:

    1) As you have done. Thatz through Adapter Configuration

    2) By the DBA.

    If there is some other way to do this Please keep on posting.

    cheers

    Raj

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Sorry for being unclear from the start. Actually, my purpose is to control the commit/rollback of a stored procedure from XI. Is there any way to do that?