Topic:   Can we use no_transaction as local_transaction in webMethods jdbc adpters
Oct 17, 2013 21:50 8 Replies 4095 Views Pia
Prev Next
Topic Replies (8)
  1. 1
    idnkx user

    Pia

    Hi All,

    Just got a doubt at JDBC in webMethods.

    Can we use no_transaction as local_transaction in webMethods jdbc adpters. Can anyone explain this in Detail how to achieve this.

    Hope some fast reply's.

    1
    idnkx user

    Adinarayana Jesta

    Local Transaction --> Implicit Commit
    where as No Transaction --> Auto Commits

    Both are different, Explain your requirement, so then we will resolve ur doubt.

    1
    idnkx user

    Kopparapu Naresh

    can u please some more broad explanation .... :)

    1
    idnkx user

    Srikanth

    Lets consider you have a flow service which contains 5 flow steps and you have a JDBC adapter call in the 2nd Step.

    no_transaction case:
    --------------------
    If you have any DML(Inserts/Updates/Deletes on a Table) operations in the JDBC adapter(no_transaction) call then those changes are reflected [b]immediately after completion(Auto Commit) of the 2nd step[/b] of the flow service and the flow services keeps no data base locks.


    local_transaction case:
    -----------------------
    If you have any DML(Inserts/Updates/Deletes on a Table) operations in the JDBC adapter(local_transaction) call then those changes are reflected after the [b]successful completion(Implicit Commit) of the flow service[/b] and [b]the flow services keeps the data base locks[/b]. i.e no reads are allowed on the table that is getting updated.

    1
    idnkx user

    vijay

    hi piapavola .. i agree with yuvanmytri.

    let me explain what transaction type refers when it is no_transaction.

    when there is a call made to the DB which is defined as no_transaction when creating the connection at the webMethods end.

    All calls (DDL or DML)will be commited immediately after the adapter service call is complete within the flow service -implicit commit.The scope of the transaction is implicit commit and doesnot wait for the completion of the flow serviceto show the results on the database table.

    when the transaction type is Local_transaction.

    when there is a call made to the DB which is defined as Local_transaction when creating the connection at the webMethods end.

    All calls (DDL or DML)will not be commited immediately after the adapter service call is complete within the flow service. the scope is the entire flow service and not just the adapter service call.For the changes to be seen reflected on the db table the flow service needs to be successfully completed for the changes to be seen on the db table.

    coming to the question whether we can have a no transaction type and a local transaction type within one flow service is possible and if so how to achieve it the answer is yes it is possible.

    we need to make use of the wm art package service .. start transaction, commit transation and rollbak transaction to achieve a mix of two different transaction type in the flow service.

    There can be multiple cases on how to achieve it based on the ordering of the adapter service.

    1. adapter service which corresponds to a connection type of no_transaction is invoked before an adapter service with connection type as Local transaction in the flow service.

    in the above scenario based on the need whether you want the call with the no transaction type to be updated to the database irrespective of the failure or success of the local transaction then have only the transaction management handled under an internal try catch block to handle the Local_Transaction and if you want the no transaction and local transaction adapter services calls to update only when the flow service is successful else it should be rolledback then have a seperate call in the catchblock to delete/update the transaction which resulted for the insert /update for the notransaction in the try block.

    2.adapter service which corresponds to a connection type of Local_transaction is invoked before an adapter service with connection type as no_transaction in the flow service.

    in the above scenario based on the need the transaction can be started at the start of the IS flow service before the main block and handle the entire transaction management in the flow.

    Let me know if i was helpful or you need more inputs on this front.

    Thanks and regards,
    Vijay

    1
    idnkx user

    saritha

    Hi Vijay,

    Could you plz elaborate where to use Local and where to use NO transactions with a scenario. Also give an idea on Explicit transaction management.

    Thanks in advance!

    1
    idnkx user

    vijay

    hi Saritha,

    No transaction management can be used where you are fine with the end result of the adapter call irrespective of the failure of the flow service after the adapter call effected the details on the database table.

    Local transaction management can be used similar to the no transaction management type but mostly used with an explicit transaction management so that the changes are reflected on the database only when the flow service is successful otherwise they will be rolled back to the previous state at the DB end.

    when you have a combination of adapter calls with no transaction and local transaction type EXPLICIT TRANSACTION management is needed to define the boundaries for each transaction management.

    Examples of Explicit transaction Management is attached in the email.


    Thanks,
    vijay.


    [attachment:1]C:\fakepath\Explicit Transaction Management.pdf[/attachment]

Leave a Reply
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect