dims 2002/09/30 11:33:04
Modified: java build.xml
java/src/org/apache/axis/configuration
EngineConfigurationFactoryFinder.java
Log:
- Possible Fix for Bug #13149 - Client requires servlet.jar
Notes:
- Richard, please feel free to override this fix
- Am able to run "ant clean all-tests" (WITHOUT servlet.jar) with these changes.
Revision Changes Path
1.202 +3 -0 xml-axis/java/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/xml-axis/java/build.xml,v
retrieving revision 1.201
retrieving revision 1.202
diff -u -r1.201 -r1.202
--- build.xml 26 Sep 2002 20:39:22 -0000 1.201
+++ build.xml 30 Sep 2002 18:33:04 -0000 1.202
@@ -93,12 +93,15 @@
<exclude name="**/org/apache/axis/attachments/ImageDataSource.java"
unless="jimiAndAttachments.present"/>
<exclude name="**/org/apache/axis/attachments/MimeMultipartDataSource.java"
unless="attachments.present"/>
<exclude name="**/org/apache/axis/attachments/PlainTextDataSource.java"
unless="attachments.present"/>
+ <exclude
name="**/org/apache/axis/configuration/EngineConfigurationFactoryServlet.java"
unless="servlet.present"/>
<exclude
name="**/org/apache/axis/configuration/ServletEngineConfigurationFactory.java"
unless="servlet.present"/>
<exclude name="**/org/apache/axis/encoding/ser/JAFDataHandlerSerializer.java"
unless="attachments.present"/>
<exclude
name="**/org/apache/axis/encoding/ser/JAFDataHandlerDeserializerFactory.java"
unless="attachments.present"/>
<exclude
name="**/org/apache/axis/encoding/ser/JAFDataHandlerSerializerFactory.java"
unless="attachments.present"/>
<exclude
name="**/org/apache/axis/encoding/ser/JAFDataHandlerDeserializer.java"
unless="attachments.present"/>
<exclude name="**/org/apache/axis/handlers/MD5AttachHandler.java"
unless="attachments.present"/>
+ <exclude name="**/org/apache/axis/handlers/SOAPMonitorHandler.java"
unless="servlet.present"/>
+ <exclude name="**/org/apache/axis/monitor/SOAPMonitorService.java"
unless="servlet.present"/>
<exclude name="**/org/apache/axis/transport/http/AdminServlet.java"
unless="servlet.present"/>
<exclude name="**/org/apache/axis/transport/http/AxisHttpSession.java"
unless="servlet.present"/>
<exclude name="**/org/apache/axis/transport/http/AxisServlet.java"
unless="servlet.present"/>
1.15 +13 -4
xml-axis/java/src/org/apache/axis/configuration/EngineConfigurationFactoryFinder.java
Index: EngineConfigurationFactoryFinder.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/configuration/EngineConfigurationFactoryFinder.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- EngineConfigurationFactoryFinder.java 26 Sep 2002 20:51:35 -0000 1.14
+++ EngineConfigurationFactoryFinder.java 30 Sep 2002 18:33:04 -0000 1.15
@@ -168,11 +168,20 @@
}
if (factory == null) {
+ String className =
"org.apache.axis.configuration.EngineConfigurationFactoryServlet";
try {
- factory =
EngineConfigurationFactoryServlet.newFactory(obj);
- } catch (RuntimeException e) {
+ ClassLoader loader =
EngineConfigurationFactory.class.getClassLoader();
+ Class clazz = loader.loadClass(className);
+ Method method =
+ ClassUtils.findPublicStaticMethod(clazz,
+
EngineConfigurationFactory.class,
+ "newFactory",
+
newFactoryParamTypes);
+ factory =
(EngineConfigurationFactory)method.invoke(null, params);
+ } catch (ClassNotFoundException e) {
+ } catch (Throwable e) {
log.warn(Messages.getMessage("engineConfigInvokeNewFactory",
-
EngineConfigurationFactoryServlet.class.getName(),
+ className,
requiredMethod), e);
}
@@ -180,7 +189,7 @@
try {
// should NEVER return null.
factory =
EngineConfigurationFactoryDefault.newFactory(obj);
- } catch (RuntimeException e) {
+ } catch (Throwable e) {
log.warn(Messages.getMessage("engineConfigInvokeNewFactory",
EngineConfigurationFactoryDefault.class.getName(),
requiredMethod),
e);