Package org.jboss.ejb3.proxy.factory.session.stateful

Examples of org.jboss.ejb3.proxy.factory.session.stateful.StatefulSessionProxyFactory


        
         // Find the Proxy Factory Key for this SFSB
         String proxyFactoryKey = sfsbJndiRegistrar.getProxyFactoryRegistryKey(this.getMetaData(), isLocal);

         // Lookup the Proxy Factory in the Object Store
         StatefulSessionProxyFactory proxyFactory = Ejb3RegistrarLocator.locateRegistrar().lookup(proxyFactoryKey,
               StatefulSessionProxyFactory.class);
        
         // Create a new EJB2.x Proxy
         Object proxy = proxyFactory.createProxyEjb2x((Serializable)newStatefulInvocation.getSessionId());
        
         InvocationResponse response = marshallResponse(statefulInvocation, proxy, newStatefulInvocation.getResponseContextInfo());
         if (newStatefulInvocation.getSessionId() != null)
            response.addAttachment(StatefulConstants.NEW_ID,
                    newStatefulInvocation.getSessionId());
View Full Code Here


        
         // Find the Proxy Factory Key for this SFSB
         String proxyFactoryKey = sfsbJndiRegistrar.getProxyFactoryRegistryKey(this.getMetaData(), isLocal);

         // Lookup the Proxy Factory in the Object Store
         StatefulSessionProxyFactory proxyFactory = Ejb3RegistrarLocator.locateRegistrar().lookup(proxyFactoryKey,
               StatefulSessionProxyFactory.class);
        
         // Create a new EJB2.x Proxy
         EJBObject proxy = (EJBObject)proxyFactory.createProxyEjb2x((Serializable)newStatefulInvocation.getId());
        
         StatefulHandleRemoteImpl handle = new StatefulHandleRemoteImpl(proxy);
         InvocationResponse response = marshallResponse(statefulInvocation, handle, null);
         return response;
      }
View Full Code Here

     
      // Find the Proxy Factory Key for this SFSB
      String proxyFactoryKey = sfsbJndiRegistrar.getProxyFactoryRegistryKey(this.getMetaData(), !isRemote);
     
      // Lookup the Proxy Factory in the Object Store
      StatefulSessionProxyFactory proxyFactory = Ejb3RegistrarLocator.locateRegistrar().lookup(proxyFactoryKey,
            StatefulSessionProxyFactory.class);
     
      // Create a new business proxy
      Object proxy = proxyFactory.createProxyBusiness((Serializable) ctx.getId(), businessInterface.getName());
     
      // Return the Proxy
      return proxy;

//      Collection<ProxyFactory> proxyFactories = this.proxyDeployer.getProxyFactories().values();
View Full Code Here

      return this.createProxyRemoteEjb21(id,binding, businessInterfaceType);
   }

   public Object createProxyRemoteEjb21(Object id, RemoteBinding binding, String businessInterfaceType) throws Exception
   {
      StatefulSessionProxyFactory proxyFactory = this.getProxyFactory(binding);
      return proxyFactory.createProxyEjb2x((Serializable)id);
   }
View Full Code Here

      /*
       * In this implementation we just make a new Proxy Factory, for now
       */

      // Initialize
      StatefulSessionProxyFactory factory = null;

      // If Clustered
      if (this.isAnnotationPresent(Clustered.class))
      {
         // Get the Proxy Clustering Registry
         Ejb3Registrar registrar = Ejb3RegistrarLocator.locateRegistrar();
         String mcName = ClusteredObjectStoreBindings.CLUSTERED_OBJECTSTORE_BEAN_NAME_PROXY_CLUSTERING_REGISTRY;
         ProxyClusteringRegistry registry = (ProxyClusteringRegistry) registrar.lookup(mcName);
         assert registry != null : "Could not find " + ProxyClusteringRegistry.class.getSimpleName() + " in the "
               + Ejb3Registrar.class.getSimpleName() + " under name " + mcName;
         factory = new StatefulSessionClusteredProxyFactory(this.getName(), this.getName(), Ejb3Registry.guid(this),
               this.getMetaData(), this.getClassloader(), binding.clientBindUrl(), this.getAdvisor(), registry);
      }
      else
      {
         factory = new StatefulSessionRemoteProxyFactory(this.getName(), this.getName(), Ejb3Registry.guid(this), this
               .getMetaData(), this.getClassloader(), binding.clientBindUrl(), this.getAdvisor());
      }

      // Start the Factory
      try
      {
         factory.start();
      }
      catch (Exception e)
      {
         throw new RuntimeException("Could not start " + factory, e);
      }
View Full Code Here

        
         // Find the Proxy Factory Key for this SFSB
         String proxyFactoryKey = sfsbJndiRegistrar.getProxyFactoryRegistryKey(this.getMetaData(), isLocal);

         // Lookup the Proxy Factory in the Object Store
         StatefulSessionProxyFactory proxyFactory = Ejb3RegistrarLocator.locateRegistrar().lookup(proxyFactoryKey,
               StatefulSessionProxyFactory.class);
        
         // Create a new EJB2.x Proxy
         Object proxy = proxyFactory.createProxyEjb2x((Serializable)newStatefulInvocation.getSessionId());
        
         InvocationResponse response = marshallResponse(statefulInvocation, proxy, newStatefulInvocation.getResponseContextInfo());
         if (newStatefulInvocation.getSessionId() != null)
            response.addAttachment(StatefulConstants.NEW_ID,
                    newStatefulInvocation.getSessionId());
View Full Code Here

        
         // Find the Proxy Factory Key for this SFSB
         String proxyFactoryKey = sfsbJndiRegistrar.getProxyFactoryRegistryKey(this.getMetaData(), isLocal);

         // Lookup the Proxy Factory in the Object Store
         StatefulSessionProxyFactory proxyFactory = Ejb3RegistrarLocator.locateRegistrar().lookup(proxyFactoryKey,
               StatefulSessionProxyFactory.class);
        
         // Create a new EJB2.x Proxy
         EJBObject proxy = (EJBObject)proxyFactory.createProxyEjb2x((Serializable)newStatefulInvocation.getId());
        
         StatefulHandleRemoteImpl handle = new StatefulHandleRemoteImpl(proxy);
         InvocationResponse response = marshallResponse(statefulInvocation, handle, null);
         return response;
      }
View Full Code Here

     
      // Find the Proxy Factory Key for this SFSB
      String proxyFactoryKey = sfsbJndiRegistrar.getProxyFactoryRegistryKey(this.getMetaData(), !isRemote);
     
      // Lookup the Proxy Factory in the Object Store
      StatefulSessionProxyFactory proxyFactory = Ejb3RegistrarLocator.locateRegistrar().lookup(proxyFactoryKey,
            StatefulSessionProxyFactory.class);
     
      // Create a new business proxy
      Object proxy = proxyFactory.createProxyBusiness((Serializable) ctx.getId(), businessInterface.getName());
     
      // Return the Proxy
      return proxy;

//      Collection<ProxyFactory> proxyFactories = this.proxyDeployer.getProxyFactories().values();
View Full Code Here

      return this.createProxyRemoteEjb21(id,binding, businessInterfaceType);
   }

   public Object createProxyRemoteEjb21(Object id, RemoteBinding binding, String businessInterfaceType) throws Exception
   {
      StatefulSessionProxyFactory proxyFactory = this.getProxyFactory(binding);
      return proxyFactory.createProxyEjb2x((Serializable)id);
   }
View Full Code Here

      /*
       * In this implementation we just make a new Proxy Factory, for now
       */

      // Initialize
      StatefulSessionProxyFactory factory = null;

      // If Clustered
      if (this.isAnnotationPresent(Clustered.class))
      {
         // Get the Proxy Clustering Registry
         Ejb3Registrar registrar = Ejb3RegistrarLocator.locateRegistrar();
         String mcName = ClusteredObjectStoreBindings.CLUSTERED_OBJECTSTORE_BEAN_NAME_PROXY_CLUSTERING_REGISTRY;
         ProxyClusteringRegistry registry = (ProxyClusteringRegistry) registrar.lookup(mcName);
         assert registry != null : "Could not find " + ProxyClusteringRegistry.class.getSimpleName() + " in the "
               + Ejb3Registrar.class.getSimpleName() + " under name " + mcName;
         factory = new StatefulSessionClusteredProxyFactory(this.getName(), this.getName(), Ejb3Registry.guid(this),
               this.getMetaData(), this.getClassloader(), binding.clientBindUrl(), this.getAdvisor(), registry, null);
      }
      else
      {
         factory = new StatefulSessionRemoteProxyFactory(this.getName(), this.getName(), Ejb3Registry.guid(this), this
               .getMetaData(), this.getClassloader(), binding.clientBindUrl(), this.getAdvisor(), null);
      }

      // Start the Factory
      try
      {
         factory.start();
      }
      catch (Exception e)
      {
         throw new RuntimeException("Could not start " + factory, e);
      }
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.proxy.factory.session.stateful.StatefulSessionProxyFactory

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.