tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aljosa Mohorovic" <aljosa.mohoro...@gmail.com>
Subject Re: tomcat administration data sources/jndi
Date Fri, 02 Feb 2007 23:35:12 GMT
line
> DataSource ds = (DataSource) initialContext.lookup("java:comp/env/jdbc/zbi");
is
> DataSource ds = (DataSource) initialContext.lookup("java:comp/env/jdbc/test");

On 2/2/07, Aljosa Mohorovic <aljosa.mohorovic@gmail.com> wrote:
> i created jndi datasource in tomcat administration (Resources > Data
> Sources > "JNDI Name"=test) and failed to access it in code:
>
> CODE:
> >>>
> InitialContext initialContext = new InitialContext();
> DataSource ds = (DataSource) initialContext.lookup("java:comp/env/jdbc/zbi");
> <<<
>
> i get this exception:
> javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
>
> any help is appreciated.
>
> Aljosa
>


-- 
Aljosa Mohorovic

http://www.revolucija.hr
Ivana Lucica 5
10000 Zagreb, Croatia

+385 (0)1 616 8414

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message