December 2002
Intermediate to advanced
1050 pages
24h 49m
English
Using BMT, the transaction is controlled programmatically in the code surrounding the update operations. BMT allows transaction demarcation, the selection of transaction boundaries, to be any arbitrary location in the code, as shown in the following example.
... javax.transaction.UserTransaction ut; javax.ejb.EJBContext context; ... try { // // establish the connections and create the // statements // InitialContext init = new InitialContext(); DataSource accountingDS = init.lookup( "java:comp/env/jdbc/accounting"); DataSource legacyAccountingDS = init.lookup( "java:comp/env/jdbc/accountingL"); java.sql.Connection conAcctg = accountingDS.getConnection(); java.sql.Connection conLegacy = accountingDS.getConnection(); ...Read now
Unlock full access