Package org.jboss.ejb3.common.registrar.plugin.mc

Examples of org.jboss.ejb3.common.registrar.plugin.mc.Ejb3McRegistrar


   {
      bootstrap = new EmbeddedTestMcBootstrap();
      bootstrap.run();

      // Bind the Registrar
      Ejb3RegistrarLocator.bindRegistrar(new Ejb3McRegistrar(bootstrap.getKernel()));

      bootstrap.deploy(SessionContainerTestCase.class);

   }
View Full Code Here


      bootstrap = EmbeddedTestMcBootstrap.createEmbeddedMcBootstrap();

      // Bind Registrar
      if (!Ejb3RegistrarLocator.isRegistrarBound())
      {
         Ejb3RegistrarLocator.bindRegistrar(new Ejb3McRegistrar(bootstrap.getKernel()));
      }

      deploy("namingserver-beans.xml");
      deploy("transactionmanager-beans.xml");
      deploy("mocktimerservice-beans.xml");
View Full Code Here

      bootstrap = EmbeddedTestMcBootstrap.createEmbeddedMcBootstrap();

      // Bind Registrar
      if (!Ejb3RegistrarLocator.isRegistrarBound())
      {
         Ejb3RegistrarLocator.bindRegistrar(new Ejb3McRegistrar(bootstrap.getKernel()));
      }

      deploy("namingserver-beans.xml");
      deploy("transactionmanager-beans.xml");
      deploy("mocktimerservice-beans.xml");
View Full Code Here

      DummyTransactionManager tm = new DummyTransactionManager();
      InitialContext ic = new InitialContext(ctxProperties);
      ic.bind("java:/TransactionManager", tm);
     
      EmbeddedTestMcBootstrap bootstrap = EmbeddedTestMcBootstrap.createEmbeddedMcBootstrap();
      Ejb3RegistrarLocator.bindRegistrar(new Ejb3McRegistrar(bootstrap.getKernel()));
     
      ClassLoader cl = Thread.currentThread().getContextClassLoader();
      Class<?> beanClass = MockBean.class;
      String beanClassName = beanClass.getName();
      String ejbName = beanClass.getSimpleName();
View Full Code Here

   public static void beforeClass()
   {
      bootstrap = new BasicBootstrap();
      bootstrap.run();
      final Kernel kernel = bootstrap.getKernel();
      registrar = new Ejb3McRegistrar(kernel);
   }
View Full Code Here

      Ejb3McRegistrarTestCase.setBootstrap(bootstrap);
      bootstrap.run();
      Kernel kernel = bootstrap.getKernel();

      // Bind the Ejb3Registrar
      Ejb3RegistrarLocator.bindRegistrar(new Ejb3McRegistrar(kernel));

      // Deploy
      BasicXMLDeployer deployer = new BasicXMLDeployer(kernel);
      URL deployUrl = getDeployableXmlUrl(Ejb3McRegistrarTestCase.class);
      deployer.deploy(deployUrl);
View Full Code Here

   public void testRegistrarImmutableAfterBound() throws Throwable
   {
      try
      {
         // Attempt to bind a new registrar
         Ejb3RegistrarLocator.bindRegistrar(new Ejb3McRegistrar(null));
      }
      // Expected
      catch (DuplicateBindException dbe)
      {
         return;
View Full Code Here

      // Dig into MC
      Kernel kernel = bootstrap.getKernel();

      // Create and Bind the EJB3 Registrar
      Ejb3Registrar registrar = new Ejb3McRegistrar(bootstrap.getKernel());
      Ejb3RegistrarLocator.bindRegistrar(registrar);

      // Install the BeanAnnotationAdapter w/ callback to add annotation plugins on install
      AddAnnotationPluginOnBeanAnnotationAdaptorCallbackService addCallbacksService = new AddAnnotationPluginOnBeanAnnotationAdaptorCallbackService(
            kernel);
      String addCallbacksServiceBindName = EJB3_MC_NAMESPACE + "AddCallBacksService";
      registrar.bind(addCallbacksServiceBindName, addCallbacksService);

      // Install our annotation plugin, will be picked up in BAA callback
      String annotationPluginBindName = EJB3_MC_NAMESPACE + EjbReferenceAnnotationPlugin.class.getName();
      registrar.bind(annotationPluginBindName, new EjbReferenceAnnotationPlugin(new MockEjbReferenceResolver()));
   }
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

TOP

Related Classes of org.jboss.ejb3.common.registrar.plugin.mc.Ejb3McRegistrar

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.