setExceptionListener is not permitted in this container

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

setExceptionListener is not permitted in this container

pandharinath.barve
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: setExceptionListener is not permitted in this container

Mike Wilson
Administrator
This seems like a pure JMS or Websphere problem so you should consult an
appropriate forum for that. And, as we've asked you several times before,
please separate your JMS and Ajax code so you better can know which one is
at fault.

Mike Wilson

pandharinath.barve wrote:

> My Code.
>
> Server Side
>
> // opening and setting up JMS subscriber. calling this on page load
> public void open() throws JMSException {
>
> // JMS connection
>  getConnection();
>
> connection.setExceptionListener(new ExceptionListener() {
>   // code here
> });
>
> topicConsumer.setMessageListener(new MessageListener() {
>
> public void onMessage(Message message) {
> // on message calling setMessageDisplay
> }
> });
>
>  jmsConnection.start();
>
> }
>
>
> public void setMessageDisplay(final String output) {
> Browser.withAllSessionsFiltered(new
> UpdatesEnabledFilter(
> "UPDATES_ENABLED"), new Runnable() {
>
> @Override
> public void run() {
> String[][] data = { { output } };
> Util.addRows("messageDisplay", data)
>
> }
>
> });
>
> }
>
> // calling this on page unload
> public close(){
>   // closing jms connection which started in open method.
> }
>
> while running in websphere  getting javax.jms.IllegalStateException:
> CWSIA0025E: The method setExceptionListener is not permitted in this
> container.   In Jboss it works fine.
>
> Could you please help/guide

Reply | Threaded
Open this post in threaded view
|

Re: setExceptionListener is not permitted in this container

pandharinath.barve
In reply to this post by pandharinath.barve
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: setExceptionListener is not permitted in this container

Mike Wilson
Administrator
Do you want to send the message to all users, or to a single user?

pandharinath.barve wrote:
> Thanks Mike for response. Will clean the code.
>
> Could you please guide me towards any example  where  MDB ( from
> Websphere application server) can sent response to DWR client pages.
>
> Thanks for help again.

Reply | Threaded
Open this post in threaded view
|

Re: setExceptionListener is not permitted in this container

pandharinath.barve
In reply to this post by pandharinath.barve
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: setExceptionListener is not permitted in this container

Mike Wilson
Administrator
Then you are already using the correct DWR API (Browser.withAllSessions...)
and for the DWR part nothing is wrong with the code you supplied in your
first post. But your problem lies in the JMS or appserver parts and we can't
help you with that.

Like I said previously I urge you to separate your code so you can test your
JMS and DWR code without interfering with each other. Just for a quick test
I suggest that you remove all references to DWR and implement
setMessageDisplay() as a simple System.out.writeln() call. Then you can
focus on getting your JMS code to function on all desired platforms.

pandharinath.barve wrote:
> Thanks for quick response again.
>
> I want to send it to all the users( dwr clients page).
>
> Basically JMS Topic configured on websphere will receive messages and
> as soon as they are on topic, we need to publish to all client pages.
>
> Thanks again.