Sorry for reposting this, but it has become absolutely critical  and I
would appreciate any help.
--
Hello,

     Could someone please point out what I'm doing wrong.  I'm sure I'm
     missing something really simple here.  I can't get an Orion server
to
     run under program control and do some application specific
     initialization.  I'm inlining some simplified code and output.

     Thanks,
     Vidur

     import javax.naming.*;
     import com.evermind.server.*;

     public class Server {
         public static void main(String[] args) {
             try {
                 ApplicationServer.main(new String[] {"-userThreads"});
                 Context ctx = new InitialContext();
                 ctx.lookup ("foo");
             }
             catch (Exception ex) {
                 ex.printStackTrace();
                 System.err.println("Exiting ...");
                 System.exit (0);
             }
         }
     }

     The output is:
     Orion/1.1.37 initialized
     javax.naming.NamingException: Not in an application scope - start
Orion
     with the -userThreads switch if using user-created threads
      at com.evermind.server.f9.bh(JAX)
      at com.evermind.naming.i1.lookup(JAX)
      at javax.naming.InitialContext.lookup(InitialContext.java:350)
      at com.epistemic.km.server.Server.main(Server.java:11)
     Exiting ...



Reply via email to