Package org.jboss.jbossas.embedded.testsuite.ejb3.slsb

Examples of org.jboss.jbossas.embedded.testsuite.ejb3.slsb.OutputLocalBusiness


      server.deploy(archive);

      // Test
      try
      {
         final AsyncLocalBusiness bean = (AsyncLocalBusiness) NAMING_CONTEXT.lookup(AsyncBean.class.getSimpleName()
               + JNDI_SUFFIX_LOCAL_BUSINESS);
         log.info(bean.toString());
         log.info(bean.getClass().toString());
         final SessionProxyInvocationHandlerBase handler = (SessionProxyInvocationHandlerBase) Proxy
               .getInvocationHandler(bean);
         log.info("INTERCEPTORS: " + Arrays.asList(handler.getInterceptors()).toString());

         final Future<Thread> invocation = bean.getThreadOfExecution();

         // Block and test
         final Thread beanThread = invocation.get(3, TimeUnit.SECONDS);
         final Thread ourThread = Thread.currentThread();
         log.info("Got: " + invocation);
View Full Code Here


      server.deploy(archive);

      try
      {
         // Make some JBossians
         final Jbossian jgreene = new Jbossian("Jason T. Greene", "AS Hole", 12);
         final Jbossian jpederse = new Jbossian("Jesper Pedersen", "Professional Tattletale", 21);
         final Jbossian dmlloyd = new Jbossian("David M. Lloyd", "???????", 15);
         final Jbossian wolfc = new Jbossian("Carlo de Wolf", "Superlead", 13);
         final Jbossian alr = new Jbossian("Andew Lee Rubinger", "The New Fluery", 58);
         final Jbossian asaldhan = new Jbossian("Anil Saldhana", "Karma Police", 23);

         // Get an SLSB to interact w/ the DB
         final JbossianRegistrarLocalBusiness slsb = (JbossianRegistrarLocalBusiness) NAMING_CONTEXT
               .lookup(JbossianRegistrarBean.class.getSimpleName() + JNDI_SUFFIX_LOCAL_BUSINESS);
View Full Code Here

         final Jbossian wolfc = new Jbossian("Carlo de Wolf", "Superlead", 13);
         final Jbossian alr = new Jbossian("Andew Lee Rubinger", "The New Fluery", 58);
         final Jbossian asaldhan = new Jbossian("Anil Saldhana", "Karma Police", 23);

         // Get an SLSB to interact w/ the DB
         final JbossianRegistrarLocalBusiness slsb = (JbossianRegistrarLocalBusiness) NAMING_CONTEXT
               .lookup(JbossianRegistrarBean.class.getSimpleName() + JNDI_SUFFIX_LOCAL_BUSINESS);

         // Add the JBossians
         slsb.add(jgreene);
         slsb.add(jpederse);
         slsb.add(dmlloyd);
         slsb.add(wolfc);
         slsb.add(alr);
         slsb.add(asaldhan);

         // Get all
         final Collection<Jbossian> jbossians = slsb.getAllJbossians();
         log.info("Got all JBossians: " + jbossians);

         // Test
         Assert.assertEquals(6, jbossians.size());
      }
View Full Code Here

      // Deploy the JAR
      shrinkwrapEjbContainer.deploy(archive);

      // Look up the EJB
      final Context context = ejbContainer.getContext();
      final OutputLocalBusiness bean;
      try
      {
         bean = (OutputLocalBusiness) context.lookup(OutputLocalBusiness.JNDI_NAME);
      }
      catch (final NamingException e)
      {
         throw new RuntimeException("Could not find bean proxy at " + OutputLocalBusiness.JNDI_NAME, e);
      }

      // Invoke
      final String value = bean.getOutput();

      // Undeploy
      shrinkwrapEjbContainer.undeploy(archive);

      // Shut down EJBContainer
View Full Code Here

      server.deploy(archive);

      // Test
      try
      {
         final OutputLocalBusiness bean = (OutputLocalBusiness) NAMING_CONTEXT.lookup(OutputLocalBusiness.JNDI_NAME);
         final String output = bean.getOutput();
         log.info("Got output: " + output);

         Assert.assertEquals(OutputLocalBusiness.OUTPUT, output);
      }
      finally
View Full Code Here

TOP

Related Classes of org.jboss.jbossas.embedded.testsuite.ejb3.slsb.OutputLocalBusiness

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.