JMS continued, little touch of SWT....

Thanks to Fokko, pointing me to this valuable resource, I was able to proceed in my understanding of both JMS and JNDI. My first goal is to write basically a simple sender and listener of differents queues, in order to eventually simulate the reactions of a target system (programs running on a mainframe) of the main application.

In those times were everybody is asking for web application, I've chosen to write a little GUI app, a good occasion to work a little with SWT. The only "difficulty" of this realisation is that one important source of events in the application (JMS messages) are not arriving through the UI event dispatching thread. So, there is a little chunk of code designed to update the UI properly during those phases. Here are two screenshots of the gorgeous user interface:

 

The app is simply configured through a property file (no, I won't use XML for such a thing). Here is the one used for the screenshots:

#url=file\:///D\:/mqlocaljndi/
#initialContextFactory=com.sun.jndi.fscontext.RefFSContextFactory
#queueConnectionFactory=myappqcf
#sendQueue[0]=queue\\myapp\\returnfunca
#sendQueue[1]=queue\\myapp\\returnfuncb
#receiveQueue[0]=queue\\myapp\\notifyfunca
#receiveQueue[1]=queue\\myapp\\notifyfuncb

url=jnp://localhost:1099
initialContextFactory=org.jnp.interfaces.NamingContextFactory
queueConnectionFactory=ConnectionFactory
sendQueue[0]=queue/A
sendQueue[1]=queue/B
receiveQueue[0]=queue/A
receiveQueue[1]=queue/C

The first line are uncommented when I work with WebSphere MQ's JMS implementation, the second part is when I use JBoss' JMS implementation. And that's it, it just works for now. I think I've to wait for the final implementation (with an etherogeneous environment) to see the trickiest parts.