User: jwalters
  Date: 02/03/12 21:13:20

  Modified:    src/main/org/jboss/ejb StatelessSessionContainer.java
  Log:
  Added patch 520631 which puts the missing method into the exception message.
  
  Revision  Changes    Path
  1.34      +26 -2     jboss/src/main/org/jboss/ejb/StatelessSessionContainer.java
  
  Index: StatelessSessionContainer.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/StatelessSessionContainer.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- StatelessSessionContainer.java    15 Feb 2002 00:17:28 -0000      1.33
  +++ StatelessSessionContainer.java    13 Mar 2002 05:13:19 -0000      1.34
  @@ -32,7 +32,7 @@
   * @author <a href="mailto:[EMAIL PROTECTED]";>Rickard Öberg</a>
   * @author <a href="mailto:[EMAIL PROTECTED]";>Marc Fleury</a>
   * @author <a href="mailto:[EMAIL PROTECTED]";>Daniel OConnor</a>
  -* @version $Revision: 1.33 $
  +* @version $Revision: 1.34 $
   * <p><b>2001219 marc fleury</b>
   * <ul>
   * <li> move to the new invocation layer and Invocation object
  @@ -477,7 +477,13 @@
            if (!m[i].getDeclaringClass().getName().equals(declaringClass))
            {
               // Implemented by bean
  -            map.put(m[i], beanClass.getMethod(m[i].getName(), 
m[i].getParameterTypes()));
  +            try {
  +               map.put(m[i], beanClass.getMethod(m[i].getName(), 
m[i].getParameterTypes()));
  +            }
  +            catch (NoSuchMethodException ex)
  +            {
  +               throw new NoSuchMethodException("Method not found in bean class: " + 
formatMethod(m[i]));
  +            }
               if (debug)
                  log.debug("Mapped "+m[i].getName()+" "+m[i].hashCode()+"to 
"+map.get(m[i]));
            }
  @@ -667,4 +673,22 @@
         {
         }
      }
  +
  +   private StringBuffer formatMethod(Method method)
  +   {
  +      StringBuffer buffer = new StringBuffer();
  +      buffer.append(method.getName()).append("(");
  +      Class[] paramTypes = method.getParameterTypes();
  +      for (int count = 0; count < paramTypes.length; count++) {
  +         if (count > 0) {
  +            buffer.append(",");
  +         }
  +         buffer.
  +            
append(paramTypes[count].getName().substring(paramTypes[count].getName().lastIndexOf(".")+1));
  +      }
  +      buffer.append(")");
  +
  +      return buffer;
  +   }
  +
   }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to