Hi all,
I'm trying to set an app up such that it can be redeployed with the web-app
on a stand-alone servlet container, or use a built-in servlet engine. I'd
like to do this without having to recompile code.  I'm only just getting to
grips with naming services and lookup, so forgive my ignorance. The main
issue (as far as I can see, please tell me if there are others!) is in
looking up EJBs in the servlets. If I use a remote lookup such as:

      Properties env = new Properties();
      env.setProperty("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
      env.setProperty("java.naming.provider.url",  "localhost:1099");
      env.setProperty("java.naming.factory.url.pkgs",  "org.jboss.naming");

      // Enclosing the whole process in a single `try' block is not an ideal
way
      // to do exception handling, but I don't want to clutter the program
up
      // with catch blocks
      try
      {
         // Get a naming context
         InitialContext jndiContext = new InitialContext(env);
         ...

does this mean an unnecessary network call when deployed with the client
running in an embedded servlet engine?
If so, is there a good way for the client code to determine whether it is
running embedded or not, or to use a properties file to achieve the same
thing?  Is there a way to configure tomcat to point at an external naming
service?

thanks,
jim
Jim Downing
[EMAIL PROTECTED]


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to