Package org.jboss.ejb3.common.registrar.spi

Examples of org.jboss.ejb3.common.registrar.spi.Ejb3Registrar


        
         String mainClassName = getMainClassName(unit, true);

         Class<?> mainClass = loadClass(unit, mainClassName);

         ClientENCInjectionContainer container = new ClientENCInjectionContainer(unit, metaData, mainClass, appClientName, unit.getClassLoader(), encCtx, persistenceUnitDependencyResolver);

         //di.deployedObject = container.getObjectName();
         unit.addAttachment(ClientENCInjectionContainer.class, container);
         JBoss5DeploymentUnit ejb3Unit = new JBoss5DeploymentUnit(unit);
         getKernelAbstraction().install(container.getObjectName().getCanonicalName(),
               container.getDependencyPolicy(), ejb3Unit, container);
      }
      catch(Exception e)
      {
         log.error("Could not deploy " + unit.getName(), e);
         undeploy(unit, metaData);
View Full Code Here


   @Override
   public void undeploy(VFSDeploymentUnit unit, JBossClientMetaData metaData)
   {
      log.debug("undeploy " + unit.getName());

      ClientENCInjectionContainer container = unit.getAttachment(ClientENCInjectionContainer.class);
      if(container != null)
         getKernelAbstraction().uninstall(container.getObjectName().getCanonicalName());

      String appClientName = getJndiName(metaData);
      String deploymentClientName = null;
      if(appClientName == null)
         appClientName = getDeploymentJndiName(unit);
View Full Code Here

         Kernel sanders = this.kernel;
         assert sanders != null : Kernel.class.getSimpleName() + " must be provided in order to bind "
               + Ejb3Registrar.class.getSimpleName();

         // Create an EJB3 Registrar
         Ejb3Registrar registrar = new Ejb3McRegistrar(sanders);

         // Bind Registrar to the Locator
         Ejb3RegistrarLocator.bindRegistrar(registrar);
        
         // Log
View Full Code Here

      {
         SessionProxyInvocationHandler handler = (SessionProxyInvocationHandler) Proxy.getInvocationHandler(reference);
         id = (Serializable) handler.getTarget();
      }

      @Deprecated
      Ejb3Registrar registrar = Ejb3RegistrarLocator.locateRegistrar();

      // Get the resolver
      EndpointResolver resolver = registrar.lookup(MC_BIND_NAME_ENDPOINT_RESOLVER, EndpointResolver.class);
      this.ejbClassName = descriptor.getBeanClass().getSimpleName();
      endpointMcBindName = resolver.resolve(deploymentUnit, ejbClassName);
      this.stateful = descriptor.isStateful();
   }
View Full Code Here

      }
   }

   private Endpoint getEndpoint()
   {
      @Deprecated
      Ejb3Registrar registrar = Ejb3RegistrarLocator.locateRegistrar();
      return registrar.lookup(endpointMcBindName, Endpoint.class);
   }
View Full Code Here

         Kernel sanders = this.kernel;
         assert sanders != null : Kernel.class.getSimpleName() + " must be provided in order to bind "
               + Ejb3Registrar.class.getSimpleName();

         // Create an EJB3 Registrar
         Ejb3Registrar registrar = new Ejb3McRegistrar(sanders);

         // Bind Registrar to the Locator
         Ejb3RegistrarLocator.bindRegistrar(registrar);
        
         // Log
View Full Code Here

      try
      {
         // Attempt to get local EJB3 Registrar
         //TODO EJBTHREE-1403
         // This is the wrong way to determine local/remote
         Ejb3Registrar registrar = Ejb3RegistrarLocator.locateRegistrar();

         // Local lookup succeeded, so use it
         // BES 2008/08/22 -- a NotBoundException doesn't mean failure, just
         // means the container isn't deployed in this server. So don't catch it
         // in an inner try/catch; let it propagate to the outer catch.
         // This may or may not be the proper fix for EJBTHREE-1403, but it allows
         // clustering unit tests to pass.
//         try
//         {
            Object pfObj = registrar.lookup(proxyFactoryRegistryKey);
            assert pfObj != null : ProxyFactory.class.getName() + " from key " + proxyFactoryRegistryKey + " was null";
            assert pfObj instanceof ProxyFactory : " Object obtained from key " + proxyFactoryRegistryKey
                  + " was expected to be of type " + ProxyFactory.class.getName() + " but was instead " + pfObj;
            proxyFactory = (ProxyFactory) pfObj;
//         }
View Full Code Here

      // Initialize
      String jndiRegistrarBindName = this.getJndiRegistrarBindName();

      // Obtain Registrar
      Ejb3Registrar registrar = Ejb3RegistrarLocator.locateRegistrar();

      // Lookup
      Object obj = null;
      try
      {
         obj = registrar.lookup(jndiRegistrarBindName);
         this.setJndiRegistrar(jndiRegistrar);
      }
      // If not installed, warn and return null
      catch (NotBoundException e)
      {
View Full Code Here

    */
   public Map<String, HATarget> getClusterFamilies()
   {
      if(clusterFamilies == null)
      {     
         Ejb3Registrar registrar = Ejb3RegistrarLocator.locateRegistrar();
         ProxyClusteringRegistry registry = (ProxyClusteringRegistry) registrar.lookup(ClusteredObjectStoreBindings.CLUSTERED_OBJECTSTORE_BEAN_NAME_PROXY_CLUSTERING_REGISTRY);
         clusterFamilies = registry.getHATargets(this.getObjectName().getCanonicalName());
      }
      return clusterFamilies;
   }
View Full Code Here

      // Initialize
      String jndiRegistrarBindName = this.getJndiRegistrarBindName();

      // Obtain Registrar
      Ejb3Registrar registrar = Ejb3RegistrarLocator.locateRegistrar();

      // Lookup
      Object obj = null;
      try
      {
         obj = registrar.lookup(jndiRegistrarBindName);
         this.setJndiRegistrar(jndiRegistrar);
      }
      // If not installed, warn and return null
      catch (NotBoundException e)
      {
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.common.registrar.spi.Ejb3Registrar

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.