Package org.jboss.metadata.ejb.jboss

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


   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)
   {
      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 Method getTimeoutCallback(NamedMethodMetaData timeoutMethodMetaData, Class<?> beanClass)
   {
      String methodName = null;
      Class<?>[] timeoutMethodParams = null;
      JBossEnterpriseBeanMetaData metaData = xml;
      if(metaData != null)
      {
         if(timeoutMethodMetaData != null)
         {
            // timeout method name
            methodName = timeoutMethodMetaData.getMethodName();
            // timeout method params
            MethodParametersMetaData methodParams = timeoutMethodMetaData.getMethodParams();
            String[] paramTypes = methodParams == null ? null : methodParams.toArray(new String[methodParams.size()]);
            timeoutMethodParams = this.loadTimeoutMethodParamTypes(beanClass.getClassLoader(), paramTypes);
         }
      }
     
      Method timeoutMethod = timeoutMethodCallbackRequirements.getTimeoutMethod(beanClass, methodName, timeoutMethodParams);
      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

      return null;
   }
  
   public boolean isClustered()
   {
      JBossEnterpriseBeanMetaData md = getXml();
      if (md instanceof JBossSessionBeanMetaData)
      {
         return ((JBossSessionBeanMetaData)md).isClustered();
      }
      return isAnnotationPresent(Clustered.class);
View Full Code Here

      //         return factory.createProxyBusiness();
   }

   public boolean isClustered()
   {
      JBossEnterpriseBeanMetaData md = getXml();
      if (md instanceof JBossSessionBeanMetaData)
      {
         return ((JBossSessionBeanMetaData) md).isClustered();
      }
      return isAnnotationPresent(Clustered.class);
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;
      Class<?>[] timeoutMethodParams = null;
      JBossEnterpriseBeanMetaData metaData = xml;
      if(metaData != null)
      {
         if(timeoutMethodMetaData != null)
         {
            // timeout method name
            methodName = timeoutMethodMetaData.getMethodName();
            // timeout method params
            MethodParametersMetaData methodParams = timeoutMethodMetaData.getMethodParams();
            String[] paramTypes = methodParams == null ? null : methodParams.toArray(new String[methodParams.size()]);
            timeoutMethodParams = this.loadTimeoutMethodParamTypes(beanClass.getClassLoader(), paramTypes);
         }
      }
     
      Method timeoutMethod = timeoutMethodCallbackRequirements.getTimeoutMethod(beanClass, methodName, timeoutMethodParams);
      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

   {
      // Get the container
      final EJBContainer container = EJBContainer.getEJBContainer(advisor);

      // Get the metadata
      final JBossEnterpriseBeanMetaData md = container.getXml();

      // Create the interceptor instance
      AsyncMethodsMetaData asyncMethods = this.getAsyncMethods(md);
      if (asyncMethods == null)
      {
View Full Code Here

   }
  
   @Test
   public void testNoSecurityIdentity()
   {
      JBossEnterpriseBeanMetaData bean = new JBossSessionBeanMetaData();
      RunAs runAs = bridge.retrieveAnnotation(RunAs.class, bean, classLoader);
      assertNull(runAs);
   }
View Full Code Here

   {
      RunAsMetaData runAsMetaData = new RunAsMetaData();
      runAsMetaData.setRoleName("test");
      SecurityIdentityMetaData securityIdentity = new SecurityIdentityMetaData();
      securityIdentity.setRunAs(runAsMetaData);
      JBossEnterpriseBeanMetaData bean = new JBossSessionBeanMetaData();
      bean.setSecurityIdentity(securityIdentity);
      SecurityDomain securityDomain = bridge.retrieveAnnotation(SecurityDomain.class, bean, classLoader);
      assertNull(securityDomain);
   }
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.