[cdi-dev] intercepted private @PostConstruct method behaviour?

Mark Struberg struberg at yahoo.de
Sat Jan 5 08:56:11 EST 2013


Hi folks!

What happens if I have a 


@Transactional
public class MyService {
 @PostConstruct
 private void doTheInit() {...}

Where the interceptor looks like
@Interceptor @Transactional 
public class TransactionalInterceptor {

 @PostConstruct
 public void postConstructInterception(InvocationContext ic) {..}



Question a.) does the @Transactional interceptor still apply to the _private_ doTheInit() method?

Question b.) consider the doTheInit() method being changed to public and it will get invoked by a user. Does the postConstructInterception still get invoked? Or must it only get invoked for _real_ PostConstruct actions triggered by the container?

LieGrue,
strub




More information about the cdi-dev mailing list