[jboss-user] [JBoss Seam] - Re: Seam component as a listener
matt.drees
do-not-reply at jboss.com
Mon May 7 18:02:41 EDT 2007
I ran into something like that. The problem is that in
| connection.addPacketListener(this);
|
"this" is a reference to the actual bean, and not a reference to the bean's proxy. Interceptors (which are used for injection) are only called if you invoke a method on the proxy, not the bean itself.
I don't know the best way to solve the problem. In your case you could do something like
| connection.addPacketListener(Component.getInstance(this.getClass());
|
I don't really like it, but it should work.
If anyone knows a nicer way for a bean to get a reference to its own proxy, please speak up.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043788#4043788
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043788
More information about the jboss-user
mailing list