Author: xuhaihong
Date: Wed Sep 2 06:24:00 2009
New Revision: 810373
URL: http://svn.apache.org/viewvc?rev=810373&view=rev
Log:
GERONIMO-4713 Disable Tomcat JNDI
Modified:
geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ServerType.java
geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/test/resources/deployables/server-1.xml
geronimo/server/trunk/plugins/tomcat/tomcat6/src/main/filtered-resources/tomcat-base/server.xml
geronimo/server/trunk/plugins/tomcat/tomcat6/src/main/plan/plan.xml
Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ServerType.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ServerType.java?rev=810373&r1=810372&r2=810373&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ServerType.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ServerType.java
Wed Sep 2 06:24:00 2009
@@ -9,27 +9,29 @@
package org.apache.geronimo.tomcat.model;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.HashMap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.namespace.QName;
-import org.apache.catalina.Server;
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleListener;
+import org.apache.catalina.Server;
import org.apache.catalina.Service;
import org.apache.catalina.core.StandardServer;
import org.apache.catalina.deploy.NamingResources;
+import org.apache.geronimo.kernel.Kernel;
import org.apache.xbean.recipe.ObjectRecipe;
import org.apache.xbean.recipe.Option;
-import org.apache.geronimo.kernel.Kernel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -64,6 +66,8 @@
})
public class ServerType {
+ private static final Logger logger = LoggerFactory.getLogger(ServerType.class);
+
@XmlElement(name = "Listener")
protected List<ListenerType> listener;
@XmlElement(name = "GlobalNamingResources")
@@ -276,9 +280,14 @@
}
NamingResources globalNamingResources = new NamingResources();
- for (NamingResourcesType naming: getGlobalNamingResources()) {
+ if(getGlobalNamingResources().size() > 0) {
+ logger.warn("All the resource settings in the server.xml are ignored, please
use Geronimo deployment plan to define those configurations");
+ }
+ /*
+ for (NamingResourcesType naming: getGlobalNamingResources()) {
naming.merge(globalNamingResources, cl);
}
+ */
instance.setGlobalNamingResources(globalNamingResources);
for (ServiceType serviceType: getService()) {
Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/test/resources/deployables/server-1.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/test/resources/deployables/server-1.xml?rev=810373&r1=810372&r2=810373&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/test/resources/deployables/server-1.xml
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/test/resources/deployables/server-1.xml
Wed Sep 2 06:24:00 2009
@@ -32,19 +32,6 @@
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
- <!-- Global JNDI resources
- Documentation at /docs/jndi-resources-howto.html
- -->
- <GlobalNamingResources>
- <!-- Editable user database that can also be used by
- UserDatabaseRealm to authenticate users
- -->
- <Resource name="UserDatabase" auth="Container"
- type="org.apache.catalina.UserDatabase"
- description="User database that can be updated and saved"
- factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
- pathname="conf/tomcat-users.xml" />
- </GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
@@ -116,13 +103,6 @@
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
-->
- <!-- This Realm uses the UserDatabase configured in the global JNDI
- resources under the key "UserDatabase". Any edits
- that are performed against this UserDatabase are immediately
- available for use by the Realm. -->
- <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
- resourceName="UserDatabase"/>
-
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
Modified: geronimo/server/trunk/plugins/tomcat/tomcat6/src/main/filtered-resources/tomcat-base/server.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/tomcat6/src/main/filtered-resources/tomcat-base/server.xml?rev=810373&r1=810372&r2=810373&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/tomcat6/src/main/filtered-resources/tomcat-base/server.xml
(original)
+++ geronimo/server/trunk/plugins/tomcat/tomcat6/src/main/filtered-resources/tomcat-base/server.xml
Wed Sep 2 06:24:00 2009
@@ -32,19 +32,10 @@
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
- <!-- Global JNDI resources
- Documentation at /docs/jndi-resources-howto.html
- -->
- <GlobalNamingResources>
- <!-- Editable user database that can also be used by
- UserDatabaseRealm to authenticate users
- -->
- <Resource name="UserDatabase" auth="Container"
- type="org.apache.catalina.UserDatabase"
- description="User database that can be updated and saved"
- factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
- pathname="conf/tomcat-users.xml"/>
- </GlobalNamingResources>
+ <!--
+ Geronimo uses its own JNDI implementation, globalNamingResources configurations in
+ the server.xml are not supported, please define them in the Geronimo deployment plans
+ -->
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
@@ -132,14 +123,7 @@
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
- -->
-
- <!-- This Realm uses the UserDatabase configured in the global JNDI
- resources under the key "UserDatabase". Any edits
- that are performed against this UserDatabase are immediately
- available for use by the Realm. -->
- <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
- resourceName="UserDatabase"/>
+ -->
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
Modified: geronimo/server/trunk/plugins/tomcat/tomcat6/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/tomcat6/src/main/plan/plan.xml?rev=810373&r1=810372&r2=810373&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/tomcat6/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/plugins/tomcat/tomcat6/src/main/plan/plan.xml Wed Sep 2 06:24:00
2009
@@ -23,6 +23,7 @@
<gbean name="CatalinaSystemProperties" class="org.apache.geronimo.system.properties.SystemProperties">
<attribute name="systemProperties">
org.apache.catalina.STRICT_SERVLET_COMPLIANCE=true
+ catalina.useNaming=false
</attribute>
</gbean>
|