Package org.jboss.metadata.ejb.jboss

Examples of org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData


      }
   }
  
   protected Method getTimeoutCallback(NamedMethodMetaData timeoutMethodMetaData, Class<?> beanClass)
   {
      JBossEnterpriseBeanMetaData metaData = xml;
      if(metaData != null)
      {
         if(timeoutMethodMetaData != null)
         {
            String methodName = timeoutMethodMetaData.getMethodName();
            try
            {
               return beanClass.getMethod(methodName, Timer.class);
            }
            catch (SecurityException e)
            {
               throw new RuntimeException(e);
            }
            catch (NoSuchMethodException e)
            {
               throw new RuntimeException("No method " + methodName + "(javax.ejb.Timer timer) found on bean " + ejbName, e);
            }
         }
      }
     
      if(TimedObject.class.isAssignableFrom(beanClass))
      {
         try
         {
            return TimedObject.class.getMethod("ejbTimeout", Timer.class);
         }
         catch (SecurityException e)
         {
            throw new RuntimeException(e);
         }
         catch (NoSuchMethodException e)
         {
            throw new RuntimeException(e);
         }
      }
     
      if(metaData != null)
      { 
         // TODO: cross cutting concern
         if(metaData.getEjbJarMetaData().isMetadataComplete())
            return null;
      }
     
      for (Method method : beanClass.getMethods())
      {
View Full Code Here


   protected <B extends JBossEnterpriseBeanMetaData> B getEnterpriseBeanMetaData(String ejbName, Class<B> enterpriseBeanMetaDataClass)
   {
      if(metaData == null)
         return null;
     
      JBossEnterpriseBeanMetaData result = metaData.getEnterpriseBean(ejbName);
     
      // FIXME: EJBTHREE-1227: temporary workaround for JBCTS-756
      // see also org.jboss.ejb3.metadata.JBossSessionGenericWrapper
      if(result instanceof JBossGenericBeanMetaData)
      {
View Full Code Here

   protected <B extends JBossEnterpriseBeanMetaData> B getEnterpriseBeanMetaData(String ejbName, Class<B> enterpriseBeanMetaDataClass)
   {
      if(metaData == null)
         return null;
     
      JBossEnterpriseBeanMetaData result = metaData.getEnterpriseBean(ejbName);
     
      // FIXME: EJBTHREE-1227: temporary workaround for JBCTS-756
      // see also org.jboss.ejb3.metadata.JBossSessionGenericWrapper
      if(result instanceof JBossGenericBeanMetaData)
      {
View Full Code Here

   }
  
   protected Method getTimeoutCallback(NamedMethodMetaData timeoutMethodMetaData, Class<?> beanClass)
   {
      String methodName = null;
      JBossEnterpriseBeanMetaData metaData = xml;
      if(metaData != null)
      {
         if(timeoutMethodMetaData != null)
         {
            methodName = timeoutMethodMetaData.getMethodName();
         }
      }
     
      Method timeoutMethod = timeoutMethodCallbackRequirements.getTimeoutMethod(beanClass, methodName);
      if(timeoutMethod != null)
         return timeoutMethod;

      // TODO: should not be needed
      // TODO: ServiceContainer does not container correct metadata
     
      if(metaData != null)
      { 
         // TODO: cross cutting concern
         if(metaData.getEjbJarMetaData().isMetadataComplete())
            return null;
      }
     
      for (Method method : beanClass.getMethods())
      {
View Full Code Here

         boolean removed = false;
         int j = 0;
         while (!removed && j < ejbsByClass.size())
         {
            JBossEnterpriseBeanMetaData ejbByClass = ejbsByClass.get(j);
            if (ejbByClass.getEjbName().equals(ejbNameFromAnnotation))
            {
               ejbsByClass.remove(j);
            } else
               ++j;
         }
View Full Code Here

      }
     
      for (int ejbIndex = 0; ejbIndex < ejbNames.size(); ++ejbIndex)
      {
         String ejbName = ejbNames.get(ejbIndex);
         JBossEnterpriseBeanMetaData enterpriseBean = ejbs.get(ejbIndex);
         ejbType = getEjbType(enterpriseBean);
         className = enterpriseBean.getEjbClass();
        
         if (className == null)
            log.warn("Descriptor based bean has no ejb-class defined: " + ejbName);
         else
         {
View Full Code Here

      return container;
   }

   protected String getAspectDomain(int ejbIndex, String defaultDomain)
   {
      JBossEnterpriseBeanMetaData enterpriseBean = ejbs.get(ejbIndex);
      if (enterpriseBean != null)
      {
         String aopDomainName = enterpriseBean.getAopDomainName();
         if (aopDomainName != null)
         {
            log.debug("Found aop-domain-name element for annotation "
                  + aopDomainName + " for ejbName "
                  + enterpriseBean.getEjbName());

            return aopDomainName;
         }
      }
      return super.getAspectDomain(ejbIndex, defaultDomain);
View Full Code Here

    * Else returns false
    * @return
    */
   private boolean isStatefulBean()
   {
      JBossEnterpriseBeanMetaData enterpriseBeanMetaData = this.xml;
      if (enterpriseBeanMetaData.isSession() == false)
      {
         return false;
      }
      JBossSessionBeanMetaData sessionBean = (JBossSessionBeanMetaData) enterpriseBeanMetaData;
      return sessionBean.isStateful();
View Full Code Here

      }
   }
  
   protected Method getTimeoutCallback(NamedMethodMetaData timeoutMethodMetaData, Class<?> beanClass)
   {
      JBossEnterpriseBeanMetaData metaData = xml;
      if(metaData != null)
      {
         if(timeoutMethodMetaData != null)
         {
            String methodName = timeoutMethodMetaData.getMethodName();
            try
            {
               return beanClass.getMethod(methodName, Timer.class);
            }
            catch (SecurityException e)
            {
               throw new RuntimeException(e);
            }
            catch (NoSuchMethodException e)
            {
               throw new RuntimeException("No method " + methodName + "(javax.ejb.Timer timer) found on bean " + ejbName, e);
            }
         }
      }
     
      if(TimedObject.class.isAssignableFrom(beanClass))
      {
         try
         {
            return TimedObject.class.getMethod("ejbTimeout", Timer.class);
         }
         catch (SecurityException e)
         {
            throw new RuntimeException(e);
         }
         catch (NoSuchMethodException e)
         {
            throw new RuntimeException(e);
         }
      }
     
      if(metaData != null)
      { 
         // TODO: cross cutting concern
         if(metaData.getEjbJarMetaData().isMetadataComplete())
            return null;
      }
     
      for (Method method : beanClass.getMethods())
      {
View Full Code Here

   @Override
   public Object createPerClass(Advisor advisor)
   {
      EJBContainer container = EJBContainer.getEJBContainer(advisor);
      Set<String> unsharableResources = new HashSet<String>();
      JBossEnterpriseBeanMetaData metaData = container.getXml();
      ResourceReferencesMetaData resRefs = metaData.getResourceReferences();
      if(resRefs != null)
      {
         for(ResourceReferenceMetaData resRef : resRefs)
         {
            String jndiName = resRef.getJndiName();
View Full Code Here

TOP

Related Classes of org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.