My Photo

Become a Fan

DailyMile

Google Ad Skyscraper

« cewolf charting is pretty cool | Main | Async Beans Introduction »

November 07, 2003

Comments

Sam Pullara

From what I read in the JavaDocs it is perfectly acceptable to call these methods. They are listed as optional in the specification, not restricted. Normally you use setMessageListener on the MessageConsumer though, not on the Session except in rare cases. I can only imagine that it doesn't work in the WebSphere case because of the weak integration of JMS with the application server.

Billy

The spec says these APIs cannot be used in portable applications as well as in containers that forbid threads, typically the EJB container. 6.7, Page 102 from the J2EE 1.3 spec. JMS is fully implemented in WebSphere, arguably as well as or better than any one elses. Other vendors have only just gotten around to what 5.0 had when it shipped, for example, XA support for any JMS provider rather than just the built in one as well as ASF support for any provider on the incoming side.
These restriction have nothing to do with WebSphere, it's just the spec.

Andreas

Session.setMessageListener is ASF and implementation is optional. A 'normal' JMS client would use consumer.setMessageListener.

As for the JCA 1.5. The JMS provider now provides the 'wrapper' (a connection handle) and - at least here - will restrict usage of methods here as well. set/getExceptionListener on a handle doesn't make much sense in a managed environment.

Another problem I ran into is the Java2 security. What do you think, does it make sense for a JMS JCA 1.5 RA to start a JMS server intravm when the RA is started and stop it when the RA stops? The problem is that I ran into security issues because the JMS server basically hits any security restrictions (e.g. file read, thread pools, socket listens etc). For me it would be a portable way to start a JMS server intravm (in contrast to implement a service interface for any app server). However, it would require to give any permissions (e.g. no hot deploy of the RA possible then, I guess).

Billy

There should be a way for an RA to specify a security policy for itself. I'm not sure whether this is part of the spec or vendor specific. I don't see a reason why you couldn't/shouldn't start an engine in the RA, the whole point of an RA is to connect to the outside world and of course, you'll need sockets and maybe files to do that.

Aleksey

I used unwrapped/altered JMS suggested in this article.
Basically i did have only one problem:
when you create it directly it uses default Queue Manager of WS MQ.
Sometimes customer does not like this limitation.

Looking from other side... actually i do not ned to have _J2EE_ application to setMessageLister().
I wanted just a service which extends WAS and could do this. Currently there is nop way to make suche service. No, MBean here does not help me unfortunately. In JBoss it does, in WAS it does not. Because in WAS MBeans must be started/registerd from again J2EE container. With the same limitations.

Any ideas?

kwong

yes, I do find all the restrictions on JMS calls in websphere *extremely* annoying. We don't find such restrictions in Weblogic or JBoss at all and end up getting stuck trying to port our J2EE application onto WAS for a long time....

The comments to this entry are closed.