Hi, Does it work from a normal Context, not DefaultContext? Yoav Shapira http://www.yoavshapira.com
>-----Original Message----- >From: Ricardo Matinata [mailto:[EMAIL PROTECTED] >Sent: Thursday, October 14, 2004 3:14 PM >To: [EMAIL PROTECTED] >Subject: UserTransaction not working in DefaultContext > >Hi, > As of tomcat-5.0.29, it is not possible to have a >java:/comp/UserTransaction resource working if declared from a >DefaultContext. (ie) : >....... ><GlobalNamingResources> > <Resource name="UTransaction" auth="Container" > type="javax.transaction.UserTransaction"/> > <ResourceParams name="UTransaction"> > <parameter> > <name>factory</name> > ><value>org.objectweb.jotm.UserTransactionFactory</value> > </parameter> > <parameter> > <name>jotm.timeout</name> > <value>60</value> > </parameter> > </ResourceParams> ></GlobalNamingResources> >....... ><Host> > <DefaultContext> > <ResourceLink name="UserTransaction" global="UTransaction" > type="javax.transaction.UserTransaction"/> > </DefaultContext> ></Host> >..... > > As far as i have investigated the problem, DefaultContext resources >are not avaliable as NamingResources when NamingContextListener >creates the NamingContext for the Context >(NamingContextListener.createNamingContext()). So at the moment >NamingContext is created, the java:/comp/UserTransation resource is >added with an empty TransactionRef object. Later, in the life cicle, >when DefaultContext resources are added to the context, in this case a >ResourceLink pointing to the UserTransaction global resource, we get >a NameAlreadyBoundException, so the previously registered >TransactionRef object remains without config parameters. > The UserTransaction works fine if included in each application's own >context.xml file. > So, as i haven't found any notes regarding this anywhere (manual, >list and Bugzilla), it is (probably) an issue to be raised (or is it >anticipated behaviour ?). > >Thanks. >--- >Ricardo > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]