3 Replies Latest reply on Oct 29, 2012 2:58 AM by wdfink

    AS7 Stateless Beans and Annotations

    bill.rosenberg

      I am trying to make sure all the annotations on my stateless beans are working. I do not see any of the methods I have annotated with the following being executed. What am I missing?

       

      @Stateless

      @Startup

      @LocalBean

      @TransactionManagement(value=TransactionManagementType.CONTAINER)

      @TransactionAttribute(value=TransactionAttributeType.NOT_SUPPORTED)

       

      public class MyBean

      {

       

      @Remove

          public void remove()  {

              System.out.println("****HotelEJBBean.remove() called");

          }

      @PostConstruct

          public void PostConstruct() 

          {

              System.out.println("****HotelEJBBean.postConstruct() called");

          }

      @PreDestroy

          public void preDestroy() 

          {

              System.out.println("****HotelEJBBean.preDestroy() called");

          }

      @PostActivate

          public void postActivate() 

          {

              System.out.println("****HotelEJBBean.postActivate() called");

          }

      @PrePassivate

          public void prePassivate() 

          {

              System.out.println("****HotelEJBBean.prePassivate() called");

          }

       

       

      }