axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/utils resources.properties
Date Sat, 08 Dec 2001 23:29:43 GMT
rubys       01/12/08 15:29:43

  Modified:    java/src/org/apache/axis/providers/java EJBProvider.java
                        JavaProvider.java
               java/src/org/apache/axis/utils resources.properties
  Log:
  1. Fix in JavaProvider to specify correctly a missing "allowedMethods"
  entry vs. an invalid "beanJndiName" - serviceClassNameOption
  2. Addition of PortableRemoteObject.narrow to EJBProvider (as required via
  EJB specification)
  3. Addition of homeInterfaceClass option to specific the class of the EJBs
  Home Interface which is required for narrowing
  4. Internationalization of messages within EJBProvider.java (and additional
  resources.properties file update)
  Submitted by: Greg Truty <gtruty@us.ibm.com>
  
  Revision  Changes    Path
  1.10      +12 -8     xml-axis/java/src/org/apache/axis/providers/java/EJBProvider.java
  
  Index: EJBProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/providers/java/EJBProvider.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- EJBProvider.java	2001/12/03 22:49:24	1.9
  +++ EJBProvider.java	2001/12/08 23:29:43	1.10
  @@ -75,6 +75,7 @@
   {
       private static final String beanNameOption = "beanJndiName";
       private static final String allowedMethodsOption = "allowedMethods";
  +    private static final String homeInterfaceNameOption = "homeInterfaceName";
       public static final String jndiContextClass = "jndiContextClass";
       public static final String jndiURL = "jndiURL";
       public static final String jndiUsername = "jndiUser";
  @@ -150,24 +151,27 @@
               }
   
               if (context == null)
  -            {
  -                throw new AxisFault("EJBProvider can't get Context");
  -            }
  +                throw new AxisFault( JavaUtils.getMessage("cannotCreateInitialContext00"));
   
               home = context.lookup(clsName);
               if (home == null)
  -            {
  -                throw new AxisFault("EJBProvider can't get Bean Home");
  -            }
  +                throw new AxisFault( JavaUtils.getMessage("cannotFindJNDIHome00",clsName));
           }
  +        // Should probably catch javax.naming.NameNotFoundException here 
           catch (Exception exception)
           {
               throw AxisFault.makeFault(exception);
           }
  +
  +        String homeName = (String) getStrOption(homeInterfaceNameOption, 
  +                                                                            serviceHandler);
  +        if (homeName == null) 
  +            throw new AxisFault(JavaUtils.getMessage("noOption00", homeInterfaceNameOption,
msgContext.getTargetService()));
   
  -        Class homeClass = home.getClass();
  +        Class homeClass = msgContext.getClassLoader().loadClass(homeName);
  +        Object ehome = javax.rmi.PortableRemoteObject.narrow(home, homeClass);
           Method createMethod = homeClass.getMethod("create", empty_class_array);
  -        Object result = createMethod.invoke(home, empty_object_array);
  +        Object result = createMethod.invoke(ehome, empty_object_array);
   
           return result;
       }
  
  
  
  1.28      +1 -1      xml-axis/java/src/org/apache/axis/providers/java/JavaProvider.java
  
  Index: JavaProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/providers/java/JavaProvider.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- JavaProvider.java	2001/12/03 22:49:24	1.27
  +++ JavaProvider.java	2001/12/08 23:29:43	1.28
  @@ -204,7 +204,7 @@
   
           if ((allowedMethods == null) || allowedMethods.equals(""))
               throw new AxisFault("Server.NoMethodConfig",
  -                JavaUtils.getMessage("noOption00", getServiceClassNameOptionName(), serviceName),
  +                JavaUtils.getMessage("noOption00", getServiceAllowedMethodsOptionName(),
serviceName),
                   null, null);
   
           if (allowedMethods.equals("*"))
  
  
  
  1.28      +4 -0      xml-axis/java/src/org/apache/axis/utils/resources.properties
  
  Index: resources.properties
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/resources.properties,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- resources.properties	2001/12/07 23:39:21	1.27
  +++ resources.properties	2001/12/08 23:29:43	1.28
  @@ -576,3 +576,7 @@
   optionDebug00=print debug information
   symbolTable00=Symbol Table
   undefined00=Type {0} is referenced but not defined.
  +
  +#NOTE: in cannotFindJNDIHome00, do not translate "EJB" or "JNDI"
  +cannotFindJNDIHome00=Cannot find EJB at JNDI location {0}
  +cannotCreateInitialContext00=Cannot create InitialContext
  
  
  

Mime
View raw message