I would like to have a Seam component used as a listener. Here's what I mean:
@Name("myBean")
| @Stateful
| public class MyClassBean implements MyClass, PacketListener {
| @In
| Connection connection = null;
|
| @In
| List<MyMessageList> messageList = null;
|
| @Create
| public void createBean() {
| connection.addPacketListener(this);
| }
|
| public void processPacket(Packet packet) {
| messageList.add(Packet);
| }
| }
The processPacket method has its interface defined by the PacketListener
interface and is thus implemented in my bean. So I want the Seam component to
be a listener - this can be seen in the statement:
connection.addPacketListener(this);
This seems to work... up to a point. So when the processPacket method is
invoked, I notice messageList doesn't seem to be injected. What am I doing
wrong and is there any way around this?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043768#4043768
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043768
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user