I'm currently developing a JMS system. I have been able to develop the publisher (JSF), the subscriber (MDB) and I can print the JMS messages to the console from the onMessage
method of the MDB.
My problem is that I can't manage to display them in a view: Either JSF, Applet or JTextArea swing.
How can I invoke the JTextArea of a given applet from the onMessage method of the MDB? I have tried to instantiate an Applet object from the MDB
ex: TestApplet tst = new TestApplet()
:
Then into the onMessage
method, after having extracted the message into testMessage
variable I tried: tst.textAtrea.append(testMessage);
Here I got an error from the container.
Beside the above example, I would appreciate any other solution to my problem (just want to display the JMS messages in a view, not only at the console)