4 Replies Latest reply: Jul 15, 2011 7:27 AM by Prasad Deshpande RSS

How to set message listener in WAR

Prasad Deshpande Expert

Hi Guys,

 

Since jboss AS7 shipped with Hornetq as JMS implementation (thought AS6 was too, but I didn't try AS6) and hornetq seems to be strict on specs, I have following problem.

 

I have an application an EAR that has EJB jar & several WAR modules. There are also some standalone clients for this application. So whenever a standalone application updates something, I wanted to proces few things in WAR's so what I was doing I was publishing a message from EJB & WAR's that are interested in message were listening to a topic, now since Hornetq is stricter on spec, the same setup gives me following error:

 

16:29:33,250 ERROR  (http-0.0.0.0-0.0.0.0-8080-1) javax.jms.IllegalStateException: This method is not applicable inside the application server. See the J2EE spec, e.g. J2EE1.4 Section 6.6

16:29:33,250 ERROR  (http-0.0.0.0-0.0.0.0-8080-1)       at org.hornetq.ra.HornetQRASessionFactoryImpl.setExceptionListener(HornetQRASessionFactoryImpl.java:532)

 

 

This used to work with earlier implimentations of JBoss like AS 5.1.

 

My question to you guys is, how above scenario needs to be taken care? How Ejb module can now notify WAR module about something happening? Any suggestions?

 

Thanks,

Prasad