[jboss-cvs] JBossAS SVN: r90671 - 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
Mon Jun 29 10:10:12 EDT 2009


Author: pete.muir at jboss.org
Date: 2009-06-29 10:10:12 -0400 (Mon, 29 Jun 2009)
New Revision: 90671

Modified:
   projects/webbeans-ri-int/trunk/ejb/src/main/java/org/jboss/webbeans/integration/ejb/JBossEJBDescriptorAdaptor.java
   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/JBossSessionObjectReference.java
Log:
Add BeanDeploymentArchive SPI

Modified: projects/webbeans-ri-int/trunk/ejb/src/main/java/org/jboss/webbeans/integration/ejb/JBossEJBDescriptorAdaptor.java
===================================================================
--- projects/webbeans-ri-int/trunk/ejb/src/main/java/org/jboss/webbeans/integration/ejb/JBossEJBDescriptorAdaptor.java	2009-06-29 13:42:18 UTC (rev 90670)
+++ projects/webbeans-ri-int/trunk/ejb/src/main/java/org/jboss/webbeans/integration/ejb/JBossEJBDescriptorAdaptor.java	2009-06-29 14:10:12 UTC (rev 90671)
@@ -8,14 +8,14 @@
 
 public abstract class JBossEJBDescriptorAdaptor<T> implements EjbDescriptor<T>
 {
-   private final Class<T> type;
+   private final Class<T> beanClass;
    private final String ejbName;
 
    public JBossEJBDescriptorAdaptor(JBossEnterpriseBeanMetaData enterpriseBeanMetaData, DeploymentUnit deploymentUnit, EjbReferenceResolver resolver)
    {
       try
       {
-         this.type = (Class<T>) Reflections.classForName(enterpriseBeanMetaData.getEjbClass(), deploymentUnit.getClassLoader());
+         this.beanClass = (Class<T>) Reflections.classForName(enterpriseBeanMetaData.getEjbClass(), deploymentUnit.getClassLoader());
       }
       catch (ClassCastException e) 
       {
@@ -29,9 +29,9 @@
       this.ejbName = enterpriseBeanMetaData.getEjbName();
    }
 
-   public Class<T> getType()
+   public Class<T> getBeanClass()
    {
-      return type;
+      return beanClass;
    }
 
    public String getEjbName()
@@ -60,16 +60,16 @@
       {
          builder.append(" (MDB)");
       }
-      builder.append("; BeanClass: " + getType() + "; Local Business Interfaces: " + getLocalBusinessInterfaces());
+      builder.append("; BeanClass: " + getBeanClass() + "; Local Business Interfaces: " + getLocalBusinessInterfaces());
       return builder.toString(); 
    }
    
    @Override
    public boolean equals(Object other)
    {
-      if (other instanceof EjbDescriptor)
+      if (other instanceof JBossEJBDescriptorAdaptor)
       {
-         EjbDescriptor<T> that = (EjbDescriptor<T>) other;
+         JBossEJBDescriptorAdaptor<T> that = (JBossEJBDescriptorAdaptor<T>) other;
          return this.getEjbName().equals(that.getEjbName());
       }
       else

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-06-29 13:42:18 UTC (rev 90670)
+++ projects/webbeans-ri-int/trunk/ejb/src/main/java/org/jboss/webbeans/integration/ejb/JBossSessionBeanDescriptorAdaptor.java	2009-06-29 14:10:12 UTC (rev 90671)
@@ -69,7 +69,7 @@
                      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));
+               removeMethod = getBeanClass().getMethod(removeMethodMetaData.getBeanMethod().getMethodName(), parameterTypes.toArray(EMPTY_CLASS_ARRAY));
                removeMethods.add(removeMethod);
             }
             catch (SecurityException e)

Modified: projects/webbeans-ri-int/trunk/ejb/src/main/java/org/jboss/webbeans/integration/ejb/JBossSessionObjectReference.java
===================================================================
--- projects/webbeans-ri-int/trunk/ejb/src/main/java/org/jboss/webbeans/integration/ejb/JBossSessionObjectReference.java	2009-06-29 13:42:18 UTC (rev 90670)
+++ projects/webbeans-ri-int/trunk/ejb/src/main/java/org/jboss/webbeans/integration/ejb/JBossSessionObjectReference.java	2009-06-29 14:10:12 UTC (rev 90671)
@@ -42,7 +42,7 @@
          id = (Serializable) handler.getTarget();
       }
       this.deploymentUnit = ((JBossSessionBeanDescriptorAdaptor<?>) descriptor).getDeploymentUnit();
-      this.ejbClassName = descriptor.getType().getSimpleName();
+      this.ejbClassName = descriptor.getBeanClass().getSimpleName();
      
    }
    




More information about the jboss-cvs-commits mailing list