Hello,

In answer to my own question... it would seem that whenever a tyrex.resource.Resource is requested from JNDI in Tomcat, the TyrexFactory that deals with these requests will only ever create/iniatilise one TransactionDomain... thereby making all tyrex.resource.Resources declared in a <context> element effectively global. There is no need to use <GlobalNamingResources>. Therefore, if multiple webapps wish to share a Tyrex domain, they must simply share the same Tyrex domain config file. This means that I have duplicated this file somewhat (the same domain.xml appears in the WEB-INF/classes directory for each Tyrex-using webapp).

I hope that this is correct, and helpful to anyone else who runs into this issue. Any comments or insights into my observation above would be most welcome - particularly from anyone who knows how I can actually share the Tyrex domain.xml without placing it in the WEB-INF/classes directory of each webapp (say somewhere like <tomcat-home>/conf/domain.xml or something).

Thanks again,

Patrick



Patrick van Kann wrote:

Hello,

I am able to set up Tyrex datasources within the <context> elements of my server.xml and access them from my webapps without difficulty. Problems occur when I try to create a Tyrex datasoruce resource in <GlobalNamingResources> in server.xml. At server startup, this happens...
----------------------------------------------------------------------------------------


2515 [main] INFO http11.Http11Protocol - Initializing Coyote HTTP/1.1 on port 8080
TyrexResourceFactory: Cannot create Tyrex Resource, Exception
javax.naming.NameNotFoundException: Name comp is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:811)
at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
at javax.naming.InitialContext.lookup(InitialContext.java:345)
at org.apache.naming.factory.TyrexFactory.getTransactionDomain(TyrexFactory.java:114)


etc...
------------------------------------------------------------------------------------------



It seems that the object factory trys (and fails) to obtain the config (probably the path to domain.xml) from JNDI like this:
line 114: String config = initCtx.lookup("java:comp/env/" + Constants.TYREX_DOMAIN_CONFIG).toString();


I searched the tomcat-user archive and couldn't find any postings about this. Can anyone tell me how to set up a global Tyrex datasource?

Thanks very much in advance.

Patrick


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to