-
1. Re: UserTransaction not Referenceable/Serializable
marklittle May 17, 2006 2:22 AM (in response to metavirulent)So which JNDI implementations can't you put UserTransaction in? It supports getObjectInstance and we've been deploying it/them into various JNDI implementations over the years.
-
2. Re: UserTransaction not Referenceable/Serializable
metavirulent May 17, 2006 3:15 AM (in response to metavirulent)If you want to put the UserTransaction into a com.sun.jndi.rmi.registry.RegistryContextFactory like me, then it won't work because you can't bind it to the RMI.
I guess that's the reason why they wanted UserTransaction to be Referenceable/Serializable in the JTA spec since RegistryContextFactory is one of the standard Java JNDI providers after all. -
3. Re: UserTransaction not Referenceable/Serializable
marklittle May 17, 2006 9:06 AM (in response to metavirulent)OK, so you're looking at a thin-client approach (access UT remotely so nothing runs on the client-side)?
-
4. Re: UserTransaction not Referenceable/Serializable
metavirulent May 17, 2006 10:49 AM (in response to metavirulent)Not really a thin-client, we are in a non-managed environment featuring Hibernate for persistency and have just picked the registry as our JNDI provider to store DataSources in (along with RMI Remote interfaces for remoting).
Now we'd also like to store the UserTransaction there so Hibernate can find it but it ain't possible. -
5. Re: UserTransaction not Referenceable/Serializable
marklittle May 17, 2006 11:43 AM (in response to metavirulent)I've created a JIRA task (http://jira.jboss.com/jira/browse/JBTM-77). Not sure when it'll be scheduled though. In the meantime, can you use a different JNDI implementation?
-
6. Re: UserTransaction not Referenceable/Serializable
kconner May 18, 2006 8:59 AM (in response to metavirulent)Now we'd also like to store the UserTransaction there so Hibernate can find it but it ain't possible
Have you tried storing a reference instead? While our UserTransaction doesn't implement Serializable or Externalizable, a miskate we will rectify, it does implement ObjectFactory.
Kev
final UserTransaction userTransaction = ...
final String userTransactionImpl = userTransaction.getClass().getName() ;
final Reference ref = new Reference(userTransactionImpl, userTransactionImpl, null) ;
initialContext.bind(jndiName, ref) ;