Package org.jboss.ejb3.session

Examples of org.jboss.ejb3.session.SessionContainer


   {
      AbstractEJB3TestCase.beforeClass();
     
      deploy("securitymanager-beans.xml");
     
      SessionContainer container = deploySessionEjb(SecuredBean.class);
      container.setJaccContextId("test");
   }
View Full Code Here


            deployment.setPersistenceManagerFactoryRegistry(registry);
            deployment.setCacheFactoryRegistry(cacheFactoryRegistry);
         }

         // Create a Session Container
         SessionContainer container = instanciateContainer(sessionType, cl, beanClassname, smd.getEjbName(), domain,
               ctxProperties, deployment, smd);

         // Deploy and register
         registerContainer(container);
         containers.add(container);

      }

      // make sure the containers are available through lookup
      for(SessionContainer container : containers)
      {
         try
         {
            bootstrap.lookup(container.getObjectName().getCanonicalName(), Object.class);
         }
         catch (RuntimeException e)
         {
            throw e;
         }
View Full Code Here

   private static SessionContainer instanciateContainer(ContainerType type, ClassLoader loader, String beanClassName,
         String ejbName, Domain domain, Hashtable<?, ?> ctxProperties, Ejb3Deployment deployment,
         JBossSessionBeanMetaData md)
   {
      // Initialize
      SessionContainer container = null;

      /*
       * Instanciate the Container, depending upon the type specified
       */
      switch (type)
View Full Code Here

      assert beanContext != null : "beanContext is null";
      assert businessInterface != null : "businessInterface is null";
     
      StatefulBeanContext ctx = (StatefulBeanContext) beanContext;
     
      SessionContainer container = ctx.getContainer();
      assert container == this : "beanContext not of this container (" + container + " != " + this + ")";
     
      boolean isRemote = false;
      boolean found = false;
      Class[] remoteInterfaces = ProxyFactoryHelper.getRemoteAndBusinessRemoteInterfaces(this);
View Full Code Here

   }
  
   protected void validateEjb21Views()
   {
      // Obtain Container
      SessionContainer container = this.getContainer();
     
      // Obtain @RemoteHome
      RemoteHome remoteHome = container.getAnnotation(RemoteHome.class);

      // Ensure that if EJB 2.1 Components are defined, they're complete
      this.validateEjb21Views(remoteHome == null ? null : remoteHome.value(), ProxyFactoryHelper
            .getRemoteInterfaces(container));
View Full Code Here

   {
      this.init();
     
      RemoteBinding binding = this.getBinding();
      InvokerLocator locator = this.getLocator();
      SessionContainer container = this.getContainer();
      partitionName = container.getPartitionName();
      proxyFamilyName = container.getDeploymentQualifiedName() + locator.getProtocol() + partitionName;
      HAPartition partition = HAPartitionLocator.getHAPartitionLocator().getHAPartition(partitionName, container.getInitialContextProperties());
      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 FirstAvailable();
      }
      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

      assert beanContext != null : "beanContext is null";
      assert businessInterface != null : "businessInterface is null";
     
      StatefulBeanContext ctx = (StatefulBeanContext) beanContext;
     
      SessionContainer container = ctx.getContainer();
      assert container == this : "beanContext not of this container (" + container + " != " + this + ")";
     
      boolean isRemote = false;
      boolean found = false;
      Class<?>[] remoteInterfaces = ProxyFactoryHelper.getRemoteAndBusinessRemoteInterfaces(this);
View Full Code Here

/* 900 */     assert (beanContext != null) : "beanContext is null";
/* 901 */     assert (businessInterface != null) : "businessInterface is null";
/*     */
/* 903 */     StatefulBeanContext ctx = (StatefulBeanContext)beanContext;
/*     */
/* 905 */     SessionContainer container = ctx.getContainer();
/* 906 */     assert (container == this) : ("beanContext not of this container (" + container + " != " + this + ")");
/*     */
/* 908 */     boolean isRemote = false;
/* 909 */     boolean found = false;
/* 910 */     Class[] remoteInterfaces = ProxyFactoryHelper.getRemoteAndBusinessRemoteInterfaces(this);
View Full Code Here

/* 113 */       container = Ejb3Registry.getClusterContainer(this.containerClusterUid);
/*     */     }
/* 115 */     if (container == null) {
/* 116 */       throw new EJBException("Invalid (i.e. remote) invocation of local interface (null container) for " + this.containerGuid);
/*     */     }
/* 118 */     SessionContainer sfsb = (SessionContainer)container;
/* 119 */     return sfsb.localInvoke(this.id, method, args, (FutureHolder)this.provider);
/*     */   }
View Full Code Here

/*  71 */     this.binding = binding;
/*     */   }
/*     */
/*     */   protected Class<?>[] getInterfaces()
/*     */   {
/*  76 */     SessionContainer statefulContainer = (SessionContainer)getContainer();
/*  77 */     RemoteHome remoteHome = (RemoteHome)statefulContainer.resolveAnnotation(RemoteHome.class);
/*     */
/*  79 */     boolean bindTogether = false;
/*     */
/*  81 */     if ((remoteHome != null) && (bindHomeAndBusinessTogether(statefulContainer))) {
/*  82 */       bindTogether = true;
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.session.SessionContainer

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.