[jboss-user] [JBossCache] - Re: jboss cache + glassfish - problem using GenericTransacti

bstansberry@jboss.com do-not-reply at jboss.com
Thu Jun 28 10:04:22 EDT 2007


The 1.4.1.SP3 GenericTransactionManagerLookup doesn't know how to find Glassfish's TM.  In 2.0 it does, but that doesn't help you.

Suggest you write your own TransactionManagerLookup implementation and use that.  It's really trivial:


  | package com.foo.jbosscache;
  | 
  | import javax.naming.InitialContext;
  | import javax.transaction.TransactionManager;
  | import org.jboss.cache.TransactionManagerLookup;
  | 
  | public class GlassfishTransactionManagerLookup implements TransactionManagerLookup {
  | 
  |    public GlassfishTransactionManagerLookup() {
  |    }
  | 
  |    public TransactionManager getTransactionManager() throws Exception {
  |       return (TransactionManager)new InitialContext().lookup("java:appserver/TransactionManager");
  |    }
  | 
  | }
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4058762#4058762

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4058762



More information about the jboss-user mailing list