An interesting requirement of J2EE is that external clients
need to run in current working directory where there's
a subdirectory and file of: META-INF/application-client.xml
This file has familiar syntax of declaring the beans you'll
bind to, resources and env vars. You'll need to declare your
resource there.
good luck,
curt
> Hi All,
> I have created my own DBPool on Orion. I have a startUp class also
> to bind the DBPool object using JNDI. But when I start the orion
> server the
> following is the error I've got :
>
> javax.naming.NamingException: META-INF/application-client.xml resource not
> found
> (see J2EE spec, application-client chapter for requirements and format of
> the f
> ile)
> at
> com.evermind.server.ApplicationClientInitialContextFactory.getInitial
> Context(Unknown Source)
> at
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
> 68)
> at
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246
> )
> at javax.naming.InitialContext.init(InitialContext.java:222)
> at javax.naming.InitialContext.<init>(InitialContext.java:198)
>
> And the code in my startup class to initialize the DBPool is:
>
> try{
> Hashtable env = new Hashtable();
> env.put(Context.INITIAL_CONTEXT_FACTORY,"");
> env.put(Context.PROVIDER_URL,"ormi://localhost");
> Context ctx = new InitialContext(env);
> //My DBPool
> DBPool nPool = new DBPool();
> ctx.bind("DBPool",nPool);
> } catch (Exception e){
> e.printStackTrace();
> }
>
> Any suggestion?
>
> Thanks in advance
> Derek
>
> __________________________________________________________________________
> This transmission and the information it contains including any
> attachment, is confidential and may be subject to legal
> privilege. If you are not the intended recipient, you must not
> peruse, use, disseminate, disclose or copy this transmission. If
> you have received this transmission (or any copy) in error,
> please notify us immediately by reply e-mail to
> [EMAIL PROTECTED] Please delete the original
> transmission(including any attachment) and its contents and
> destroy or return to us any hard copy.
>
> Please note that any electronically transmitted material that
> purports to commit Sun Hung Kai & Co. Ltd., or any of its
> subsidiaries or associates, to any obligation or in any other way
> whatsoever, unless subsequently confirmed by fax or letter
> signed (in either case) by our duly authorized officer(s) may not
> be relied on. Material transmitted to you should also be checked
> by reference to the hard copy of the material printed directly by us.
>
>