Package org.jboss.ejb3.singleton.proxy.impl.invocationhandler

Examples of org.jboss.ejb3.singleton.proxy.impl.invocationhandler.SingletonBeanLocalInvocationHandler


     
      List<MetaDataBridge<ApplicationExceptionMetaData>> appExceptionBridges = new ArrayList<MetaDataBridge<ApplicationExceptionMetaData>>();
      appExceptionBridges.add(new ApplicationExceptionMetaDataBridge());
      this.metadataBasedAnnotationRepo.addComponentMetaDataLoaderFactory(new ApplicationExceptionComponentMetaDataLoaderFactory(appExceptionBridges));
     
      this.metadataBasedAnnotationRepo.addMetaDataBridge(new RunAsMetaDataBridge());
      //Add a security domain bridge
      this.metadataBasedAnnotationRepo.addMetaDataBridge(new SecurityDomainMetaDataBridge());
      // Ensure that an @Clustered annotation is visible to AOP if the XML says the bean is  clustered.
      this.metadataBasedAnnotationRepo.addMetaDataBridge(new ClusteredMetaDataBridge());
   }
View Full Code Here


      appExceptionBridges.add(new ApplicationExceptionMetaDataBridge());
      this.metadataBasedAnnotationRepo.addComponentMetaDataLoaderFactory(new ApplicationExceptionComponentMetaDataLoaderFactory(appExceptionBridges));
     
      this.metadataBasedAnnotationRepo.addMetaDataBridge(new RunAsMetaDataBridge());
      //Add a security domain bridge
      this.metadataBasedAnnotationRepo.addMetaDataBridge(new SecurityDomainMetaDataBridge());
      // Ensure that an @Clustered annotation is visible to AOP if the XML says the bean is  clustered.
      this.metadataBasedAnnotationRepo.addMetaDataBridge(new ClusteredMetaDataBridge());
   }
View Full Code Here

         {
            throw new RuntimeException("Could not load business local interface " + businessLocal, cnfe);
         }
         allLocalinterfaces.add(businessLocalIntf);

         InvocationHandler invocationHandler = new SingletonBeanLocalInvocationHandler(containerRegistryKey,
               businessLocal);

         // time to create a proxy
         Object proxy = proxyFactory.createProxy(new Class<?>[]
         {businessLocalIntf}, invocationHandler);

         // bind to jndi

         String jndiName = jndiNameResolver.resolveJNDIName(sessionBean, businessLocal);

         JNDIBinderImpl jndiBinder = new JNDIBinderImpl(jndiCtx, jndiName, proxy);
         String binderMCBeanName = "<JNDIBinder><BusinessLocal:" + businessLocal + "><Bean:" + sessionBean.getEjbName()
               + "><Unit:" + unit.getName() + ">";
         BeanMetaData jndiBinderBMD = createBeanMetaData(binderMCBeanName, jndiBinder, container);
         DeploymentUnit parentUnit = unit.getParent();
         parentUnit.addAttachment(BeanMetaData.class + ":" + binderMCBeanName, jndiBinderBMD);

      }

      List<LocalBindingMetaData> localBindings = sessionBean.getLocalBindings();
      if (localBindings == null || localBindings.isEmpty())
      {
         InvocationHandler invocationHandler = new SingletonBeanLocalInvocationHandler(containerRegistryKey);
         String defaultBusinessLocalJNDIName = jndiNameResolver.resolveLocalBusinessDefaultJNDIName(sessionBean);
         Object proxy = proxyFactory.createProxy(allLocalinterfaces.toArray(new Class<?>[allLocalinterfaces.size()]),
               invocationHandler);
         JNDIBinderImpl jndiBinder = new JNDIBinderImpl(jndiCtx, defaultBusinessLocalJNDIName, proxy);
         String binderMCBeanName = "<DefaultLocalJNDIBinder><Bean:" + sessionBean.getEjbName() + "><Unit:"
               + unit.getName() + ">";
         BeanMetaData jndiBinderBMD = createBeanMetaData(binderMCBeanName, jndiBinder, container);
         DeploymentUnit parentUnit = unit.getParent();
         parentUnit.addAttachment(BeanMetaData.class + ":" + binderMCBeanName, jndiBinderBMD);
      }
      else
      {
         for (LocalBindingMetaData localBinding : localBindings)
         {
            String jndiName = localBinding.getJndiName();
            // if not explicitly specified, then use the default jndi name
            if (jndiName == null)
            {
               jndiName = jndiNameResolver.resolveLocalBusinessDefaultJNDIName(sessionBean);
            }
            InvocationHandler invocationHandler = new SingletonBeanLocalInvocationHandler(containerRegistryKey);
            Object proxy = proxyFactory.createProxy(
                  allLocalinterfaces.toArray(new Class<?>[allLocalinterfaces.size()]), invocationHandler);
            JNDIBinderImpl jndiBinder = new JNDIBinderImpl(jndiCtx, jndiName, proxy);
            String binderMCBeanName = "<DefaultLocalJNDIBinder><Bean:" + sessionBean.getEjbName() + "><Unit:"
                  + unit.getName() + ">" + UUID.randomUUID();
View Full Code Here

         {
            throw new RuntimeException("Could not load business local interface " + businessLocal, cnfe);
         }
         allLocalinterfaces.add(businessLocalIntf);

         InvocationHandler invocationHandler = new SingletonBeanLocalInvocationHandler(containerRegistryKey,
               containerGUID, businessLocal, clientInterceptors);

         // time to create a proxy
         Object proxy = proxyFactory.createProxy(new Class<?>[]
         {businessLocalIntf}, invocationHandler);

         // bind to jndi

         String jndiName = jndiNameResolver.resolveJNDIName(sessionBean, businessLocal);

         Binding binding = new Binding(jndiName, proxy, "EJB3.x Local Business Interface");
         bindings.add(binding);

      }

      List<LocalBindingMetaData> localBindings = sessionBean.getLocalBindings();
      if (localBindings == null || localBindings.isEmpty())
      {
         InvocationHandler invocationHandler = new SingletonBeanLocalInvocationHandler(containerRegistryKey, containerGUID, clientInterceptors);
         String defaultBusinessLocalJNDIName = jndiNameResolver.resolveLocalBusinessDefaultJNDIName(sessionBean);
         Object proxy = proxyFactory.createProxy(allLocalinterfaces.toArray(new Class<?>[allLocalinterfaces.size()]),
               invocationHandler);
         Binding binding = new Binding(defaultBusinessLocalJNDIName, proxy, "EJB3.x Default Local Business Interface");
         bindings.add(binding);
      }
      else
      {
         for (LocalBindingMetaData localBinding : localBindings)
         {
            String jndiName = localBinding.getJndiName();
            // if not explicitly specified, then use the default jndi name
            if (jndiName == null)
            {
               jndiName = jndiNameResolver.resolveLocalBusinessDefaultJNDIName(sessionBean);
            }
            InvocationHandler invocationHandler = new SingletonBeanLocalInvocationHandler(containerRegistryKey, containerGUID, clientInterceptors);
            Object proxy = proxyFactory.createProxy(
                  allLocalinterfaces.toArray(new Class<?>[allLocalinterfaces.size()]), invocationHandler);
            Binding binding = new Binding(jndiName, proxy, "EJB3.x Default Local Business Interface");
            bindings.add(binding);
View Full Code Here

         {
            throw new RuntimeException("Could not load business local interface " + businessLocal, cnfe);
         }
         allLocalinterfaces.add(businessLocalIntf);

         InvocationHandler invocationHandler = new SingletonBeanLocalInvocationHandler(containerRegistryKey,
               businessLocal, clientInterceptors);

         // time to create a proxy
         Object proxy = proxyFactory.createProxy(new Class<?>[]
         {businessLocalIntf}, invocationHandler);

         // bind to jndi

         String jndiName = jndiNameResolver.resolveJNDIName(sessionBean, businessLocal);

         JNDIBinderImpl jndiBinder = new JNDIBinderImpl(jndiCtx, jndiName, proxy);
         String binderMCBeanName = JNDI_BINDER_MC_BEAN_PREFIX + jndiName;
         BeanMetaData jndiBinderBMD = createBeanMetaData(binderMCBeanName, jndiBinder, container);
         DeploymentUnit parentUnit = unit.getParent();
         parentUnit.addAttachment(BeanMetaData.class + ":" + binderMCBeanName, jndiBinderBMD);

      }

      List<LocalBindingMetaData> localBindings = sessionBean.getLocalBindings();
      if (localBindings == null || localBindings.isEmpty())
      {
         InvocationHandler invocationHandler = new SingletonBeanLocalInvocationHandler(containerRegistryKey, containerGUID, clientInterceptors);
         String defaultBusinessLocalJNDIName = jndiNameResolver.resolveLocalBusinessDefaultJNDIName(sessionBean);
         Object proxy = proxyFactory.createProxy(allLocalinterfaces.toArray(new Class<?>[allLocalinterfaces.size()]),
               invocationHandler);
         JNDIBinderImpl jndiBinder = new JNDIBinderImpl(jndiCtx, defaultBusinessLocalJNDIName, proxy);
         String binderMCBeanName = JNDI_BINDER_MC_BEAN_PREFIX + defaultBusinessLocalJNDIName;
         BeanMetaData jndiBinderBMD = createBeanMetaData(binderMCBeanName, jndiBinder, container);
         DeploymentUnit parentUnit = unit.getParent();
         parentUnit.addAttachment(BeanMetaData.class + ":" + binderMCBeanName, jndiBinderBMD);
      }
      else
      {
         for (LocalBindingMetaData localBinding : localBindings)
         {
            String jndiName = localBinding.getJndiName();
            // if not explicitly specified, then use the default jndi name
            if (jndiName == null)
            {
               jndiName = jndiNameResolver.resolveLocalBusinessDefaultJNDIName(sessionBean);
            }
            InvocationHandler invocationHandler = new SingletonBeanLocalInvocationHandler(containerRegistryKey, containerGUID, clientInterceptors);
            Object proxy = proxyFactory.createProxy(
                  allLocalinterfaces.toArray(new Class<?>[allLocalinterfaces.size()]), invocationHandler);
            JNDIBinderImpl jndiBinder = new JNDIBinderImpl(jndiCtx, jndiName, proxy);
            String binderMCBeanName = JNDI_BINDER_MC_BEAN_PREFIX + jndiName;
            BeanMetaData jndiBinderBMD = createBeanMetaData(binderMCBeanName, jndiBinder, container);
View Full Code Here

         {
            throw new RuntimeException("Could not load business local interface " + businessLocal, cnfe);
         }
         allLocalinterfaces.add(businessLocalIntf);

         InvocationHandler invocationHandler = new SingletonBeanLocalInvocationHandler(containerRegistryKey,
               businessLocal, clientInterceptors);

         // time to create a proxy
         Object proxy = proxyFactory.createProxy(new Class<?>[]
         {businessLocalIntf}, invocationHandler);

         // bind to jndi

         String jndiName = jndiNameResolver.resolveJNDIName(sessionBean, businessLocal);

         Binding binding = new Binding(jndiName, proxy, "EJB3.x Local Business Interface");
         bindings.add(binding);

      }

      List<LocalBindingMetaData> localBindings = sessionBean.getLocalBindings();
      if (localBindings == null || localBindings.isEmpty())
      {
         InvocationHandler invocationHandler = new SingletonBeanLocalInvocationHandler(containerRegistryKey, containerGUID, clientInterceptors);
         String defaultBusinessLocalJNDIName = jndiNameResolver.resolveLocalBusinessDefaultJNDIName(sessionBean);
         Object proxy = proxyFactory.createProxy(allLocalinterfaces.toArray(new Class<?>[allLocalinterfaces.size()]),
               invocationHandler);
         Binding binding = new Binding(defaultBusinessLocalJNDIName, proxy, "EJB3.x Default Local Business Interface");
         bindings.add(binding);
      }
      else
      {
         for (LocalBindingMetaData localBinding : localBindings)
         {
            String jndiName = localBinding.getJndiName();
            // if not explicitly specified, then use the default jndi name
            if (jndiName == null)
            {
               jndiName = jndiNameResolver.resolveLocalBusinessDefaultJNDIName(sessionBean);
            }
            InvocationHandler invocationHandler = new SingletonBeanLocalInvocationHandler(containerRegistryKey, containerGUID, clientInterceptors);
            Object proxy = proxyFactory.createProxy(
                  allLocalinterfaces.toArray(new Class<?>[allLocalinterfaces.size()]), invocationHandler);
            Binding binding = new Binding(jndiName, proxy, "EJB3.x Default Local Business Interface");
            bindings.add(binding);
View Full Code Here

    * @return
    */
   private TimerService createTimerService()
   {
      // get the TimedObjectInvoker
      TimedObjectInvoker timedObjectInvoker = this.getTimedObjectInvoker();
      // if there's no TimedObjectInvoker, we can't do anything, so just
      // throw an exception
      if (timedObjectInvoker == null)
      {
         throw new IllegalStateException("Cannot create timerservice for EJB " + this.getEjbName()
View Full Code Here

      try
      {
         Thread.currentThread().setContextClassLoader(classloader);
         try
         {
            Util.rebind(getEnc(), "UserTransaction", new UserTransactionImpl());
         }
         catch (NamingException e)
         {
            NamingException namingException = new NamingException("Could not bind user transaction for ejb name " + ejbName + " into JNDI under jndiName: " + getEnc().getNameInNamespace() + "/" + "UserTransaction");
            namingException.setRootCause(e);
View Full Code Here

      this.metadataBasedAnnotationRepo.addComponentMetaDataLoaderFactory(new InterceptorComponentMetaDataLoaderFactory(interceptorBridges));
      this.metadataBasedAnnotationRepo.addMetaDataBridge(new AdditiveBeanInterceptorMetaDataBridge(this.beanClass, this.classloader, this.xml));
     
      List<MetaDataBridge<ApplicationExceptionMetaData>> appExceptionBridges = new ArrayList<MetaDataBridge<ApplicationExceptionMetaData>>();
      appExceptionBridges.add(new ApplicationExceptionMetaDataBridge());
      this.metadataBasedAnnotationRepo.addComponentMetaDataLoaderFactory(new ApplicationExceptionComponentMetaDataLoaderFactory(appExceptionBridges));
     
      this.metadataBasedAnnotationRepo.addMetaDataBridge(new RunAsMetaDataBridge());
      //Add a security domain bridge
      this.metadataBasedAnnotationRepo.addMetaDataBridge(new SecurityDomainMetaDataBridge());
      // Ensure that an @Clustered annotation is visible to AOP if the XML says the bean is  clustered.
View Full Code Here

      interceptorBridges.add(new InterceptorMetaDataBridge());
      this.metadataBasedAnnotationRepo.addComponentMetaDataLoaderFactory(new InterceptorComponentMetaDataLoaderFactory(interceptorBridges));
      this.metadataBasedAnnotationRepo.addMetaDataBridge(new AdditiveBeanInterceptorMetaDataBridge(this.beanClass, this.classloader, this.xml));
     
      List<MetaDataBridge<ApplicationExceptionMetaData>> appExceptionBridges = new ArrayList<MetaDataBridge<ApplicationExceptionMetaData>>();
      appExceptionBridges.add(new ApplicationExceptionMetaDataBridge());
      this.metadataBasedAnnotationRepo.addComponentMetaDataLoaderFactory(new ApplicationExceptionComponentMetaDataLoaderFactory(appExceptionBridges));
     
      this.metadataBasedAnnotationRepo.addMetaDataBridge(new RunAsMetaDataBridge());
      //Add a security domain bridge
      this.metadataBasedAnnotationRepo.addMetaDataBridge(new SecurityDomainMetaDataBridge());
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.singleton.proxy.impl.invocationhandler.SingletonBeanLocalInvocationHandler

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.