You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by am...@apache.org on 2002/08/21 10:18:21 UTC
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans MBeanFactory.java mbeans-descriptors.xml
amyroh 2002/08/21 01:18:21
Modified: catalina/src/share/org/apache/catalina/mbeans
MBeanFactory.java mbeans-descriptors.xml
Log:
Add xmlNamespaceAware and xmlValidation attributes to StandardHostMBean.
Revision Changes Path
1.2 +30 -26 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java
Index: MBeanFactory.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MBeanFactory.java 18 Jul 2002 16:48:00 -0000 1.1
+++ MBeanFactory.java 21 Aug 2002 08:18:20 -0000 1.2
@@ -181,7 +181,7 @@
}
-
+
/**
* Little convenience method to remove redundant code
* when retrieving the path string
@@ -196,7 +196,7 @@
return t;
}
-
+
/**
* Create a new AccessLoggerValve.
*
@@ -373,8 +373,8 @@
return (oname.toString());
}
-
-
+
+
/**
* Create a new HttpConnector
*
@@ -429,7 +429,7 @@
}
-
+
/**
* Create a new HttpsConnector
*
@@ -480,12 +480,12 @@
Object arglist4[] = new Object[1];
arglist4[0] = new Boolean(true);
meth4.invoke(retobj, arglist4);
- // Set factory
- Class serverSocketFactoryCls =
+ // Set factory
+ Class serverSocketFactoryCls =
Class.forName("org.apache.catalina.net.ServerSocketFactory");
- Class coyoteServerSocketFactoryCls =
+ Class coyoteServerSocketFactoryCls =
Class.forName("org.apache.coyote.tomcat4.CoyoteServerSocketFactory");
- Constructor factoryConst =
+ Constructor factoryConst =
coyoteServerSocketFactoryCls.getConstructor(null);
Object factoryObj = factoryConst.newInstance(null);
Class partypes5 [] = new Class[1];
@@ -506,12 +506,12 @@
service.addConnector((Connector)retobj);
} catch (Exception e) {
// FIXME
- // disply error message
+ // disply error message
// the user needs to use keytool to configure SSL first
// addConnector will fail otherwise
return null;
}
-
+
// Return the corresponding MBean name
ManagedBean managed = registry.findManagedBean("CoyoteConnector");
ObjectName oname =
@@ -882,7 +882,9 @@
* @exception Exception if an MBean cannot be created or registered
*/
public String createStandardHost(String parent, String name,
- String appBase, boolean unpackWARs)
+ String appBase, boolean unpackWARs,
+ boolean xmlNamespaceAware,
+ boolean xmlValidation)
throws Exception {
// Create a new StandardHost instance
@@ -890,6 +892,8 @@
host.setName(name);
host.setAppBase(appBase);
host.setUnpackWARs(unpackWARs);
+ host.setXmlNamespaceAware(xmlNamespaceAware);
+ host.setXmlValidation(xmlValidation);
// Add the new instance to its parent component
ObjectName pname = new ObjectName(parent);
@@ -987,7 +991,7 @@
Server server = ServerFactory.getServer();
Service service = server.findService(pname.getKeyProperty("service"));
Engine engine = (Engine) service.getContainer();
- if (type.equals("Context")) {
+ if (type.equals("Context")) {
Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
String pathStr = getPathStr(pname.getKeyProperty("path"));
Context context = (Context) host.findChild(pathStr);
@@ -1046,7 +1050,7 @@
return (oname.toString());
}
-
+
/**
* Create a new UserDatabaseRealm.
*
@@ -1085,10 +1089,10 @@
ObjectName oname =
MBeanUtils.createObjectName(managed.getDomain(), realm);
return (oname.toString());
-
+
}
-
+
/**
* Create a new Web Application Loader.
*
@@ -1139,7 +1143,7 @@
Service service = server.findService(serviceName);
String port = oname.getKeyProperty("port");
String address = oname.getKeyProperty("address");
-
+
Connector conns[] = (Connector[]) service.findConnectors();
for (int i = 0; i < conns.length; i++) {
@@ -1149,7 +1153,7 @@
String connAddress = null;
if (addrObj != null) {
connAddress = addrObj.toString();
- }
+ }
Method getPortMeth = cls.getMethod("getPort", null);
Object portObj = getPortMeth.invoke(conns[i], null);
String connPort = new String();
@@ -1163,7 +1167,7 @@
// Remove this component from its parent component
service.removeConnector(conns[i]);
break;
- }
+ }
}
}
@@ -1232,7 +1236,7 @@
ObjectName oname = new ObjectName(name);
String serviceName = oname.getKeyProperty("service");
String hostName = oname.getKeyProperty("host");
-
+
String path = oname.getKeyProperty("path");
Server server = ServerFactory.getServer();
Service service = server.findService(serviceName);
@@ -1333,7 +1337,7 @@
}
-
+
/**
* Remove an existing Realm.
*
@@ -1395,7 +1399,7 @@
}
}
-
+
/**
* Remove an existing Service.
*
1.7 +9 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml
Index: mbeans-descriptors.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- mbeans-descriptors.xml 16 Aug 2002 23:54:23 -0000 1.6
+++ mbeans-descriptors.xml 21 Aug 2002 08:18:20 -0000 1.7
@@ -2100,6 +2100,14 @@
is="true"
type="boolean"/>
+ <attribute name="xmlNamespaceAware"
+ description="Attribute value used to turn on/off XML namespace awarenes"
+ type="boolean"/>
+
+ <attribute name="xmlValidation"
+ description="Attribute value used to turn on/off XML validation"
+ type="boolean"/>
+
<operation name="addAlias"
description="Add an alias name that should be mapped to this Host"
impact="ACTION"
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>