Hey all,
I've created a Datasource wit Tomcat Admin Tool.
The JNDI Name is: jaxsdb.

Now i want to load this resource:

        public DataSource getds()
        {
                Category cat = Category.getInstance("de.hauschel.wapen.be.BEFactory");
                cat.debug("->getds()");
                try
                {
                        // Obtain our environment naming context

                        Context initCtx = new InitialContext();

                        Context envCtx = (Context) initCtx.lookup("java:comp/env");

                        // Look up our data source

                        DataSource ds = (DataSource)envCtx.lookup("jaxsdb");

                        cat.debug("<-getds()");
                        return ds;

                }
                catch (NamingException e)


                        cat.debug("EXCEPTION");
                        cat.debug(e.getMessage());
                }
                cat.debug("<-getds()");
                return null;
        }

But i always become the same NamingException: Name jaxsdb is not bound in
this Context

Anybody knows the Problem ?

thanks,Fredy


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to