Package org.jboss.ejb3.core.test.ejbthree1512

Examples of org.jboss.ejb3.core.test.ejbthree1512.MyStateless21Home.create()


  
   @Test
   public void test1() throws Exception
   {
      ValueHolderHome home = lookup("ValueHolderBean/localHome", ValueHolderHome.class);
      ValueHolder bean = home.create("value");
      String actual = bean.getValue();
      assertEquals("value", actual);
   }
}
View Full Code Here


   @Test
   public void testCreate() throws Exception
   {
      LegacyGreeterHome home = lookup("LegacyGreeterBean/localHome", LegacyGreeterHome.class);

      LegacyGreeterLocal bean = home.create("testCreate");

      String result = bean.sayHi();

      assertEquals("Hi testCreate", result);
   }
View Full Code Here

   {
      SecurityContext sc = SecurityContextFactory.createSecurityContext("test");
      SecurityContextAssociation.setSecurityContext(sc);
           
      SecuredGreeter21RemoteHome home = lookup("SecuredGreeter21Bean/home", SecuredGreeter21RemoteHome.class);
      SecuredGreeter21Remote bean = home.create("testAnonymous");
      String result = bean.sayHi();

      assertEquals("Hi testAnonymous (anonymous)", result);
   }
View Full Code Here

   public void testSomebody() throws Exception
   {
      login("somebody", null);
     
      SecuredGreeter21RemoteHome home = lookup("SecuredGreeter21Bean/home", SecuredGreeter21RemoteHome.class);
      SecuredGreeter21Remote bean = home.create("testSomebody");
      String result = bean.sayHi();

      assertEquals("Hi testSomebody (somebody)", result);
   }
}
View Full Code Here

  
   @Test
   public void test21() throws Exception
   {
      MyStateful21Home home = (MyStateful21Home) getInitialContext().lookup("MyStateful21Bean/home");
      MyStateful21 session = home.create();
      session.setName("Test");
      String actual = session.sayHello();
      assertEquals("Hi Test", actual);
      try
      {
View Full Code Here

  
   @Test
   public void testRemoveByHandle() throws Exception
   {
      MyStateful21Home home = (MyStateful21Home) getInitialContext().lookup("MyStateful21Bean/home");
      MyStateful21 session = home.create();
      session.setName("Test");
      String actual = session.sayHello();
      assertEquals("Hi Test", actual);
      try
      {
View Full Code Here

               for(Class<?> interceptorClass : interceptorsAnnotation.value())
               {
                  Object interceptor = interceptors.get(interceptorClass);
                  if(interceptor == null)
                  {
                     interceptor = interceptorFactory.create(advisor, interceptorClass);
                     interceptors.put(interceptorClass, interceptor);
                  }
                  //Advisor interceptorAdvisor = ((Advised) interceptor)._getAdvisor();
                  //Advisor interceptorAdvisor = advisor.getManager().getAdvisor(interceptorClass);
                  ExtendedAdvisor interceptorAdvisor = ExtendedAdvisorHelper.getExtendedAdvisor(advisor, interceptor);
View Full Code Here

               for(Class<?> interceptorClass : interceptorsAnnotation.value())
               {
                  Object interceptor = interceptors.get(interceptorClass);
                  if(interceptor == null)
                  {
                     interceptor = interceptorFactory.create(advisor, interceptorClass);
                     interceptors.put(interceptorClass, interceptor);
                  }
                  //Advisor interceptorAdvisor = ((Advised) interceptor)._getAdvisor();
                  //Advisor interceptorAdvisor = advisor.getManager().getAdvisor(interceptorClass);
                  ExtendedAdvisor interceptorAdvisor = ExtendedAdvisorHelper.getExtendedAdvisor(advisor, interceptor);
View Full Code Here

         InterceptorFactory interceptorFactory = interceptorFactoryRef.value().newInstance();
        
         List<Object> ejb3Interceptors = new ArrayList<Object>();
         for(Class<?> interceptorClass : container.getInterceptorRegistry().getInterceptorClasses())
         {
            Object interceptor = interceptorFactory.create(advisor, interceptorClass);
            ejb3Interceptors.add(interceptor);
         }
        
         Constructor<T> constructor = advisor.getClazz().getConstructor();
         int idx = advisor.getConstructorIndex(constructor);
View Full Code Here

               for(Class<?> interceptorClass : interceptorsAnnotation.value())
               {
                  Object interceptor = interceptors.get(interceptorClass);
                  if(interceptor == null)
                  {
                     interceptor = interceptorFactory.create(advisor, interceptorClass);
                     interceptors.put(interceptorClass, interceptor);
                  }
                  //Advisor interceptorAdvisor = ((Advised) interceptor)._getAdvisor();
                  //Advisor interceptorAdvisor = advisor.getManager().getAdvisor(interceptorClass);
                  ExtendedAdvisor interceptorAdvisor = ExtendedAdvisorHelper.getExtendedAdvisor(advisor, interceptor);
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.