<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
joël Winteregg wrote:
<blockquote cite="mid:1205329401.5539.30.camel@hatman" type="cite">
<pre wrap="">Hello Chris,
Thanks for your email. As you will notice I posted a related question on
<a class="moz-txt-link-freetext" href="http://opensource.atlassian.com/projects/hibernate/browse/HHH-3110">http://opensource.atlassian.com/projects/hibernate/browse/HHH-3110</a> this
morning.
</pre>
<blockquote type="cite">
<pre wrap="">I haven't looked closely enough to comment on the query problem but I
can confirm that your assessment above is correct. JTATransaction has
and always has had a dependency on JNDI. It's only been recently
uncovered because a) we changed how/when the transaction was
instantiated and b) it turns out some folks are using JTA services
outside the container that don't bind to JNDI. If you want to use such
a service, you're exactly right - also use a JNDI service or create a
TransactionFactory/Transaction combo that doesn't need JNDI.
</pre>
</blockquote>
<pre wrap=""><!---->
The strange thing is that I'm also using JNDI with my Transaction
Manager - System.setProperty("java.naming.factory.initial",
"org.apache.naming.java.javaURLContextFactory");.
And Hibernate is fetching the JTA service using the following lookup
class:
<a class="moz-txt-link-freetext" href="http://docs.codehaus.org/display/BTM/Hibernate#Hibernate-Transactionmanagerlookupclass">http://docs.codehaus.org/display/BTM/Hibernate#Hibernate-Transactionmanagerlookupclass</a>
Using the following Hibernate config:
<property name="transaction.manager_lookup_class">
db.BitronixTransactionManagerLookup
</property>
<property name="transaction.factory_class">
org.hibernate.transaction.JTATransactionFactory
</property>
As I understood from your post on issue HHH-3110, Hibernate should not
use a lookup class anymore but create (instance) the Transaction
Manager. Am I right ? If so, to do this, I should implement a
org.hibernate.transaction.TransactionFactory for my transaction
manager ?</pre>
</blockquote>
<br>
You can do whichever works. Using the default JTATransaction, you'll
need JNDI. But you can alternatively provide your own Impl that does
not rely on JNDI. Your choice really, and all this is pluggable so
Hibernate won't care.<br>
<br>
-Chris<br>
</body>
</html>