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

Examples of org.jboss.ejb3.proxy.factory.session.SessionProxyFactory


      Object factory = Ejb3RegistrarLocator.locateRegistrar().lookup(proxyFactoryKey);
     
      // Cast
      assert factory instanceof SessionProxyFactory : "Specified factory " + factory.getClass().getName() + " is not of type "
      + SessionProxyFactory.class.getName() + " as required by " + StatefulContainer.class.getName() + ", but was instead " + factory;
      SessionProxyFactory sessionFactory = null;
      sessionFactory = SessionProxyFactory.class.cast(factory);

      // Create Proxy
      Object proxy = sessionFactory.createProxyEjb2x();
     
      // Return
      return proxy;
   }
View Full Code Here


    * @return
    */
   protected SessionProxyFactory getProxyFactory(String proxyFactoryRegistryBindName)
   {
      // Lookup
      SessionProxyFactory factory = Ejb3RegistrarLocator.locateRegistrar().lookup(proxyFactoryRegistryBindName,
            SessionProxyFactory.class);

      // Return
      return factory;
   }
View Full Code Here

   protected SessionProxyFactory createRemoteProxyFactory(final String name, final String containerName,
         final String containerGuid, final JBossSessionBeanMetaData smd, final ClassLoader cl, final String url,
         final Advisor advisor, final String interceptorStack)
   {
      // Create
      SessionProxyFactory factory = new StatefulSessionClusteredProxyFactory(name, containerName, containerGuid, smd,
            cl, url, advisor, getRegistry(), interceptorStack);

      // Register with Remoting
      log.debug("Registering with Remoting Dispatcher under name \"" + factory.getName() + "\": " + factory);
      Dispatcher.singleton.registerTarget(factory.getName(), factory);

      // Return
      return factory;
   }
View Full Code Here

   protected SessionProxyFactory createRemoteProxyFactory(final String name, final String containerName,
         final String containerGuid, final JBossSessionBeanMetaData smd, final ClassLoader cl, final String url,
         final Advisor advisor, final String interceptorStack)
   {
      // Create
      SessionProxyFactory factory = new StatelessSessionClusteredProxyFactory(name, containerName, containerGuid, smd,
            cl, url, advisor, getRegistry(), interceptorStack);

      // Register with Remoting
      log.debug("Registering with Remoting Dispatcher under name \"" + factory.getName() + "\": " + factory);
      Dispatcher.singleton.registerTarget(factory.getName(), factory);

      // Return
      return factory;
   }
View Full Code Here

      Object factory = Ejb3RegistrarLocator.locateRegistrar().lookup(proxyFactoryKey);
     
      // Cast
      assert factory instanceof SessionProxyFactory : "Specified factory " + factory.getClass().getName() + " is not of type "
      + SessionProxyFactory.class.getName() + " as required by " + StatefulContainer.class.getName() + ", but was instead " + factory;
      SessionProxyFactory sessionFactory = null;
      sessionFactory = SessionProxyFactory.class.cast(factory);

      // Create Proxy
      Object proxy = sessionFactory.createProxyEjb2x();
     
      // Return
      return proxy;
   }
View Full Code Here

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

      // Create
      SessionProxyFactory factory = new ServiceRemoteProxyFactory(this.getName(), this.getName(), Ejb3Registry
            .guid(this), (JBossServiceBeanMetaData) this.getMetaData(), this.getClassloader(), binding.clientBindUrl(),
            this.getAdvisor(), binding.interceptorStack());

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

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

      // Create
      SessionProxyFactory factory = new ServiceRemoteProxyFactory(this.getName(), this.getName(), Ejb3Registry
            .guid(this), (JBossServiceBeanMetaData) this.getMetaData(), this.getClassloader(), binding.clientBindUrl(),
            this.getAdvisor(), binding.interceptorStack());

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

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

      // Initialize
      SessionProxyFactory 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 StatelessSessionClusteredProxyFactory(this.getName(), this.getName(), Ejb3Registry.guid(this),
               this.getMetaData(), this.getClassloader(), binding.clientBindUrl(), this.getAdvisor(), registry, null);
      }
      else
      {
         factory = new StatelessSessionRemoteProxyFactory(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("Error in starting " + factory, e);
      }
View Full Code Here

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

      // Create
      SessionProxyFactory factory = new ServiceRemoteProxyFactory(this.getName(), this.getName(), Ejb3Registry
            .guid(this), (JBossServiceBeanMetaData) this.getMetaData(), this.getClassloader(), binding.clientBindUrl(),
            this.getAdvisor(), binding.interceptorStack());

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

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

      // Initialize
      SessionProxyFactory 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 StatelessSessionClusteredProxyFactory(this.getName(), this.getName(), Ejb3Registry.guid(this),
               this.getMetaData(), this.getClassloader(), binding.clientBindUrl(), this.getAdvisor(), registry);
      }
      else
      {
         factory = new StatelessSessionRemoteProxyFactory(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("Error in starting " + factory, e);
      }
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.proxy.factory.session.SessionProxyFactory

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.