JMS callbacks

Apparently, Object properties of JMS Messages will only accept primitive object types (e.g. Integer, Boolean, String, etc), which is of limited use, as Message already provides putIntegerProperty() etc. I wanted to pass an object reference (to a Session Bean), so that I could (cleverly I thought) use it to invoke a callback, and thus be able to get results back from the Message Bean which was consuming the JMS Message.

Now that I think about it, such a thing would be completely useless across JVMs (or indeed across two entirely different systems, implementing JMS) which is why I suspect you can’t do it.

It would be nice if there was an easy way to do asynchronous calls in J2EE/JEE5 with a way of retrieving the results, without resorting to using your own threads or ThreadPool inside the container, which is apparently a big no-no. I’m gonna be thinking about this one for a while I expect…