Examples of StatelessContainer


Examples of org.jboss.ejb3.stateless.StatelessContainer

   public void start() throws Exception
   {
      String clientBindUrl = ProxyFactoryHelper.getClientBindUrl(binding);
      locator = new InvokerLocator(clientBindUrl);
      StatelessContainer container = (StatelessContainer) getContainer();
      String partitionName = container.getPartitionName();
      proxyFamilyName = container.getDeploymentQualifiedName() + locator.getProtocol() + partitionName;
      HAPartition partition = HAPartitionLocator.getHAPartitionLocator().getHAPartition(partitionName, container.getInitialContextProperties());
      drm = partition.getDistributedReplicantManager();
      hatarget = new HATarget(partition, proxyFamilyName, locator, HATarget.ENABLE_INVOCATIONS);
      ClusteringTargetsRepository.initTarget(proxyFamilyName, hatarget.getReplicants());
     
      container.getClusterFamilies().put(proxyFamilyName, hatarget);
     
      if (clustered.loadBalancePolicy() == null || clustered.loadBalancePolicy().equals(ClusteredDefaults.LOAD_BALANCE_POLICY_DEFAULT))
      {
         lbPolicy = new RandomRobin();
      }
      else
      {
         String policyClass = clustered.loadBalancePolicy();
         try
         {
            RemoteProxyFactoryRegistry registry = container.getDeployment().getRemoteProxyFactoryRegistry();
            Class<LoadBalancePolicy> policy = registry.getLoadBalancePolicy(policyClass);
            policyClass = policy.getName();
         }
         catch (LoadBalancePolicyNotRegisteredException e){}
        
View Full Code Here

Examples of org.jboss.ejb3.stateless.StatelessContainer

         throw new RuntimeException("Could not get container for bean class " + beanMetaData.getEjbClass()
               + " with bean name " + beanMetaData.getEjbName() + " because no container configured with name '"
               + containerName + "'");
      }

      return new StatelessContainer(di.getClassLoader(), className, ejbNames.get(ejbIndex), (Domain) domain
            .getManager(), ctxProperties, deployment, beanMetaData, deployment.getAsynchronousProcessor());
   }
View Full Code Here

Examples of org.jboss.ejb3.stateless.StatelessContainer

            }
            break;
         case SLSB :
            try
            {
               container = new StatelessContainer(loader, beanClassName, ejbName, domain, ctxProperties, deployment, md);
            }
            catch (ClassNotFoundException cnfe)
            {
               throw new RuntimeException("Could not create SLSB Container for " + beanClassName, cnfe);
            }
View Full Code Here

Examples of org.jboss.ejb3.stateless.StatelessContainer

               // SLSB
               if (sessionContainer instanceof StatelessContainer)
               {
                  // Cast
                  final StatelessContainer slsb = (StatelessContainer) sessionContainer;

                  // Make new metrics
                  final BasicStatelessSessionMetrics metrics = new BasicStatelessSessionMetrics(stats, slsb);

                  // Add to beanFactories
View Full Code Here

Examples of org.jboss.ejb3.stateless.StatelessContainer

            }
            break;
         case SLSB :
            try
            {
               container = new StatelessContainer(loader, beanClassName, ejbName, domain, ctxProperties, deployment, md);
            }
            catch (ClassNotFoundException cnfe)
            {
               throw new RuntimeException("Could not create SLSB Container for " + beanClassName, cnfe);
            }
View Full Code Here

Examples of org.jboss.ejb3.stateless.StatelessContainer

/*     */
/* 246 */     if (domain == null) {
/* 247 */       throw new RuntimeException("No container configured with name '" + containerName + "''");
/*     */     }
/*     */
/* 250 */     return new StatelessContainer(this.di.getClassLoader(), this.className, (String)this.ejbNames.get(ejbIndex), domain.getManager(), this.ctxProperties, this.di.getInterceptorInfoRepository(), this.deployment);
/*     */   }
View Full Code Here

Examples of org.jboss.ejb3.stateless.StatelessContainer

      if (domain == null)
         throw new RuntimeException("No container configured with name '"
                 + containerName + "''");

      return new StatelessContainer(di.getClassLoader(), className,
              ejbNames.get(ejbIndex), (Domain) domain.getManager(),
              ctxProperties, deployment, beanMetaData);
   }
View Full Code Here

Examples of org.jboss.ejb3.stateless.StatelessContainer

      String ejbName = beanClass.getSimpleName();
      Domain domain = getDomain("Stateless Bean");
      Hashtable<?,?> ctxProperties = null;
      Ejb3Deployment deployment = new MockEjb3Deployment(new MockDeploymentUnit());
      JBossSessionBeanMetaData beanMetaData = MetaDataHelper.getMetadataFromBeanImplClass(beanClass);
      StatelessContainer container = new StatelessContainer(cl, beanClassname, ejbName, domain, ctxProperties, deployment, beanMetaData);
     
      // TODO: wickedness
      container.instantiated();
     
      container.processMetadata();
     
      // Register the Container in ObjectStore (MC)
      String containerName = container.getObjectName().getCanonicalName();
      Ejb3RegistrarLocator.locateRegistrar().bind(containerName, container);

      InitialContext ctx = new InitialContext();
      System.out.println("ctx = " + ctx);
      //System.out.println("  " + container.getInitialContext().list("MyStatelessBean").next());
View Full Code Here

Examples of org.jboss.ejb3.stateless.StatelessContainer

      if(beanMetaData.getResourceEnvironmentReferences() == null)
         ((JBossEnvironmentRefsGroupMetaData) beanMetaData.getJndiEnvironmentRefsGroup()).setResourceEnvironmentReferences(new ResourceEnvironmentReferencesMetaData());
      beanMetaData.getResourceEnvironmentReferences().add(resEnvRef);
      //
     
      StatelessContainer container = new StatelessContainer(cl, beanClassname, ejbName, domain, ctxProperties, deployment, beanMetaData);
     
      // TODO: wickedness
      container.instantiated();
     
      container.processMetadata();
     
      // Register the Container in ObjectStore (MC)
      String containerName = container.getObjectName().getCanonicalName();
      Ejb3RegistrarLocator.locateRegistrar().bind(containerName, container);

      InitialContext ctx = new InitialContext();
      System.out.println("ctx = " + ctx);
      //System.out.println("  " + container.getInitialContext().list("MyStatelessBean").next());
View Full Code Here

Examples of org.jboss.ejb3.stateless.StatelessContainer

               // SLSB
               if (sessionContainer instanceof StatelessContainer)
               {
                  // Cast
                  final StatelessContainer slsb = (StatelessContainer) sessionContainer;

                  // Make new metrics
                  final BasicStatelessSessionMetrics metrics = new BasicStatelessSessionMetrics(stats, slsb);

                  // Add to beanFactories
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.