--- Erhalten von SYSUEXT.UE05588 +41 51 220 49 56 12.01.05 16.37 Hi Phil Thank's for your repliy. First I give you some explanations what we are doing and then what we would like to have: We have developed a framework similar to Hivemind. In our application code we have jndi lookups to java:comp/env but also to the 'global' context. ctx.lookup("java:comp/env/..."); ctx.lookup("..."); To make our code work with out modification in a J2SE Environment, where no JNDI implementaion is available from an App Server, we need to be able to bind names to the global/initial context and also to some other contexts like java:comp/env. We also need to have references (resourcelink) pointing to 'global' resources. Since it looks like I have some time to spend on that I would like to provide patches. Here are my thoughts: - To enable resourcelinks I propose to change the naming.dtd ( see below). Only the class ResourceLinkFactory from Tomcat sources must be added AFAIK and some coding to make it work is necessary. - To be able to store resources to the global context a way must be found to identify which context of all the contexts in naming.xml is/are the global one. Since the context without a name attribut is associated with java:comp/env I propose to indicate the global one with a flag in the context element. . The name attribute would then be ignored. I can implement a solution and submit it to you. If you like it, commit it otherwise drop it. WDYT? Question: More than one context element is allowed in naming.xml. Why is XMLConfigurator destroying the previous initial context when a context element, having a name attribute, is found? This way all previous created contexts are lost. Is this a bug or a feature? Can you explain me the scenes behind!? if (ctx.getName() != null) { destroyInitialContext(); Context initialContext = new InitialContext(); Name nm = initialContext.getNameParser("").parse (ctx.getName()); envContext = initialContext.createSubcontext(nm.get(0)); jndiCtx = envContext; for (int k = 1; k < nm.size(); k++) { jndiCtx = jndiCtx.createSubcontext(nm.get(k)); } } Kind regards Roland The proposed dtd: global CDATA #IMPLIED> --- Erhalten von SYSUEXT.UE05588 +41 51 220 49 56 11.01.05 15.57 > > Hi all > > Yes, this message does not belong to this list but so far there is no user > list. Right? Yes, this is the only list, for now and you are asking in the right place. > > In a J2SE Environment (without any EJB/Web Container) we want to simulate > the Element like it is used in Tomcat's server.xml. > > Can this be achived like this?: > > > > > For entries in > > > ... > > > > For entries in > > > ... > > > > > > Thank's for any help on this! > Best regards Roland Can you explain a little more what exactly you are trying to do? Currently, ResourceLinks are not supported by the XmlConfigurator, though this would be a pretty easy extension. The examples here: http://incubator.apache.org/directory/subprojects/naming/using.html pretty much cover what is available via the configurator now. The JNDI provider, however, does support links, so you could use the API directly to set this up as well. Let us know what you would like to see -- best of all with patches -- and we will see what we can do. Phil ---- 12.01.05 16.37 ---- Gesendet an -------------------------------------- -> phil@steitz.com -> directory-dev@incubator.apache.org