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:07:00 GMT
rubys       01/12/08 15:07:00

  Modified:    java/src/org/apache/axis/providers/java Tag: alpha-3
                        EJBProvider.java JavaProvider.java
               java/src/org/apache/axis/utils Tag: alpha-3
                        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
  No                   revision
  
  
  No                   revision
  
  
  1.9.2.1   +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.9.2.1
  diff -u -r1.9 -r1.9.2.1
  --- EJBProvider.java	2001/12/03 22:49:24	1.9
  +++ EJBProvider.java	2001/12/08 23:06:59	1.9.2.1
  @@ -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.27.2.1  +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.27.2.1
  diff -u -r1.27 -r1.27.2.1
  --- JavaProvider.java	2001/12/03 22:49:24	1.27
  +++ JavaProvider.java	2001/12/08 23:07:00	1.27.2.1
  @@ -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("*"))
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.20.2.2  +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.20.2.1
  retrieving revision 1.20.2.2
  diff -u -r1.20.2.1 -r1.20.2.2
  --- resources.properties	2001/12/05 20:30:57	1.20.2.1
  +++ resources.properties	2001/12/08 23:07:00	1.20.2.2
  @@ -568,3 +568,7 @@
   deploy07=<!--   java org.apache.axis.client.AdminClient deploy.wsdd       -->
   deploy08=<!--   java org.apache.axis.client.AdminClient undeploy.wsdd     -->
   deploy09=<!--      after the axis server is running                       -->
  +
  +#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