I think this might have to be yet another configurable property.

I needed to do this using Orion as my application server, and here is how I
did it:

TransactionManager manager = (TransactionManager)new
InitialContext().lookup("java:comp/UserTransaction");

However, I don't know if it works the same on other applications servers...

Jon...

----- Original Message -----
From: <Gavin_King/[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 14, 2002 12:53 PM
Subject: [Hibernate-devel] How do you get hold of a
javax.transaction.Transaction?


> Does anyone know a reasonably portable way to get hold of a
> javax.transaction.Transaction or javax.transaction.TransactionManager
> from an application server JNDI server?
>
> If I knew how to do this, I could get the caching stuff working
> properly for situations where the JTA transaction is incomplete when
> we call Session.close(). We would need to register an instance
> of javax.transaction.Synchronization with the
> javax.transaction.Transaction instance.
>
> (At present, for the cache to work correctly, the transaction must
> be either fully committed or rolled back when you close the Session.)
>
> Gavin
>
>
> _______________________________________________________________
>
> Don't miss the 2002 Sprint PCS Application Developer's Conference
> August 25-28 in Las Vegas -
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
>
> _______________________________________________
> Hibernate-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/hibernate-devel
>


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

_______________________________________________
Hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to