Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User Help »

[jboss-user] [JBoss Seam] - Re: Seam component as a listener

scott.stark@jboss.org

2007-05-07


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
_______________________________________________
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user
©2008 junlu.com - Jax Systems, LLC, U.S.A.