Package org.jboss.ejb3.stateless

Examples of org.jboss.ejb3.stateless.StatelessContainer$WSCallbackImpl


      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


      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

      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

               // 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

   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());
      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

         ArrayList<EJBMetaData> beans = new ArrayList<EJBMetaData>();
         for (Object container : ejb3Module.getContainers().values())
         {
            if (container instanceof StatelessContainer)
            {
               StatelessContainer slc = (StatelessContainer)container;
               EJBMetaData usmd = new SLSBMetaData();
               usmd.setEjbName(slc.getEjbName());
               usmd.setEjbClass(slc.getBeanClassName());
               beans.add(usmd);
            }
         }

         appMetaData = new EJBArchiveMetaData();
View Full Code Here

   public void invoke(Endpoint ep, Invocation epInv) throws Exception
   {
      try
      {
         Dispatcher dispatcher = Dispatcher.singleton;
         StatelessContainer container = (StatelessContainer)dispatcher.getRegistered(objectName.getCanonicalName());
         Class beanClass = container.getBeanClass();

         Method method = getImplMethod(beanClass, epInv.getJavaMethod());
         Object[] args = epInv.getArgs();

         MethodInfo info = container.getMethodInfo(method);
         EJBContainerInvocation<StatelessContainer, StatelessBeanContext> ejb3Inv = new EJBContainerInvocation<StatelessContainer, StatelessBeanContext>(info);
         ejb3Inv.setAdvisor(container);
         ejb3Inv.setArguments(args);
         ejb3Inv.setContextCallback(new CallbackImpl(epInv));
View Full Code Here

      Ejb3ModuleMBean ejb3Module = getEJB3Module(deployedObject);
      for (Object manager : ejb3Module.getContainers().values())
      {
         if (manager instanceof StatelessContainer)
         {
            StatelessContainer container = (StatelessContainer)manager;

            SecurityDomain anSecurityDomain = (SecurityDomain)container.resolveAnnotation(SecurityDomain.class);
            if (anSecurityDomain != null)
            {
               if (securityDomain != null && !securityDomain.equals(anSecurityDomain.value()))
                  throw new IllegalStateException("Multiple security domains not supported");
View Full Code Here

      Ejb3ModuleMBean ejb3Module = getEJB3Module(deployedObject);
      for (Object manager : ejb3Module.getContainers().values())
      {
         if (manager instanceof StatelessContainer)
         {
            StatelessContainer container = (StatelessContainer)manager;

            RolesAllowed anRolesAllowed = (RolesAllowed)container.resolveAnnotation(RolesAllowed.class);
            if (anRolesAllowed != null)
            {
               for (String role : anRolesAllowed.value())
               {
                  webApp.addElement("security-role").addElement("role-name").addText(role);
View Full Code Here

    * @return
    */
   private TimerService createTimerService()
   {
      // get the TimedObjectInvoker
      TimedObjectInvoker timedObjectInvoker = this.getTimedObjectInvoker();
      // if there's no TimedObjectInvoker, we can't do anything, so just
      // throw an exception
      if (timedObjectInvoker == null)
      {
         throw new IllegalStateException("Cannot create timerservice for EJB " + this.getEjbName()
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.stateless.StatelessContainer$WSCallbackImpl

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.