Moe Pad [https://community.jboss.org/people/moepad] created the discussion
"Intercept SessionSynchronization" To view the discussion, visit: https://community.jboss.org/message/765073#765073 -------------------------------------------------------------- Hi, I try to intercept the methods of javax.ejb.SessionSynchronization with a decorator. My decorator looks like that: @Decoratorpublic abstract class EJBRollbackDecorator implements MyTestBean{ @Inject @Delegate @Any private MyTestBean myTestBean; ByteArrayOutputStream serializedObject = new ByteArrayOutputStream(); Logger logger = Logger.getLogger(this.getClass().getName()); public EJBRollbackDecorator() { } @PostConstruct public void postConstruct() { logger.info("[DECORATOR]: constructed = " + this); } @Override public void afterBegin() { logger.info("[DECORATOR]: afterBegin"); } @Override public void afterCompletion(boolean committed) { logger.info("[DECORATOR]: afterCompletion"); } @Override public void decoratorTest() { logger.info("[DECORATOR]: decoratorTest = " + this); } } Of course, MyTestBean implements SessionSynchronization. When a new transaction is started (or committed) none of the methods of the decorator is called. But if I call the decoratorTest() method of my test bean everything works fine. Is this a bug or are the methods of SessionSynchronization not supposed to be intercepted? Thanks in advance, Moe -------------------------------------------------------------- Reply to this message by going to Community [https://community.jboss.org/message/765073#765073] Start a new discussion in EJB3 at Community [https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]
_______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user