Tomcat 5 - jndi problem

2003-12-10 Thread Frank Renaers
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






FW: Tomcat 5 - jndi problem - Can someone of the developers help me ???

2003-12-10 Thread Frank Renaers


  -Original Message-
 From: Frank Renaers  
 Sent: woensdag 10 december 2003 12:04
 To:   '[EMAIL PROTECTED]'
 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