[jboss-user] [JBoss Seam] - Re: Is it possible to access the outer instance of a Seam Co

youngm do-not-reply at jboss.com
Mon Jul 9 18:46:37 EDT 2007


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#4062187

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



More information about the jboss-user mailing list