Hi I am using JBoss 3.2.3 and I have written a proxy class to invoke ejb methods.
public Object invoke(Object ejbObjectName, String methodName, Object[] parms)
Iam invoking the method above because I have the Localobject with me when I call the invoke method.
my parms include LocalObject parameter types as well.
implementation inside the invoke method says
Class[] parmClass = new Class[parms.length];
for (int i=0;i<parms.length;i++)
parmClass=parms.getClass();
but it does not covert to real type because it returns a proxy class.
how can I get the actual EJBLocalObject cladd from the parm object.
-----------
invoke methos is here.
public Object invoke(Object ejbObjectName, String methodName, Object[] parms){
Object result = null;
try {
Class[] parmClass = new Class[parms.length];
for (int i=0;i<parms.length;i++)
parmClass=parms.getClass();
//System.out.println(parms.);
Method bizMethod = ejbObjectName.getClass().getMethod(methodName,parmClass);
/*Now call the desired method on it
*/
result = bizMethod.invoke(ejbObjectName, parms);
} catch (Exception e) {
System.err.println("Caught an exception in invoke method.");
}
return result;
}