Actually it doesn't work. It appears that MethodContextInterceptor is unwrapping the
component and placing it in the method context so when you attempt to inject SomeClass it
is an unwrapped instance. This is also going to cause problems if you try to do:
| @Name("someClass")
| public class SomeClass {
|
| @In SomeClass someClass;
|
| public void createSomething() {
| someOtherClass.createSomething();
| }
|
| @Asynchronous
| public void sendAnEmail() {
| //Send an email asynchronously
| }
| }
|
| @Name("someOtherClass")
| public class SomeOtherClass {
|
| @In SomeClass someClass;
|
| public void createSomething() {
| someClass.sendAnEmail();
| }
| }
|
Is this MethodContextInterceptor necessary for all component types or just Session Beans?
It's currently being applied to all components except ENTITY.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062187#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...