2 Replies Latest reply on Jul 17, 2011 5:26 PM by henk de boer

    AS7 Strict on Specification?

    Prasad Deshpande Expert



      Until AS 5.1, I was using javax.jms.TopicConnection.setExceptionListener() method in a web application that is a part of EAR. It used to work in AS 5.1 (I couldn't deploy my app reliably on AS6). But in AS7, it's throwing exception as follows:


      16:29:33,250 ERROR [stderr] (http- 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 [stderr] (http-       at org.hornetq.ra.HornetQRASessionFactoryImpl.setExceptionListener(HornetQRASessionFactoryImpl.java:532)

      16:29:33,250 ERROR [stderr] (http-       at com.banctec.caseware.components.common.JMSSubscription.setupSubscription(JMSSubscription.java:106)


      My question is, Does AS7 follows specification strictly not to allow setting exceptionlistener in WAR that is a part of EAR?




        • 1. Re: AS7 Strict on Specification?
          jaikiran pai Master

          I think you would have run into the same error on even JBoss AS6 since AS6 too uses HornetQ. AS5 used to use JBoss Messaging project which might have been lenient. Looks like HornetQ is stricter in this aspect.

          1 of 1 people found this helpful
          • 2. Re: AS7 Strict on Specification?
            henk de boer Master

            In JBoss AS 5.x you could set a property on your connection factory to switch between strict and non-strict behavior. In JBoss AS 6, this switch is gone, but java:/ConnectionFactory allows the stuff that Section 6.6 of the ancient J2EE 1.4 spec forbids, while java:/JmsXA doesn't.


            If I'm not mistaken, java:/ConnectionFactory is not pooled (and thus "your performance will suck"*), while java:/JmsXA is pooled.


            (* famous quote from a JBoss JMS faq )