Connecting from Tomcat without the -nonaming option looks like this: Properties props = new Properties(); props.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory"); props.setProperty(Context.URL_PKG_PREFIXES, "org.jnp.interfaces"); props.setProperty(Context.PROVIDER_URL, "jboss-server:1099"); InitialContext jndiContext = new InitialContext(props);
Be careful NOT to use UserTransaction from Tomcat when connecting in this way. There is an outstanding bug: http://sourceforge.net/tracker/?func=detail&aid=574130&group_id=22866&atid=376685 Of course you will also need to include the JBoss client JAR files in the class path for Tomcat. > Date: Wed, 31 Jul 2002 16:49:09 +0300 > From: "Maris Orbidans" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Subject: [JBoss-user] standalone Tomcat > Reply-To: [EMAIL PROTECTED] > > > hello > > I would like to know how to find JBoss from a WEB app. that runs under = > standalone Tomcat that is NOT run with -nonaming option. > > The reason for this is that I want to use Environment properties from my = > WEB app. > > Maris Orbidans ------------------------------------------------------- This sf.net email is sponsored by: Dice - The leading online job board for high-tech professionals. Search and apply for tech jobs today! http://seeker.dice.com/seeker.epl?rel_code=31 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user