geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r902360 - in /geronimo/server/trunk/framework: ./ configs/rmi-naming/ configs/rmi-naming/src/main/history/ configs/rmi-naming/src/main/plan/ configs/rmi-naming/src/main/resources/ configs/rmi-naming/src/main/resources/OSGI-INF/ configs/rmi-...
Date Sat, 23 Jan 2010 07:33:38 GMT
Author: djencks
Date: Sat Jan 23 07:33:35 2010
New Revision: 902360

URL: http://svn.apache.org/viewvc?rev=902360&view=rev
Log:
GERONIMO-5041 Integration aries osgi jndi implementation

Added:
    geronimo/server/trunk/framework/configs/rmi-naming/src/main/resources/
    geronimo/server/trunk/framework/configs/rmi-naming/src/main/resources/OSGI-INF/
    geronimo/server/trunk/framework/configs/rmi-naming/src/main/resources/OSGI-INF/blueprint/
    geronimo/server/trunk/framework/configs/rmi-naming/src/main/resources/OSGI-INF/blueprint/naming-providers.xml
  (with props)
    geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/gjndi/WritableFederatedContextMember.java
  (with props)
    geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/naming/AbstractURLContextFactory.java
  (with props)
    geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/naming/WritableURLContextFactory.java
  (with props)
Modified:
    geronimo/server/trunk/framework/configs/rmi-naming/pom.xml
    geronimo/server/trunk/framework/configs/rmi-naming/src/main/history/dependencies.xml
    geronimo/server/trunk/framework/configs/rmi-naming/src/main/plan/plan.xml
    geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/naming/java/javaURLContextFactory.java
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/properties/NamingProperties.java
    geronimo/server/trunk/framework/pom.xml

Modified: geronimo/server/trunk/framework/configs/rmi-naming/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/rmi-naming/pom.xml?rev=902360&r1=902359&r2=902360&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/rmi-naming/pom.xml (original)
+++ geronimo/server/trunk/framework/configs/rmi-naming/pom.xml Sat Jan 23 07:33:35 2010
@@ -86,6 +86,17 @@
             <artifactId>xbean-naming</artifactId>
         </dependency>
 
+        <!-- aries jndi integration -->
+        <dependency>
+            <groupId>org.apache.aries.jndi</groupId>
+            <artifactId>org.apache.aries.jndi.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.jndi</groupId>
+            <artifactId>org.apache.aries.jndi.url</artifactId>
+        </dependency>
+        
+
     </dependencies>
 
     <build>
@@ -106,10 +117,10 @@
                                     <attribute name="port">${NamingPort + PortOffset}</attribute>
                                     <attribute name="host">${ServerHostname}</attribute>
                                 </gbean>
-                                <gbean name="NamingProperties">
-                                    <!-- Check whether this really works if host name
is 0.0.0.0 -->
-                                    <attribute name="namingProviderUrl">rmi://${ServerHostname}:${NamingPort
+ PortOffset}</attribute>
-                                </gbean>
+                                <!--<gbean name="NamingProperties">-->
+                                    <!--&lt;!&ndash; Check whether this really
works if host name is 0.0.0.0 &ndash;&gt;-->
+                                    <!--<attribute name="namingProviderUrl">rmi://${ServerHostname}:${NamingPort
+ PortOffset}</attribute>-->
+                                <!--</gbean>-->
                                 <gbean name="DefaultThreadPool">
                                     <attribute name="keepAliveTime">30000</attribute>
                                     <attribute name="minPoolSize">${MinThreadPoolSize}</attribute>

Modified: geronimo/server/trunk/framework/configs/rmi-naming/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/rmi-naming/src/main/history/dependencies.xml?rev=902360&r1=902359&r2=902360&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/rmi-naming/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/framework/configs/rmi-naming/src/main/history/dependencies.xml Sat
Jan 23 07:33:35 2010
@@ -7,6 +7,16 @@
         <type>car</type>
     </module-id>
     <dependency>
+        <groupId>org.apache.aries.jndi</groupId>
+        <artifactId>org.apache.aries.jndi.core</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.aries.jndi</groupId>
+        <artifactId>org.apache.aries.jndi.url</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
         <groupId>org.apache.geronimo.framework</groupId>
         <artifactId>geronimo-core</artifactId>
         <type>jar</type>

Modified: geronimo/server/trunk/framework/configs/rmi-naming/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/rmi-naming/src/main/plan/plan.xml?rev=902360&r1=902359&r2=902360&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/rmi-naming/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/framework/configs/rmi-naming/src/main/plan/plan.xml Sat Jan 23 07:33:35
2010
@@ -25,25 +25,31 @@
         <attribute name="host">${ServerHostname}</attribute>
     </gbean>
 
-    <gbean name="NamingProperties" class="org.apache.geronimo.system.properties.NamingProperties">
-        <attribute name="namingFactoryInitial">org.apache.xbean.naming.global.GlobalContextManager</attribute>
-        <attribute name="namingFactoryUrlPkgs">org.apache.geronimo.naming</attribute>
-        <attribute name="namingProviderUrl">rmi://localhost:1099</attribute>
-    </gbean>
+    <!--<gbean name="NamingProperties" class="org.apache.geronimo.system.properties.NamingProperties">-->
+    <!--<attribute name="namingFactoryInitial">org.apache.xbean.naming.global.GlobalContextManager</attribute>-->
+    <!--&lt;!&ndash;<attribute name="namingFactoryUrlPkgs">org.apache.geronimo.naming</attribute>&ndash;&gt;-->
+    <!--<attribute name="namingProviderUrl">rmi://localhost:1099</attribute>-->
+    <!--</gbean>-->
 
-    <gbean name="GlobalContext" class="org.apache.geronimo.gjndi.GlobalContextGBean"/>
+    <!--<gbean name="GlobalContext" class="org.apache.geronimo.gjndi.GlobalContextGBean"/>-->
 
     <gbean name="JavaGlobalContext" class="org.apache.geronimo.gjndi.FederatedContextGBean">
         <attribute name="nameInNamespace">java:</attribute>
     </gbean>
 
-    <gbean name="JavaContext" class="org.apache.geronimo.gjndi.WritableContextGBean">
+    <gbean name="JavaContext" class="org.apache.geronimo.gjndi.WritableFederatedContextMember">
         <attribute name="nameInNamespace">java:</attribute>
+        <reference name="Federation">
+            <name>JavaGlobalContext</name>
+        </reference>
     </gbean>
-
-    <gbean name="GeronimoContext" class="org.apache.geronimo.gjndi.WritableContextGBean">
-        <attribute name="nameInNamespace">ger:</attribute>
-    </gbean>
+    <!--<gbean name="JavaContext" class="org.apache.geronimo.gjndi.WritableContextGBean">-->
+    <!--<attribute name="nameInNamespace">java:</attribute>-->
+    <!--</gbean>-->
+
+    <!--<gbean name="GeronimoContext" class="org.apache.geronimo.gjndi.WritableContextGBean">-->
+    <!--<attribute name="nameInNamespace">ger:</attribute>-->
+    <!--</gbean>-->
 
     <gbean name="MBeanServerReference" class="org.apache.geronimo.system.jmx.RealMBeanServerReference">
         <attribute name="usePlatformMBeanServer">true</attribute>

Added: geronimo/server/trunk/framework/configs/rmi-naming/src/main/resources/OSGI-INF/blueprint/naming-providers.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/rmi-naming/src/main/resources/OSGI-INF/blueprint/naming-providers.xml?rev=902360&view=auto
==============================================================================
--- geronimo/server/trunk/framework/configs/rmi-naming/src/main/resources/OSGI-INF/blueprint/naming-providers.xml
(added)
+++ geronimo/server/trunk/framework/configs/rmi-naming/src/main/resources/OSGI-INF/blueprint/naming-providers.xml
Sat Jan 23 07:33:35 2010
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed  under the  License is distributed on an "AS IS" BASIS,
+WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or
+implied.
+
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<!--
+
+  blueprint configuration for jndi providers
+  -->
+
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+    <service id="javaContextProvider"
+             interface="javax.naming.spi.ObjectFactory">
+        <service-properties>
+            <entry key="osgi.jndi.urlScheme" value="java"/>
+        </service-properties>
+        <bean class="org.apache.geronimo.naming.java.javaURLContextFactory"/>
+    </service>
+
+    <service id="gerContextProvider"
+             interface="javax.naming.spi.ObjectFactory">
+        <service-properties>
+            <entry key="osgi.jndi.urlScheme" value="ger"/>
+        </service-properties>
+        <bean class="org.apache.geronimo.naming.WritableURLContextFactory">
+            <argument>
+                <value>ger</value>
+            </argument>
+        </bean>
+    </service>
+
+    <service id="jcaContextProvider"
+             interface="javax.naming.spi.ObjectFactory">
+        <service-properties>
+            <entry key="osgi.jndi.urlScheme" value="jca"/>
+        </service-properties>
+        <bean class="org.apache.geronimo.naming.WritableURLContextFactory">
+            <argument>
+                <value>jca</value>
+            </argument>
+        </bean>
+    </service>
+
+    <service id="XBeanInitialContextFactory">
+        <interfaces>
+            <value>javax.naming.spi.InitialContextFactory</value>
+            <value>org.apache.xbean.naming.global.GlobalContextManager</value>
+        </interfaces>
+        <bean class="org.apache.xbean.naming.global.GlobalContextManager"/>
+    </service>
+
+    <service id="rmiContextProvider"
+             interface="javax.naming.spi.ObjectFactory">
+        <service-properties>
+            <entry key="osgi.jndi.urlScheme" value="rmi"/>
+        </service-properties>
+        <bean class="com.sun.jndi.url.rmi.rmiURLContextFactory"/>
+    </service>
+
+
+</blueprint>
\ No newline at end of file

Propchange: geronimo/server/trunk/framework/configs/rmi-naming/src/main/resources/OSGI-INF/blueprint/naming-providers.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/framework/configs/rmi-naming/src/main/resources/OSGI-INF/blueprint/naming-providers.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/framework/configs/rmi-naming/src/main/resources/OSGI-INF/blueprint/naming-providers.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/gjndi/WritableFederatedContextMember.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/gjndi/WritableFederatedContextMember.java?rev=902360&view=auto
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/gjndi/WritableFederatedContextMember.java
(added)
+++ geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/gjndi/WritableFederatedContextMember.java
Sat Jan 23 07:33:35 2010
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.gjndi;
+
+import java.util.Collections;
+
+import javax.naming.NamingException;
+
+import org.apache.geronimo.gbean.GBeanLifecycle;
+import org.apache.geronimo.gbean.annotation.GBean;
+import org.apache.geronimo.gbean.annotation.ParamAttribute;
+import org.apache.geronimo.gbean.annotation.ParamReference;
+import org.apache.xbean.naming.context.ContextAccess;
+import org.apache.xbean.naming.context.WritableContext;
+
+/**
+ * @version $Rev$ $Date$
+ */
+@GBean(j2eeType = "Context")
+public class WritableFederatedContextMember extends WritableContext implements GBeanLifecycle
{
+    private final FederatedContext federation;
+
+    public WritableFederatedContextMember(@ParamAttribute(name = "nameInNamespace") String
nameInNamespace,
+                                          @ParamReference(name="Federation", namingType =
"Context")FederatedContext federation) throws NamingException {
+        super(nameInNamespace, Collections.<String, Object>emptyMap(), ContextAccess.MODIFIABLE,
false);
+        federation.federateContext(this);
+        this.federation = federation;
+    }
+
+    @Override
+    public void doStart() throws Exception {
+    }
+
+    @Override
+    public void doStop() throws Exception {
+        federation.unfederateContext(this);
+    }
+
+    @Override
+    public void doFail() {
+        try {
+            doStop();
+        } catch (Exception e) {
+            //ignore
+        }
+    }
+}

Propchange: geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/gjndi/WritableFederatedContextMember.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/gjndi/WritableFederatedContextMember.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/gjndi/WritableFederatedContextMember.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/naming/AbstractURLContextFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/naming/AbstractURLContextFactory.java?rev=902360&view=auto
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/naming/AbstractURLContextFactory.java
(added)
+++ geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/naming/AbstractURLContextFactory.java
Sat Jan 23 07:33:35 2010
@@ -0,0 +1,38 @@
+package org.apache.geronimo.naming;
+
+import java.util.Hashtable;
+
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NamingException;
+import javax.naming.spi.ObjectFactory;
+
+import org.apache.geronimo.naming.java.RootContext;
+
+public abstract class AbstractURLContextFactory implements ObjectFactory {
+    public String urlScheme;
+
+    public AbstractURLContextFactory(String urlScheme) {
+        this.urlScheme = urlScheme + ":";
+    }
+
+    @Override
+    public Object getObjectInstance(Object o, Name name, Context context, Hashtable<?,
?> hashtable) throws Exception {
+        if (o == null) {
+            return getContext();
+        }
+        if (o instanceof String) {
+            return getContext().lookup((String) o);
+        }
+        if (o instanceof String[]) {
+            for (String s : (String[]) o) {
+                if (s.startsWith(urlScheme)) {
+                    return getContext().lookup(s);
+                }
+            }
+        }
+        throw new NamingException("Could not locate a way to look up " + o + " in url context
for " + urlScheme);
+    }
+
+    protected abstract Context getContext() throws NamingException;
+}
\ No newline at end of file

Propchange: geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/naming/AbstractURLContextFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/naming/AbstractURLContextFactory.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/naming/AbstractURLContextFactory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/naming/WritableURLContextFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/naming/WritableURLContextFactory.java?rev=902360&view=auto
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/naming/WritableURLContextFactory.java
(added)
+++ geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/naming/WritableURLContextFactory.java
Sat Jan 23 07:33:35 2010
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.naming;
+
+import java.util.Collections;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+
+import org.apache.xbean.naming.context.ContextAccess;
+import org.apache.xbean.naming.context.WritableContext;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class WritableURLContextFactory extends AbstractURLContextFactory {
+
+    private final Context context;
+
+    public WritableURLContextFactory(String urlScheme) throws NamingException {
+        super(urlScheme);
+        context = new WritableContext(urlScheme + ":", Collections.<String, Object>emptyMap(),
ContextAccess.MODIFIABLE, false);
+    }
+
+    @Override
+    protected Context getContext() throws NamingException {
+        return context;
+    }
+}

Propchange: geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/naming/WritableURLContextFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/naming/WritableURLContextFactory.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/naming/WritableURLContextFactory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/naming/java/javaURLContextFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/naming/java/javaURLContextFactory.java?rev=902360&r1=902359&r2=902360&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/naming/java/javaURLContextFactory.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-naming/src/main/java/org/apache/geronimo/naming/java/javaURLContextFactory.java
Sat Jan 23 07:33:35 2010
@@ -21,31 +21,20 @@
 package org.apache.geronimo.naming.java;
 
 import javax.naming.Context;
-import javax.naming.Name;
 import javax.naming.NamingException;
-import javax.naming.spi.ObjectFactory;
-import java.util.Hashtable;
+
+import org.apache.geronimo.naming.AbstractURLContextFactory;
 
 /**
  * @version $Rev$ $Date$
  */
-public class javaURLContextFactory implements ObjectFactory {
+public class javaURLContextFactory extends AbstractURLContextFactory {
+
+    public javaURLContextFactory() {
+        super("java");
+    }
 
-    @Override
-    public Object getObjectInstance(Object o, Name name, Context context, Hashtable<?,
?> hashtable) throws Exception {
-        if (o == null) {
-            return new RootContext();
-        }
-        if (o instanceof String) {
-            return new RootContext().lookup((String) o);
-        }
-        if (o instanceof String[]) {
-            for (String s: (String[])o) {
-                if (s.startsWith("java:")) {
-                    return new RootContext().lookup(s);
-                }
-            }
-        }
-        throw new NamingException("Could not locate a way to look up " + o);
+    protected Context getContext() throws NamingException {
+        return new RootContext();
     }
 }

Modified: geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/properties/NamingProperties.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/properties/NamingProperties.java?rev=902360&r1=902359&r2=902360&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/properties/NamingProperties.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/properties/NamingProperties.java
Sat Jan 23 07:33:35 2010
@@ -35,7 +35,9 @@
 
     public NamingProperties(String namingFactoryInitial, String namingFactoryUrlPkgs, String
namingProviderUrl) {
         setNamingFactoryInitial(namingFactoryInitial);
-        setNamingFactoryUrlPkgs(namingFactoryUrlPkgs);
+        if (namingFactoryUrlPkgs != null) {
+            setNamingFactoryUrlPkgs(namingFactoryUrlPkgs);
+        }
         setNamingProviderUrl(namingProviderUrl);
 
         try {
@@ -60,7 +62,11 @@
     }
 
     public void setNamingFactoryUrlPkgs(String namingFactoryUrlPkgs) {
-        System.setProperty(JAVA_NAMING_FACTORY_URL_PKGS, namingFactoryUrlPkgs);
+        if (namingFactoryUrlPkgs != null) {
+            System.setProperty(JAVA_NAMING_FACTORY_URL_PKGS, namingFactoryUrlPkgs);
+        } else {
+            System.getProperties().remove(JAVA_NAMING_FACTORY_URL_PKGS);
+        }
     }
 
     public String getNamingProviderUrl() {

Modified: geronimo/server/trunk/framework/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/pom.xml?rev=902360&r1=902359&r2=902360&view=diff
==============================================================================
--- geronimo/server/trunk/framework/pom.xml (original)
+++ geronimo/server/trunk/framework/pom.xml Sat Jan 23 07:33:35 2010
@@ -102,6 +102,16 @@
                 <version>1.1.2</version>
             </dependency>
 
+            <dependency>
+                <groupId>org.apache.aries.jndi</groupId>
+                <artifactId>org.apache.aries.jndi.core</artifactId>
+                <version>1.0.0-incubating-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.aries.jndi</groupId>
+                <artifactId>org.apache.aries.jndi.url</artifactId>
+                <version>1.0.0-incubating-SNAPSHOT</version>
+            </dependency>
             <!-- overridden dependencies -->
             <!--<dependency>-->
                 <!--<groupId>org.apache.geronimo.components</groupId>-->



Mime
View raw message