Mauricio,
I'm not using my own TransactionManager. It's a transaction manager lookup class. May be name of the file is not best.
It's a small lookup class that just returns transaction manager bound in "java:jboss/TransactionManager"
By defaut jBPM looks in java:/TransactionManager. That's why this lookup class was added. Below is the code of this class
public class MyCompanyTransactionManager implements TransactionManagerLookup {
public Object getTransactionIdentifier(Transaction transaction){
return transaction;
}
public TransactionManager getTransactionManager(Properties props)
throws HibernateException{
try
{
return (TransactionManager) new InitialContext()
.lookup("java:jboss/TransactionManager");
}
catch (NamingException e)
{
throw new RuntimeException(e);
}
}
public String getUserTransactionName(){
return null;
}
public static TransactionManager getTransactionManager(){
return new MyCompanyTransactionManager().getTransactionManager(null);
}
}
Thanks!