geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r505020 - /geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/properties/NamingProperties.java
Date Thu, 08 Feb 2007 19:51:58 GMT
Author: dblevins
Date: Thu Feb  8 11:51:58 2007
New Revision: 505020

URL: http://svn.apache.org/viewvc?view=rev&rev=505020
Log:
Cement the naming provider in the vm

Modified:
    geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/properties/NamingProperties.java

Modified: geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/properties/NamingProperties.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/properties/NamingProperties.java?view=diff&rev=505020&r1=505019&r2=505020
==============================================================================
--- geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/properties/NamingProperties.java
(original)
+++ geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/properties/NamingProperties.java
Thu Feb  8 11:51:58 2007
@@ -19,6 +19,9 @@
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
 /** java.naming.factory.initial=com.sun.jndi.rmi.registry.RegistryContextFactory
 java.naming.factory.url.pkgs=org.apache.geronimo.naming
 java.naming.provider.url=rmi://localhost:1099
@@ -34,6 +37,14 @@
         setNamingFactoryInitial(namingFactoryInitial);
         setNamingFactoryUrlPkgs(namingFactoryUrlPkgs);
         setNamingProviderUrl(namingProviderUrl);
+
+        try {
+            // Calling this causes the System properties we just set
+            // to be read in and cached by the vm ensuring we can't
+            // be booted out by another module in the system.
+            new InitialContext().lookup("java:");
+        } catch (Throwable ignore) {
+        }
     }
 
     public String getNamingFactoryInitial() {



Mime
View raw message