This content has been marked as final.
Show 3 replies
-
1. Re: Seam component as a listener
matt.drees May 7, 2007 6:02 PM (in response to zzzz8)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 likeconnection.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. -
2. Re: Seam component as a listener
zzzz8 May 7, 2007 7:05 PM (in response to zzzz8)Hi Matt,
Thanks for the reply. I actually tried something similar to that:connection.addPacketListener(Component.getInstance("myBean"));
andconnection.addPacketListener(Component.getInstance("myBean", false));
Both didn't work for me though... -
3. Re: Seam component as a listener
matt.drees May 7, 2007 7:22 PM (in response to zzzz8)Odd. Well, I'm not sure what's up. Sorry.