Package org.jboss.metadata.ejb.jboss

Examples of org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData


      LocalHomeBinding binding = container.getAnnotation(LocalHomeBinding.class);
      if (binding != null)
         return binding.jndiBinding();

      // Use Default JNDI Binding Policy
      JBossSessionBeanMetaData smd = (JBossSessionBeanMetaData)container.getXml();
      return smd.getLocalHomeJndiName();
   }
View Full Code Here


      LocalBinding localBinding = container.getAnnotation(LocalBinding.class);

      // If none specified
      if (localBinding == null || (localBinding.jndiBinding() != null && localBinding.jndiBinding().trim().length() == 0))
      {
         JBossSessionBeanMetaData smd = (JBossSessionBeanMetaData)container.getXml();
         String name = smd.getLocalJndiName();

         // If we should check for naming conflict
         if (conflictCheck){
            // Check
            ProxyFactoryHelper.checkForJndiNamingConflict(container);
View Full Code Here

   private static void checkForJndiNamingConflict(EJBContainer container)
   {
      if (container.getAnnotation(Local.class) != null)
      {
         JBossSessionBeanMetaData smd = (JBossSessionBeanMetaData)container.getXml();
         String localJndiName = smd.getLocalJndiName();
         String remoteJndiName = smd.getJndiName();
         String ejbName = container.getEjbName();
         if (localJndiName != null)
         {
            if (localJndiName.equals(remoteJndiName) || localJndiName.startsWith(remoteJndiName + "/"))
               throw new javax.ejb.EJBException("Conflict between default jndi name " + remoteJndiName
View Full Code Here

      return jndiName;
   }

   public static String getDefaultRemoteBusinessJndiName(EJBContainer container)
   {
      JBossSessionBeanMetaData smd = (JBossSessionBeanMetaData)container.getXml();
      String jndiName = smd.getJndiName();
      return jndiName;
   }
View Full Code Here

//         addInterceptorBindingAnnotations(container, enterpriseBean, ejbName);
      }

      if (enterpriseBean instanceof JBossSessionBeanMetaData)
      {
         JBossSessionBeanMetaData sessionBean = (JBossSessionBeanMetaData) enterpriseBean;
         addInitAnnotations(container, sessionBean.getInitMethods(), ejbName);
         addRemoveAnnotations(container, sessionBean.getRemoveMethods(), ejbName);
      }
   }
View Full Code Here

   private void addInterceptorMethodAnnotations(EJBContainer container,
         JBossEnterpriseBeanMetaData enterpriseBean)
   {
      if (enterpriseBean instanceof JBossSessionBeanMetaData)
      {
         JBossSessionBeanMetaData sessionBean = (JBossSessionBeanMetaData) enterpriseBean;
         addInterceptorMethodAnnotation(container, enterpriseBean,
               sessionBean.getAroundInvokes(),
               AroundInvoke.class, "around-invoke-method");
         addInterceptorMethodAnnotation(container, enterpriseBean,
               sessionBean.getPostConstructs(),
               PostConstruct.class, "post-construct-method");
         addInterceptorMethodAnnotation(container, enterpriseBean,
               sessionBean.getPostActivates(),
               PostActivate.class, "post-activate-method");
         addInterceptorMethodAnnotation(container, enterpriseBean,
               sessionBean.getPrePassivates(),
               PrePassivate.class, "pre-passivate-method");
         addInterceptorMethodAnnotation(container, enterpriseBean,
               sessionBean.getPreDestroys(),
               PreDestroy.class, "pre-destroy-method");
      }
      else if (enterpriseBean instanceof JBossMessageDrivenBeanMetaData)
      {
         JBossMessageDrivenBeanMetaData messageDriven = (JBossMessageDrivenBeanMetaData) enterpriseBean;
View Full Code Here

      JBossEnterpriseBeanMetaData enterpriseBeanMetaData = this.xml;
      if (enterpriseBeanMetaData.isSession() == false)
      {
         return false;
      }
      JBossSessionBeanMetaData sessionBean = (JBossSessionBeanMetaData) enterpriseBeanMetaData;
      return sessionBean.isStateful();
   }
View Full Code Here

   }

   // TODO: integrate with StatelessContainer.initializeTimeout
   private void initializeTimeoutMethod()
   {
      JBossSessionBeanMetaData metaData = getMetaData();
      NamedMethodMetaData timeoutMethodMetaData = null;
      if (metaData != null)
         timeoutMethodMetaData = metaData.getTimeoutMethod();
      this.timeoutMethod = getTimeoutCallback(timeoutMethodMetaData, getBeanClass());
   }
View Full Code Here

     
      // Initialize a check flag
      boolean isValidBusinessInterface = false;
     
      // Get Metadata
      JBossSessionBeanMetaData smd = this.getMetaData();
     
      // Check in business remotes
      BusinessRemotesMetaData businessRemotes = smd.getBusinessRemotes();
      if (businessRemotes != null)
      {
         for (String businessRemote : businessRemotes)
         {
            if (businessRemote.equals(interfaceName))
            {
               isValidBusinessInterface = true;
               break;
            }
         }
      }

      // Check in business locals
      BusinessLocalsMetaData businessLocals = smd.getBusinessLocals();
      if (businessLocals != null)
      {
         for (String businessLocal : businessLocals)
         {
            if (businessLocal.equals(interfaceName))
View Full Code Here

      // Name of the EJB2.x Interface Class expected
      String ejb2xInterface = method.getReturnType().getName();

      // Get Metadata
      JBossSessionBeanMetaData smd = this.getMetaData();

      /*
       * Determine if the expected type is found in metadata as a EJB2.x Interface
       */

      // Is this a Remote Interface ?
      boolean isLocal = false;
      String ejb2xRemoteInterface = smd.getRemote();
      if (ejb2xInterface.equals(ejb2xRemoteInterface))
      {
         // We've found it, it's false
         foundInterface = true;
         jndiName = smd.getJndiName();
      }

      // Is this a local interface?
      if (!foundInterface)
      {
         String ejb2xLocalInterface = smd.getLocal();
         if (ejb2xInterface.equals(ejb2xLocalInterface))
         {
            // Mark as found
            foundInterface = true;
            isLocal = true;
            jndiName = smd.getLocalJndiName();
         }
      }

      // If we haven't yet found the interface
      if (!foundInterface)
View Full Code Here

TOP

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

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.