IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

Local Transaction mode

  • 1.  Local Transaction mode

    Posted Fri September 20, 2002 12:54 PM

    Hi,

    I know that if I use the function of TXMLObjectAccessor query( TQuery query, int quantity) , I need use Local Transaction Mode,

    But How to use this mode? Please give me an example from the begnning of connection,thx


    #webMethods-Tamino-XML-Server-APIs
    #API-Management
    #webMethods


  • 2.  RE: Local Transaction mode

    Posted Fri September 20, 2002 01:30 PM

    Hi there,

    1) You create a TConnection thus:
    TConnection tcon = TConnectionFactory.getInstance().newConnection (DATABASE_URL) ;

    2) Switch to local transaction mode thus:
    TLocalTransaction tloc = tcon.useLocalTransactionMode () ;

    3) Perform any updates using TXMLObjectAccessor then when you want to commit, use the TLocalTransaction object thus:
    tloc.commit();

    4) Revert back to autocommit mode using:

    tcon.useAutoCommitMode();


    #webMethods
    #webMethods-Tamino-XML-Server-APIs
    #API-Management


  • 3.  RE: Local Transaction mode

    Posted Fri September 20, 2002 01:32 PM

    hi,

    please check either of the examples provided along with the API:

    /help/inoapi/listings/hello/ProcessXMLGreeting.java

    or

    several other java files in

    /help/inoapi/listings/jazz


    best regards,
    andreas f.


    #webMethods
    #webMethods-Tamino-XML-Server-APIs
    #API-Management


  • 4.  RE: Local Transaction mode

    Posted Thu October 17, 2002 01:43 PM

    And if another thread access the same information before of my commit?Is this the sense of LTM, that is a take a copy of the data and then i update the db, is it correct?

    @nto


    #webMethods
    #API-Management
    #webMethods-Tamino-XML-Server-APIs


  • 5.  RE: Local Transaction mode

    Posted Fri October 18, 2002 01:58 PM

    I don’t think I understand your question. Could you please rephrase your question?


    #API-Management
    #webMethods
    #webMethods-Tamino-XML-Server-APIs


  • 6.  RE: Local Transaction mode

    Posted Tue October 22, 2002 06:19 PM

    Probably i don’t understand propertly the essence of local transaction mode…can u explain it to me in a few words?


    #webMethods
    #webMethods-Tamino-XML-Server-APIs
    #API-Management


  • 7.  RE: Local Transaction mode

    Posted Tue October 22, 2002 06:42 PM

    Local Transaction Mode means that you operate within a session context. With this a session is opened, and any updates (inserts, modifications and deletions) are not automatically committed to the database. This means that you can control if these update(s) are to be committed or rolled back (by using commit() and rollback() methods of the TLocalTransaction interface).

    This is orthogonal to Auto Commit Mode which is the default with the Tamino for Java API. In this mode there is no session context so any updates are automatically committed so there is no commit or rollback in this scenario.


    #webMethods
    #API-Management
    #webMethods-Tamino-XML-Server-APIs


  • 8.  RE: Local Transaction mode

    Posted Wed October 23, 2002 10:10 AM

    Now it’s more clear.
    What i’m wordering is that if i performe update insert etc… in a ltm and another person accesses (before my commit) the data i’m manipulating in ltm, what’s happen?
    When i use ltm a put a read lock in the db?
    How does the lock\unlock mechanism work in Tamino?

    Brgs
    @nto


    #API-Management
    #webMethods-Tamino-XML-Server-APIs
    #webMethods


  • 9.  RE: Local Transaction mode

    Posted Wed October 23, 2002 11:14 AM

    This is best described in the documentation. Following the link “X-Machine Programming” from the Tamino Documentation. Click on the link “Requests using X-Machine Commands” and look under the heading “Transaction Related Commands”.


    #API-Management
    #webMethods-Tamino-XML-Server-APIs
    #webMethods


  • 10.  RE: Local Transaction mode

    Posted Wed October 23, 2002 12:29 PM

    Thx a lot Stuart Fyffe-Collins.
    Brgs
    @nto


    #webMethods
    #API-Management
    #webMethods-Tamino-XML-Server-APIs