Examples of AsyncMethodsMetaData


Examples of org.jboss.metadata.ejb.spec.AsyncMethodsMetaData

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

      // Create the interceptor instance
      AsyncMethodsMetaData asyncMethods = this.getAsyncMethods(md);
      if (asyncMethods == null)
      {
         asyncMethods = new AsyncMethodsMetaData();
      }
      final Object interceptor = new AsynchronousInterceptor(asyncMethods);
      return interceptor;
   }
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.AsyncMethodsMetaData

    * @return
    */
   private AsyncMethodsMetaData getAsyncMethods(final JBossEnterpriseBeanMetaData md)
   {
      // Declare async methods
      AsyncMethodsMetaData asyncMethods = new AsyncMethodsMetaData();

      // If not a Session Bean, no async methods
      if (!md.isSession())
      {
         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.
         final JBossSessionPolicyDecorator<JBossSessionBeanMetaData> policy = (JBossSessionPolicyDecorator<JBossSessionBeanMetaData>) md;
         // Get the real Session Bean Metadata
         session = policy.getDelegate();
      }

      // If EJB 3.1
      if (session instanceof JBossSessionBean31MetaData)
      {
         final JBossSessionBean31MetaData session31 = (JBossSessionBean31MetaData) session;
         asyncMethods = session31.getAsyncMethods();
         if (asyncMethods == null)
         {
            asyncMethods = new AsyncMethodsMetaData();
         }
      }

      // Return
      return asyncMethods;
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.AsyncMethodsMetaData

      Class<?> beanClass = container.getBeanClass();

      String name = container.getDeploymentQualifiedName();
      KernelControllerContext endpointContext = (KernelControllerContext) kernel.getController().getContext(name, null);
     
      AsyncMethodsMetaData asyncMethods = null;
      JBossEnterpriseBeanMetaData sessionBeanMetaData = container.getXml();
      if (sessionBeanMetaData instanceof JBossSessionBean31MetaData)
      {
         asyncMethods = ((JBossSessionBean31MetaData) sessionBeanMetaData).getAsyncMethods();
      }
      // create an invocation handler
      InvocationHandler invocationHandler = new NoInterfaceViewInvocationHandler(endpointContext, sessionId, intf,
            asyncMethods == null ? new AsyncMethodsMetaData() : asyncMethods);

      // Now create the proxy
      Object noInterfaceView = new JavassistProxyFactory().createProxy(new Class<?>[] {beanClass}, invocationHandler);
      return intf.cast(noInterfaceView);
   }
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.