Examples of JBossSessionBeanMetaData


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

      {
         return asyncMethods;
      }

      // Get the SessionBean metadata
      JBossSessionBeanMetaData session = (JBossSessionBeanMetaData) md;
      if (md instanceof JBossSessionPolicyDecorator)
      {
         // We obtain these as wrapped in a JNDI Policy decorator, so unwrap 'em
         // HACK, but this is going to be throwaway code anyway when we rework EJB3 Core.
         @SuppressWarnings("unchecked")
View Full Code Here

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

      // 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

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

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

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

   {
      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

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

   {
      RunAsMetaData runAsMetaData = new RunAsMetaData();
      runAsMetaData.setRoleName("test");
      SecurityIdentityMetaData securityIdentity = new SecurityIdentityMetaData();
      securityIdentity.setRunAs(runAsMetaData);
      JBossEnterpriseBeanMetaData bean = new JBossSessionBeanMetaData();
      bean.setSecurityIdentity(securityIdentity);
      RunAs runAs = bridge.retrieveAnnotation(RunAs.class, bean, classLoader);
      assertEquals("test", runAs.value());
   }
View Full Code Here

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

   @Test
   public void testUseCallerIdentity()
   {
      SecurityIdentityMetaData securityIdentity = new SecurityIdentityMetaData();
      securityIdentity.setUseCallerIdentity(new EmptyMetaData());
      JBossEnterpriseBeanMetaData bean = new JBossSessionBeanMetaData();
      bean.setSecurityIdentity(securityIdentity);
      RunAs runAs = bridge.retrieveAnnotation(RunAs.class, bean, classLoader);
      assertNull(runAs);
   }
View Full Code Here

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

   {
      JBossEnterpriseBeanMetaData beanMD = summary.getBeanMD();
      String name = null;
      if(beanMD instanceof JBossSessionBeanMetaData)
      {
         JBossSessionBeanMetaData sbeanMD = (JBossSessionBeanMetaData) beanMD;
         name = sbeanMD.getLocalHomeJndiName();
      }
      if(name == null)
      {
         name = beanMD.determineLocalJndiName();
      }
View Full Code Here

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

   {
      JBossEnterpriseBeanMetaData beanMD = summary.getBeanMD();
      String name = null;
      if(beanMD instanceof JBossSessionBeanMetaData)
      {
         JBossSessionBeanMetaData sbeanMD = (JBossSessionBeanMetaData) beanMD;
         name = sbeanMD.getLocalJndiName();
      }
      if(name == null)
      {
         name = beanMD.determineLocalJndiName();
      }
View Full Code Here

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

   {
      JBossEnterpriseBeanMetaData beanMD = summary.getBeanMD();
      String name = null;
      if(beanMD instanceof JBossSessionBeanMetaData)
      {
         JBossSessionBeanMetaData sbeanMD = (JBossSessionBeanMetaData) beanMD;
         name = sbeanMD.getHomeJndiName();
         if (name == null)
            name = sbeanMD.getJndiName();
         if(name == null)
            name = sbeanMD.getMappedName();
         if(name == null && sbeanMD.getRemoteBindings() != null && sbeanMD.getRemoteBindings().size() > 0)
            name = sbeanMD.getRemoteBindings().get(0).getJndiName();
      }
      if(name == null)
      {
         name = beanMD.getEjbName() + "Remote";
      }
View Full Code Here

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

   {
      JBossEnterpriseBeanMetaData beanMD = summary.getBeanMD();
      String name = null;
      if(beanMD instanceof JBossSessionBeanMetaData)
      {
         JBossSessionBeanMetaData sbeanMD = (JBossSessionBeanMetaData) beanMD;
         name = sbeanMD.getJndiName();
         if(name == null)
            name = sbeanMD.getMappedName();
         if(name == null && sbeanMD.getRemoteBindings() != null && sbeanMD.getRemoteBindings().size() > 0)
            name = sbeanMD.getRemoteBindings().get(0).getJndiName();
      }
      if(name == null)
      {
         name = beanMD.getEjbName() + "Remote";
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.