Results 1 to 5 of 5

Thread: WLS instrumented transactions, transactions by name

  1. #1
    Join Date
    Nov 2004
    Posts
    5

    Default WLS instrumented transactions, transactions by name

    Hi

    We are currently making Spring use

    org.springframework.transaction.jta.JtaTransaction Manager

    as transaction manager.

    This works nice, we see indeed that WebLogic's transaction counters are incremented if Spring handles transactions.

    Only, for problem analysis we are used to take a look at WebLogic's 'Transactions by name' monitoring page. This page lists transaction statistics organized by by EJB and EJB-method. This overview typically gives us an immediate hint about where things get slow or go wrong.

    The JTA transactions initiated by Spring using Weblogic's JTA transaction manager however do not appear in this overview, probably because they are not instrumented with necessary meta-info.

    Is their a way to have Spring initiated WLS JTA transactions appear in this 'Transaction by name' overview?

    Thanks in advance for any tips.

    Bart

  2. #2
    Join Date
    Aug 2004
    Location
    Linz, Austria
    Posts
    391

    Default

    I see... WebLogic seems to apply some special registering of EJB CMT transactions with its transaction monitor. Spring effectively uses WebLogic's JTA subsystem directly, through the standard JTA UserTransaction and TransactionManager interfaces, so won't apply such special registering of transaction names.

    The corresponding facility seems to be the "setName" method on weblogic.transaction.Transaction, according to the docs at http://e-docs.bea.com/wls/docs81/jta...i.html#1052769. I assume that the name specified there will be shown in WebLogic's transaction monitor.

    So essentially, all we need to is provide a special subclass of JtaTransactionManager that calls this WebLogic-specific "setName" method after starting a transaction. We already have a WebLogicJtaTransactionManager class, which would be an obvious place to add such support.

    The remaining question is: Which name do we set for each transaction? I'm inclined to add a "getName" method to the TransactionDefinition interface, passing in this name to the transaction manager. TransactionInterceptor can then pass in the class and method name, while direct TransactionTemplate/PlatformTransactionManager users can pass in a custom name for each transaction.

    Juergen

  3. #3
    Join Date
    Nov 2004
    Posts
    5

    Default



    Would you consider this to be added to Spring in an upcoming release?

    Bart

  4. #4
    Join Date
    Aug 2004
    Location
    Linz, Austria
    Posts
    391

    Default

    Bart,

    I'm happy to announce that all works well - even better than expected :-)

    Spring's WebLogicJtaTransactionManager supports transaction names through WebLogic's UserTransaction.begin(name) method now, which works nicely: Spring-managed transactions show up in WebLogic's transaction monitor.

    Beyond that, I've even been able to figure how per-transaction isolation levels work on WebLogic - an old to-do on our list! This is hidden in the EJB BMT section of the documentation; it's not part of the WebLogic JTA documentation (neither reference nor javadoc).

    Essentially, a special WebLogic transaction property with the magic key "ISOLATION LEVEL" has to be set, then WebLogic will apply that isolation level to all JDBC connections that participate in the given transaction. This is exactly equivalent to the isolation level setting in WebLogic's EJB CMT descriptor.

    This means that our WebLogicJtaTransactionManager supports the full power of Spring's transaction definitions on WebLogic's transaction coordinator, beyond standard JTA: transaction names, per-transaction isolation levels, and proper resuming of transactions in all cases.

    Note that all of this works with public WebLogic API that's available in both WebLogic 7.0 and 8.1. Even if the API details are a bit hidden in the documentation, we're not accessing some not-supported internal mechanisms here, which is certainly a good thing.

    This will be part of Spring 1.2 RC1, scheduled for the end of this week. It should already be available in the latest nightly snapshot!

    I've currently just tested this on WebLogic 8.1 SP4; I hope that there is enough time for tests on WebLogic 7.0 and 9.0 beta before the release.

    Juergen

  5. #5
    Join Date
    Nov 2004
    Posts
    5

    Default

    The most ideal solution.

    Very much appreciated.

    Many thanks, Bart

Similar Threads

  1. HibernateTemplate and transactions
    By Simon Brunning in forum Data
    Replies: 4
    Last Post: Mar 9th, 2009, 12:37 AM
  2. Client Defined Transactions
    By haninaguib in forum Data
    Replies: 4
    Last Post: Oct 24th, 2005, 01:18 PM
  3. JDO Transactions and JUnit testing
    By markds75 in forum Data
    Replies: 2
    Last Post: Sep 17th, 2005, 01:46 AM
  4. Replies: 1
    Last Post: Mar 23rd, 2005, 05:32 AM
  5. Replies: 4
    Last Post: Jan 25th, 2005, 02:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •