[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: MDR doesn't work on annotated privates

adrian@jboss.org do-not-reply at jboss.com
Wed Aug 13 08:31:41 EDT 2008


"wolfc" wrote : 
  | Yes you can, see EJB 3 12.4.1 the last bullet.
  | 
  | It's just that if there is a private method with a @PostConstruct it must be invoked regardless of the sub class (which is the weird part).

So I'm no longer understanding this issue.

In my example would Sub::postConstruct() be invoked or not?

The part of the EJB3 spec you refer to says the opposite of your "weird part"
anonymous wrote : 
  | If a lifecycle callback interceptor method is overridden by another method (regardless of
  | whether that method is itself a lifecycle callback interceptor method (of the same or different
  | type)), it will NOT be invoked.
  | 

My emphasis.

So I don't see why you have to look at annotations on overridden methods.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170318#4170318

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170318



More information about the jboss-dev-forums mailing list