JBoss Community

AS& Stateless Beans and Annotations

created by Bill Rosenberg in JBoss AS 7 Development - View the full discussion

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

    }

 

 

}

Reply to this message by going to Community

Start a new discussion in JBoss AS 7 Development at Community