rsitze      2002/10/10 13:47:01

  Modified:    java/src/org/apache/axis/i18n resource.properties
               java/src/org/apache/axis/components/net
                        SocketFactoryFactory.java
               java/docs integration-guide.html
               java/src/org/apache/axis/configuration
                        EngineConfigurationFactoryFinder.java
  Added:       java/src/org/apache/axis/components/net
                        JSSESocketFactory.java
  Removed:     java/src/org/apache/axis/components/net
                        DefaultSecureSocketFactory.java
                        JDK14FakeTrustSocketFactory.java
                        JDK14JSSESocketFactory.java
  Log:
  Put 'real' fix in for servlet load problem (13149).
  Changed default JSSE to be SSL & configured via JSSE only.
  This is the only portable solution.  Previous behaviour
  available with code in o.a.a.components.net.Sun*.
  
  Revision  Changes    Path
  1.15      +1 -0      xml-axis/java/src/org/apache/axis/i18n/resource.properties
  
  Index: resource.properties
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/i18n/resource.properties,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- resource.properties       10 Oct 2002 17:22:54 -0000      1.14
  +++ resource.properties       10 Oct 2002 20:46:59 -0000      1.15
  @@ -1010,6 +1010,7 @@
   engineConfigMissingNewFactory=Factory {0} Ignored: missing required method: {1}.
   engineConfigInvokeNewFactory=Factory {0} Ignored: invoke method failed: {1}.
   engineConfigFactoryMissing=Unable to locate a valid EngineConfigurationFactory
  +engineConfigLoadFactory=Factory {0} Ignored: unable to load/resolve class.
   
   noClassNameAttr00=classname attribute is missing.
   noValidHeader=qname attribute is missing.
  
  
  
  1.10      +1 -1      
xml-axis/java/src/org/apache/axis/components/net/SocketFactoryFactory.java
  
  Index: SocketFactoryFactory.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/components/net/SocketFactoryFactory.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SocketFactoryFactory.java 9 Oct 2002 00:43:05 -0000       1.9
  +++ SocketFactoryFactory.java 10 Oct 2002 20:47:00 -0000      1.10
  @@ -95,7 +95,7 @@
                                          "axis.socketSecureFactory");
   
           AxisProperties.setClassDefault(SecureSocketFactory.class,
  -                                       
"org.apache.axis.components.net.DefaultSecureSocketFactory");
  +                                       
"org.apache.axis.components.net.JSSESocketFactory");
       }
       
       /**
  
  
  
  1.8       +13 -170   
xml-axis/java/src/org/apache/axis/components/net/JSSESocketFactory.java
  
  
  
  
  1.17      +2 -57     xml-axis/java/docs/integration-guide.html
  
  Index: integration-guide.html
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/docs/integration-guide.html,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- integration-guide.html    9 Oct 2002 22:08:47 -0000       1.16
  +++ integration-guide.html    10 Oct 2002 20:47:00 -0000      1.17
  @@ -200,7 +200,7 @@
   <td><code>SocketFactoryFactory.getSecureFactory()</code></td>
   <td><code>SecureSocketFactory</code></td>
   <td><code>axis.socketSecureFactory</code></td>
  -<td><code>DefaultSecureSocketFactory</code></td>
  +<td><code>JSSESocketFactory</code></td>
   </tr>
   </table>
   
  @@ -1344,62 +1344,7 @@
   (see <a href="#Pluggable APIs">Pluggable APIs</a>)
   uses JSSE security.
   Review the JSSE documentation for details on
  -installing and registering (if appropriate) JSSE into your JDK,
  -and for details on how to configuration JSSE.
  -Configuration for the JVM is offered by JSSE and the Java security model.
  -JSSE properties are set in the file
  -<code>&lt;JAVA_HOME&gt;/lib/security/java.security</code>.
  -<p>
  -AXIS allows per-instance overrides of various properties
  -that apply to individual Axis instances,
  -determined by the attributes passed to the Axis constructor/factory
  -(?this may be broken, but can still configure via JSSE).
  -<p>
  -The following table summarizes settings, order in which they are checked is 
left-to-right:
  -<table border="1">
  -<tr>
  -<th>Description</th>
  -<th>System Property</th>
  -<th>AXIS attribute</th>
  -<th>JSSE property</th>
  -<th>Default</th>
  -</tr>
  -<tr>
  -<td>Provider</td>
  -<td>n/a</td>
  -<td>n/a</td>
  -<td>security.provider.&lt;n&gt;</td>
  -<td>See JSSE Spec</td>
  -</tr>
  -<tr>
  -<td>KeyStore File Name</td>
  -<td>javax.net.ssl.keyStore</td>
  -<td>keystore</td>
  -<td>n/a</td>
  -<td>&lt;user.home&gt;/.keystore</td>
  -</tr>
  -<tr>
  -<td>KeyStore Type</td>
  -<td>javax.net.ssl.keyStoreType</td>
  -<td>keystoreType</td>
  -<td>keystore.type</td>
  -<td>See JSSE Spec</td>
  -</tr>
  -<tr>
  -<td>KeyStore Password</td>
  -<td></td>
  -<td>keystorePass</td>
  -<td></td>
  -<td>See JSSE Spec</td>
  -</tr>
  -<tr>
  -<td></td>
  -<td></td>
  -</tr>
  -</table>
  -<p>
  -Note that the above table does not cover all properties/settings
  -provided by JSSE.
  +installing, registering, and configuring JSSE for your runtime environment.
   
   </body>
   </html>
  
  
  
  1.21      +35 -26    
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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- EngineConfigurationFactoryFinder.java     9 Oct 2002 00:43:05 -0000       1.20
  +++ EngineConfigurationFactoryFinder.java     10 Oct 2002 20:47:01 -0000      1.21
  @@ -196,38 +196,47 @@
                                                            Class[] paramTypes,
                                                            Object[] param) {
           /**
  -         * Verify that service implements:
  -         *  public static EngineConfigurationFactory newFactory(Object);
  +         * Some JDK's may link on method resolution (findPublicStaticMethod)
  +         * and others on method call (method.invoke).
  +         * 
  +         * Either way, catch class load/resolve problems and return null.
            */
  -        Method method =
  -            ClassUtils.findPublicStaticMethod(service,
  -                                              EngineConfigurationFactory.class,
  -                                              "newFactory",
  -                                              paramTypes);
  -
  -
  -        if (method == null) {
  -            log.warn(Messages.getMessage("engineConfigMissingNewFactory",
  -                                          service.getName(),
  -                                          requiredMethod));
  -        } else {
  -            try {
  -                return (EngineConfigurationFactory)method.invoke(null, param);
  -            } catch (InvocationTargetException e) {
  -                if (e.getTargetException() instanceof 
java.lang.NoClassDefFoundError) {
  -                    log.debug(Messages.getMessage("engineConfigInvokeNewFactory",
  -                                                  service.getName(),
  -                                                  requiredMethod), e);
  -                } else {
  +        
  +        try {
  +            /**
  +             * Verify that service implements:
  +             *  public static EngineConfigurationFactory newFactory(Object);
  +             */
  +            Method method = ClassUtils.findPublicStaticMethod(service,
  +                                                  EngineConfigurationFactory.class,
  +                                                  "newFactory",
  +                                                  paramTypes);
  +    
  +            if (method == null) {
  +                log.warn(Messages.getMessage("engineConfigMissingNewFactory",
  +                                              service.getName(),
  +                                              requiredMethod));
  +            } else {
  +                try {
  +                    return (EngineConfigurationFactory)method.invoke(null, param);
  +                } catch (InvocationTargetException e) {
  +                    if (e.getTargetException() instanceof NoClassDefFoundError) {
  +                        log.debug(Messages.getMessage("engineConfigLoadFactory",
  +                                                      service.getName()));
  +                    } else {
  +                        log.warn(Messages.getMessage("engineConfigInvokeNewFactory",
  +                                                      service.getName(),
  +                                                      requiredMethod), e);
  +                    }
  +                } catch (Exception e) {
                       log.warn(Messages.getMessage("engineConfigInvokeNewFactory",
                                                     service.getName(),
                                                     requiredMethod), e);
                   }
  -            } catch (Exception e) {
  -                log.warn(Messages.getMessage("engineConfigInvokeNewFactory",
  -                                              service.getName(),
  -                                              requiredMethod), e);
               }
  +        } catch (NoClassDefFoundError e) {
  +            log.debug(Messages.getMessage("engineConfigLoadFactory",
  +                                          service.getName()));
           }
   
           return null;
  
  
  


Reply via email to