Hi Chris,
 I've added the following code to do the
reflection testing, however I still can't
find what's wrong here, and appriciate
any assistance you can offer. Again I can
run the code from outside a servlet but not
from within a bean called from the servlet. ??

Thanks for any assistance,
 eyal.


 // Place reflection test.
 Method[] methods = classData.getMethods();
 sRetValue.append( "<BR><BR>" );
 for ( int i = 0; i < methods.length; i++ )
 {
   sRetValue.append( "Name ( " + i + " ) - " + methods[ i ].getName() + "<br>" );
   Class[] params = methods[ i ].getParameterTypes();
   sRetValue.append( "   Params : <br>" );
   for ( int j = 0; j < params.length; j++ )
     sRetValue.append( "   " + j + " - " + params[ j ].getName() + "<BR>" );
     sRetValue.append( "<BR>  Return type -" + methods[ i ].getReturnType().getName() 
);
     int k = methods[ i ].getModifiers();
     sRetValue.append( "<BR>  Modifiers - " + k );
     if ( Modifier.isAbstract( k ) )
        sRetValue.append( "Abstract.<BR>" );
     if ( Modifier.isPrivate( k ) )
        sRetValue.append( "Private.<BR>" );
     if ( Modifier.isProtected( k ) )
       sRetValue.append( "Protected.<BR>" );
     }
    ///// NoSuchMethodException is thrown in the line below
   methodToInvoke = classData.getMethod( mappedData.sMethodName, methodBeanTypes );

This is the resulting test :


After beanInstance.getClass() - WebECom.Products._Product_Stub

Name ( 0 ) - equals
Params :
0 - java.lang.Object
Return type -boolean
Modifiers - 1

Name ( 1 ) - getClass
Params :
Return type -java.lang.Class
Modifiers - 273 Final.

//////// This is the method I'm after !!

Name ( 39 ) - showAllProducts
Params :
0 - WebECom.Utils.RequestWrapper
Return type -java.lang.String
Modifiers - 1

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to