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 AsynchronousClientInterceptor(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.
         @SuppressWarnings("unchecked")
         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

    protected void handleDeploymentDescriptor(final DeploymentUnit deploymentUnit, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final SessionBeanComponentDescription description) throws DeploymentUnitProcessingException {
        final SessionBeanMetaData data = description.getDescriptorData();
        if (data != null) {
            if (data instanceof SessionBean31MetaData) {
                final SessionBean31MetaData sessionBeanData = (SessionBean31MetaData) data;
                final AsyncMethodsMetaData async = sessionBeanData.getAsyncMethods();
                if (async != null) {
                    for (AsyncMethodMetaData method : async) {
                        final Collection<Method> methods = MethodResolutionUtils.resolveMethods(method.getMethodName(), method.getMethodParams(), componentClass, deploymentReflectionIndex);
                        for(final Method m : methods ) {
                            description.addAsynchronousMethod(MethodIdentifier.getIdentifierForMethod(m));
View Full Code Here

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

    protected void handleDeploymentDescriptor(final DeploymentUnit deploymentUnit, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final SessionBeanComponentDescription description) throws DeploymentUnitProcessingException {
        final SessionBeanMetaData data = description.getDescriptorData();
        if (data != null) {
            if (data instanceof SessionBean31MetaData) {
                final SessionBean31MetaData sessionBeanData = (SessionBean31MetaData) data;
                final AsyncMethodsMetaData asyn = sessionBeanData.getAsyncMethods();
                if (asyn != null) {
                    for (AsyncMethodMetaData method : asyn) {
                        final Collection<Method> methods = MethodResolutionUtils.resolveMethods(method.getMethodName(), method.getMethodParams(), componentClass, deploymentReflectionIndex);
                        for(final Method m : methods ) {
                            description.addAsynchronousMethod(MethodIdentifier.getIdentifierForMethod(m));
View Full Code Here

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

    protected void handleDeploymentDescriptor(final DeploymentUnit deploymentUnit, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final SessionBeanComponentDescription description) throws DeploymentUnitProcessingException {
        final SessionBeanMetaData data = description.getDescriptorData();
        if (data != null) {
            if (data instanceof SessionBean31MetaData) {
                final SessionBean31MetaData sessionBeanData = (SessionBean31MetaData) data;
                final AsyncMethodsMetaData async = sessionBeanData.getAsyncMethods();
                if (async != null) {
                    for (AsyncMethodMetaData method : async) {
                        final Collection<Method> methods = MethodResolutionUtils.resolveMethods(method.getMethodName(), method.getMethodParams(), componentClass, deploymentReflectionIndex);
                        for(final Method m : methods ) {
                            description.addAsynchronousMethod(MethodIdentifier.getIdentifierForMethod(m));
View Full Code Here

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 AsynchronousClientInterceptor(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.
         @SuppressWarnings("unchecked")
         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

    protected void handleDeploymentDescriptor(final DeploymentUnit deploymentUnit, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final SessionBeanComponentDescription description) throws DeploymentUnitProcessingException {
        final SessionBeanMetaData data = description.getDescriptorData();
        if (data != null) {
            if (data instanceof SessionBean31MetaData) {
                final SessionBean31MetaData sessionBeanData = (SessionBean31MetaData) data;
                final AsyncMethodsMetaData async = sessionBeanData.getAsyncMethods();
                if (async != null) {
                    for (AsyncMethodMetaData method : async) {
                        final Collection<Method> methods = MethodResolutionUtils.resolveMethods(method.getMethodName(), method.getMethodParams(), componentClass, deploymentReflectionIndex);
                        for(final Method m : methods ) {
                            description.addAsynchronousMethod(MethodIdentifier.getIdentifierForMethod(m));
View Full Code Here

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

   {
      if (this.endpointContext == null)
      {
         throw new IllegalStateException("KernelControllerContext hasn't been set for nointerface view binder of bean: " + this.beanClass);
      }
      final AsyncMethodsMetaData asyncMethods = this.sessionBeanMetaData.getAsyncMethods();
      InvocationHandler invocationHandler = new NoInterfaceViewInvocationHandler(this.endpointContext, null, beanClass,
            asyncMethods == null ? new AsyncMethodsMetaData() : asyncMethods);

      Object noInterfaceView;
      try
      {
         noInterfaceView = new JavassistProxyFactory().createProxy(new Class<?>[] {beanClass}, invocationHandler);
View Full Code Here

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

      // create the session
      Serializable session = endpoint.getSessionFactory().createSession(null, null);
      logger.debug("Created session " + session + " for " + this.beanClass);

      // create an invocation handler
      AsyncMethodsMetaData asyncMethods = this.metadata.getAsyncMethods();
      InvocationHandler invocationHandler = new NoInterfaceViewInvocationHandler(this.endpointContext, session,
            this.beanClass, asyncMethods==null?new AsyncMethodsMetaData():asyncMethods);
     

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