[jboss-dev-forums] [JBoss AS 7 Development] - AS& Stateless Beans and Annotations

Bill Rosenberg do-not-reply at jboss.com
Sun Oct 28 12:54:39 EDT 2012


Bill Rosenberg [https://community.jboss.org/people/bill.rosenberg] created the discussion

"AS& Stateless Beans and Annotations"

To view the discussion, visit: https://community.jboss.org/message/772682#772682

--------------------------------------------------------------
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
[https://community.jboss.org/message/772682#772682]

Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20121028/96dabfb6/attachment.html 


More information about the jboss-dev-forums mailing list