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
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
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
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 :
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 :
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 :
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
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
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
| @Name(someClass)
| public class SomeClass {
|
| @In SomeClass someClass;
|
| public void createSomething() {
| someClass.sendAnEmail();
| }
|
| @Asynchronous
| public void sendAnEmail() {
| //Send an email asynchronously
| }
10 matches
Mail list logo