A wise old hermit known only as John Fleenor <[EMAIL PROTECTED]> once said:
> I would like to know where is the best place the to place the jndi > environment varibles. When I generate the util classes for looking up > home interfaces I get lookup exceptions, if a place the environment > vars below if performs the lookup ok. > java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory > java.naming.provider.url=jnp://localhost:1099 > java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces Have you noticed there's 2 forms of the getHome method? One has no args, and just uses new InitialContext(); while the other takes a Hashtable and uses that when getting the InitialContext. So, you could create a Hashtable, put those values in it (you can get them from a Properties file or environment setting if you don't want to hard code them), and use the second form of the call on the Util object. Or, you can just put them in a properties file which will be found automatically according to the description at http://java.sun.com/j2ee/sdk_1.2.1/techdocs/api/javax/naming/Context.html# RESOURCEFILES Environment properties are also discussed in the API documentation for InitialContext (http://java.sun.com/j2ee/sdk_1.2.1/techdocs/api/javax/naming/InitialConte xt.html) Andrew. _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
