[jboss-user] [JBoss Seam] - Re: Is it possible to access the outer instance of a Seam Co
Ahyes, that's true, didn't think of that. I dunno, tough problem to solve then. Report it in JIRA I guess. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4062805#4062805 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4062805 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Is it possible to access the outer instance of a Seam Co
http://jira.jboss.org/jira/browse/JBSEAM-1642 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4063035#4063035 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4063035 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Is it possible to access the outer instance of a Seam Co
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=bbop=viewtopicp=4062187#4062187 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4062187 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Is it possible to access the outer instance of a Seam Co
AFAIK calls to this. aren't intercepted so you can't. You need to put the async method on separate component, inject the component and call cmp.sendAnEmail() - though this does seem quite convoluted. Hmmm. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4054571#4054571 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4054571 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Is it possible to access the outer instance of a Seam Co
EJB provides the context.getThis() methodperhaps ther e is some kind of Seam execution context we can make available somehow? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4054572#4054572 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4054572 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Is it possible to access the outer instance of a Seam Co
Does it apply interceptors to getThis() - if so then the Seam interceptors will be applied and you are there... View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4054573#4054573 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4054573 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Is it possible to access the outer instance of a Seam Co
I believe it does apply interceptors, however, my bean isn't an EJB. :) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4054574#4054574 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4054574 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Is it possible to access the outer instance of a Seam Co
I was just mentioning that as an idea. Perhaps Seam could provide an invocation context in ThreadLocal so I could do something like: InvocationContext.getContext().sendAnEmail(); Just a thought. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4054575#4054575 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4054575 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Is it possible to access the outer instance of a Seam Co
Ask Gavin what he thinks, I think that we can improve on where we are at now :) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4054577#4054577 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4054577 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Is it possible to access the outer instance of a Seam Co
| @Name(someClass) | public class SomeClass { | | @In SomeClass someClass; | | public void createSomething() { | someClass.sendAnEmail(); | } | | @Asynchronous | public void sendAnEmail() { | //Send an email asynchronously | } | } I *think* that should work View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4054587#4054587 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4054587 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user