[jboss-cvs] JBossAS SVN: r82545 - in projects/webbeans-ri-int/trunk/jbossas: src/main/java/org/jboss/webbeans/integration/jbossas/ejb3 and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Dec 24 18:43:40 EST 2008
Author: petemuir
Date: 2008-12-24 18:43:40 -0500 (Wed, 24 Dec 2008)
New Revision: 82545
Removed:
projects/webbeans-ri-int/trunk/jbossas/src/main/java/org/jboss/webbeans/integration/jbossas/ejb3/JBossMethodDescriptor.java
Modified:
projects/webbeans-ri-int/trunk/jbossas/
projects/webbeans-ri-int/trunk/jbossas/src/main/java/org/jboss/webbeans/integration/jbossas/ejb3/JBossMessageDrivenBeanDescriptorAdaptor.java
projects/webbeans-ri-int/trunk/jbossas/src/main/java/org/jboss/webbeans/integration/jbossas/ejb3/JBossSessionBeanDescriptorAdaptor.java
projects/webbeans-ri-int/trunk/jbossas/src/main/resources/META-INF/web-beans-ri.properties
Log:
Updates to remove MethodDescriptor and new property name
Property changes on: projects/webbeans-ri-int/trunk/jbossas
___________________________________________________________________
Name: svn:ignore
- .project
.classpath
target
+ .classpath
target
.project
.settings
Modified: projects/webbeans-ri-int/trunk/jbossas/src/main/java/org/jboss/webbeans/integration/jbossas/ejb3/JBossMessageDrivenBeanDescriptorAdaptor.java
===================================================================
--- projects/webbeans-ri-int/trunk/jbossas/src/main/java/org/jboss/webbeans/integration/jbossas/ejb3/JBossMessageDrivenBeanDescriptorAdaptor.java 2008-12-24 13:38:33 UTC (rev 82544)
+++ projects/webbeans-ri-int/trunk/jbossas/src/main/java/org/jboss/webbeans/integration/jbossas/ejb3/JBossMessageDrivenBeanDescriptorAdaptor.java 2008-12-24 23:43:40 UTC (rev 82545)
@@ -1,10 +1,11 @@
package org.jboss.webbeans.integration.jbossas.ejb3;
+import java.lang.reflect.Method;
+
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.ejb3.common.resolvers.spi.EjbReferenceResolver;
import org.jboss.metadata.ejb.jboss.JBossMessageDrivenBeanMetaData;
import org.jboss.webbeans.bootstrap.spi.BusinessInterfaceDescriptor;
-import org.jboss.webbeans.bootstrap.spi.MethodDescriptor;
public class JBossMessageDrivenBeanDescriptorAdaptor<T> extends JBossEJBDescriptorAdaptor<T>
{
@@ -25,7 +26,7 @@
return null;
}
- public Iterable<MethodDescriptor> getRemoveMethods()
+ public Iterable<Method> getRemoveMethods()
{
// Not relevant for MDBs
return null;
Deleted: projects/webbeans-ri-int/trunk/jbossas/src/main/java/org/jboss/webbeans/integration/jbossas/ejb3/JBossMethodDescriptor.java
===================================================================
--- projects/webbeans-ri-int/trunk/jbossas/src/main/java/org/jboss/webbeans/integration/jbossas/ejb3/JBossMethodDescriptor.java 2008-12-24 13:38:33 UTC (rev 82544)
+++ projects/webbeans-ri-int/trunk/jbossas/src/main/java/org/jboss/webbeans/integration/jbossas/ejb3/JBossMethodDescriptor.java 2008-12-24 23:43:40 UTC (rev 82545)
@@ -1,49 +0,0 @@
-package org.jboss.webbeans.integration.jbossas.ejb3;
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.metadata.ejb.spec.NamedMethodMetaData;
-import org.jboss.webbeans.bootstrap.spi.MethodDescriptor;
-
-public class JBossMethodDescriptor implements MethodDescriptor
-{
- private Class<?> declaringClass;
- private String methodName;
- private Class<?>[] methodParameterTypes;
-
- public JBossMethodDescriptor(Class<?> declaringClass, NamedMethodMetaData namedMethodMetaData, DeploymentUnit deploymentUnit)
- {
- this.declaringClass = declaringClass;
- this.methodName = namedMethodMetaData.getMethodName();
- this.methodParameterTypes = new Class<?>[namedMethodMetaData.getMethodParams().size()];
- for (int i = 0; i < methodParameterTypes.length; i++)
- {
- try
- {
- this.methodParameterTypes[i] = deploymentUnit.getClassLoader().loadClass(namedMethodMetaData.getMethodParams().get(0));
- }
- catch (ClassCastException e)
- {
- throw new IllegalStateException("Error loading remove method parameter type", e);
- }
- catch (ClassNotFoundException e)
- {
- throw new IllegalStateException("Cannot load remove method parameter type", e);
- }
- }
- }
-
- public Class<?> getDeclaringClass()
- {
- return declaringClass;
- }
-
- public String getMethodName()
- {
- return methodName;
- }
-
- public Class<?>[] getMethodParameterTypes()
- {
- return methodParameterTypes;
- }
-}
Modified: projects/webbeans-ri-int/trunk/jbossas/src/main/java/org/jboss/webbeans/integration/jbossas/ejb3/JBossSessionBeanDescriptorAdaptor.java
===================================================================
--- projects/webbeans-ri-int/trunk/jbossas/src/main/java/org/jboss/webbeans/integration/jbossas/ejb3/JBossSessionBeanDescriptorAdaptor.java 2008-12-24 13:38:33 UTC (rev 82544)
+++ projects/webbeans-ri-int/trunk/jbossas/src/main/java/org/jboss/webbeans/integration/jbossas/ejb3/JBossSessionBeanDescriptorAdaptor.java 2008-12-24 23:43:40 UTC (rev 82545)
@@ -1,5 +1,6 @@
package org.jboss.webbeans.integration.jbossas.ejb3;
+import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
@@ -9,13 +10,12 @@
import org.jboss.metadata.ejb.spec.RemoveMethodMetaData;
import org.jboss.webbeans.bootstrap.spi.BusinessInterfaceDescriptor;
import org.jboss.webbeans.bootstrap.spi.EjbDescriptor;
-import org.jboss.webbeans.bootstrap.spi.MethodDescriptor;
public class JBossSessionBeanDescriptorAdaptor<T> extends JBossEJBDescriptorAdaptor<T> implements EjbDescriptor<T>
{
private final List<BusinessInterfaceDescriptor<?>> localBusinessInterfaces;
private final List<BusinessInterfaceDescriptor<?>> remoteBusinessInterfaces;
- private final List<MethodDescriptor> removeMethods;
+ private final List<Method> removeMethods;
private final boolean stateful;
private final boolean stateless;
private final boolean singleton;
@@ -42,13 +42,27 @@
}
}
- this.removeMethods = new ArrayList<MethodDescriptor>();
+ this.removeMethods = new ArrayList<Method>();
if (sessionBeanMetaData.getRemoveMethods() != null)
{
for (RemoveMethodMetaData removeMethodMetaData : sessionBeanMetaData.getRemoveMethods())
{
- removeMethods.add(new JBossMethodDescriptor(getType(), removeMethodMetaData.getBeanMethod(), deploymentUnit));
+ Method removeMethod;
+ try
+ {
+ removeMethod = getType().getMethod(removeMethodMetaData.getBeanMethod().getMethodName(), removeMethodMetaData.getBeanMethod().getMethodParams().toArray(new Class<?>[0]));
+ removeMethods.add(removeMethod);
+ }
+ catch (SecurityException e)
+ {
+ throw new RuntimeException("Unable to access EJB remove method", e);
+ }
+ catch (NoSuchMethodException e)
+ {
+ throw new RuntimeException("Unable to access EJB remove method", e);
+ }
+
}
}
@@ -68,7 +82,7 @@
return remoteBusinessInterfaces;
}
- public Iterable<MethodDescriptor> getRemoveMethods()
+ public Iterable<Method> getRemoveMethods()
{
return removeMethods;
}
Modified: projects/webbeans-ri-int/trunk/jbossas/src/main/resources/META-INF/web-beans-ri.properties
===================================================================
--- projects/webbeans-ri-int/trunk/jbossas/src/main/resources/META-INF/web-beans-ri.properties 2008-12-24 13:38:33 UTC (rev 82544)
+++ projects/webbeans-ri-int/trunk/jbossas/src/main/resources/META-INF/web-beans-ri.properties 2008-12-24 23:43:40 UTC (rev 82545)
@@ -1 +1 @@
-org.jboss.webbeans.bootstrap.webBeanDiscovery=org.jboss.webbeans.integration.jbossas.WebBeanDiscoveryImpl
\ No newline at end of file
+org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery=org.jboss.webbeans.integration.jbossas.WebBeanDiscoveryImpl
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list