[jboss-user] [EJB 3.0] - nested Interceptor-calls
Christian Tre
do-not-reply at jboss.com
Mon May 17 05:08:37 EDT 2010
Christian Tre [http://community.jboss.org/people/RET] created the discussion
"nested Interceptor-calls"
To view the discussion, visit: http://community.jboss.org/message/543348#543348
--------------------------------------------------------------
Hello there,
i noticed, that nested methodcalls not raise an interception if the methods ar called from an @Interceptor-annotated method (tested for same Interceptor).
an example:
@Stateless
@Interceptors(LogInterceptor.class)
public class ParameterServiceImpl extends BaseEntityServiceImpl<Parameter> implements ParameterService, ParameterServiceLocal {
...
@Interceptors(ParameterReloader.class) // first i tried without this...
public void create(String name, String value, Company company, boolean visible, boolean readonly) {
Parameter p = new Parameter(name, value, company, visible, readonly);
this.create(p);
}
@Override
@Interceptors(ParameterReloader.class)
public void create(Parameter entity) {
super.create(entity);
}
...
}
the first method calls the create(Parameter)-method, but the 2nd methodcall does not raise Interception.
*At first i tried it without annotating the first method* and wondering that nothing happens (expected Action if the 2nd method get called).
So this is a bug or a feature to prevent infinite Interceptor-loops?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/543348#543348]
Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100517/41288b5a/attachment.html
More information about the jboss-user
mailing list