[jboss-cvs] JBossAS SVN: r84795 - projects/webbeans-ri-int/trunk/ejb/src/main/java/org/jboss/webbeans/integration/ejb.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Feb 26 06:22:26 EST 2009
Author: petemuir
Date: 2009-02-26 06:22:26 -0500 (Thu, 26 Feb 2009)
New Revision: 84795
Modified:
projects/webbeans-ri-int/trunk/ejb/src/main/java/org/jboss/webbeans/integration/ejb/JBossSessionBeanDescriptorAdaptor.java
Log:
Need to load parameters from strings
Modified: projects/webbeans-ri-int/trunk/ejb/src/main/java/org/jboss/webbeans/integration/ejb/JBossSessionBeanDescriptorAdaptor.java
===================================================================
--- projects/webbeans-ri-int/trunk/ejb/src/main/java/org/jboss/webbeans/integration/ejb/JBossSessionBeanDescriptorAdaptor.java 2009-02-26 11:08:59 UTC (rev 84794)
+++ projects/webbeans-ri-int/trunk/ejb/src/main/java/org/jboss/webbeans/integration/ejb/JBossSessionBeanDescriptorAdaptor.java 2009-02-26 11:22:26 UTC (rev 84795)
@@ -10,9 +10,13 @@
import org.jboss.metadata.ejb.spec.RemoveMethodMetaData;
import org.jboss.webbeans.ejb.spi.BusinessInterfaceDescriptor;
import org.jboss.webbeans.ejb.spi.EjbDescriptor;
+import org.jboss.webbeans.integration.ejb.util.Reflections;
public class JBossSessionBeanDescriptorAdaptor<T> extends JBossEJBDescriptorAdaptor<T> implements EjbDescriptor<T>
{
+
+ private static final Class<?>[] EMPTY_CLASS_ARRAY = new Class<?>[0];
+
private final List<BusinessInterfaceDescriptor<?>> localBusinessInterfaces;
private final List<BusinessInterfaceDescriptor<?>> remoteBusinessInterfaces;
private final List<Method> removeMethods;
@@ -51,7 +55,20 @@
Method removeMethod;
try
{
- removeMethod = getType().getMethod(removeMethodMetaData.getBeanMethod().getMethodName(), removeMethodMetaData.getBeanMethod().getMethodParams().toArray(new Class<?>[0]));
+ List<String> methodParameters = removeMethodMetaData.getBeanMethod().getMethodParams();
+ List<Class<?>> parameterTypes = new ArrayList<Class<?>>();
+ for (String methodParameter : methodParameters)
+ {
+ try
+ {
+ parameterTypes.add(Reflections.classForName(methodParameter, deploymentUnit.getClassLoader()));
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new IllegalStateException("Cannot load EJB remove method parameter class interface for " + removeMethodMetaData.toString(), e);
+ }
+ }
+ removeMethod = getType().getMethod(removeMethodMetaData.getBeanMethod().getMethodName(), parameterTypes.toArray(EMPTY_CLASS_ARRAY));
removeMethods.add(removeMethod);
}
catch (SecurityException e)
More information about the jboss-cvs-commits
mailing list