User: oberg
Date: 00/11/15 08:44:43
Modified: src/main/org/jboss/naming NamingService.java
Log:
Load jndi.properties into system properties. This allow Tomcat servlets to do "new
InitialContext()"
Revision Changes Path
1.3 +6 -1 jboss/src/main/org/jboss/naming/NamingService.java
Index: NamingService.java
===================================================================
RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/naming/NamingService.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- NamingService.java 2000/10/25 08:34:08 1.2
+++ NamingService.java 2000/11/15 16:44:43 1.3
@@ -19,7 +19,7 @@
*
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public class NamingService
extends ServiceMBeanSupport
@@ -53,6 +53,11 @@
public void initService()
throws Exception
{
+ // Read jndi.properties into system properties
+ // RO: this is necessary because some components (=Tomcat servlets) use a
+ // buggy classloader that disallows finding the resource properly
+
System.getProperties().load(Thread.currentThread().getContextClassLoader().getResourceAsStream("jndi.properties"));
+
naming.start();
log.log("Naming started on port "+naming.getPort());