tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Renaers" <Frank.Rena...@ikan.be>
Subject FW: Tomcat 5 - jndi problem - Can someone of the developers help me ???
Date Wed, 10 Dec 2003 13:17:14 GMT


>  -----Original Message-----
> From: 	Frank Renaers  
> Sent:	woensdag 10 december 2003 12:04
> To:	'tomcat-dev@jakarta.apache.org'
> Subject:	Tomcat 5 - jndi problem
> 
> Hi,
> 
> Is it possible to browse the Tomcat jndi context from within another vm.
> I wrote a small junit test to test this, but it always fails !!
> It always throws a javax.naming.NameNotFoundException: Name java:comp is not bound in
this Context 
> 
> My jndi.properties contains the following settings : 
> java.naming.factory.initial=org.apache.naming.java.javaURLContextFactory
> java.naming.provider.url=http://localhost:8080
> 
> My conf.xml :
> <!-- Global JNDI resources -->
> <GlobalNamingResources>
> 
>   <!-- Test entry for demonstration purposes -->
>   <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
> </GlobalNamingResources>
> 
> My test :
> 
> public void testDataSource() throws Exception {
> 
>         // Obtain our environment naming context
>         javax.naming.Context initCtx = new javax.naming.InitialContext();
>         javax.naming.Context envCtx = (javax.naming.Context) initCtx.lookup("java:comp/env/simpleValue");
>    
>     }
> }
> 
> Thanks,
> 
> Frank Renaers
> 
> 
> 
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message