tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gegas <>
Subject Re: No Maven2 Best Practices?
Date Wed, 14 May 2008 06:21:27 GMT

David Blevins wrote:
> That's what I get for not testing it first :)  Forgot a break  
> statement.  Updated code at the bottom of this page:
> The technique is that the code first tries to find the OpenEJB  
> TransactionManagerLookup strategy and if it can't find that it goes to  
> the JBoss one.  So in your testing where OpenEJB is present that's the  
> one that will get used.  In production where OpenEJB is not present,  
> the JBoss TransactionManagerLookup will get used.
> You could use some other technique to detect the environment you're  
> in, but the basic idea is that the custom TransactionManagerLookup  
> strategy is what gets used in your persistence.xml so you can support  
> both platforms with the same xml file.
> -David

Thank you David!

I remebered you could also put a file with your
Hibernate specific properties and put it in your classpath as well. Dunno
why I didn't think of this before...

The production will reside in: src/main/resources

and the test in: src/test/resources

Now I'm able to have the OpenEJB transaction manager lookup in the test
environment and the JBoss transaction manager lookup in my production

You've been a great help David! Tahnks a lot :-)

Kind regards, Andreas
View this message in context:
Sent from the OpenEJB User mailing list archive at

View raw message