Announcement Announcement Module
No announcement yet.
how to replace MDB and preserving listener port start/stop functionality in WebSphere Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to replace MDB and preserving listener port start/stop functionality in WebSphere

    we have WebSphere 6.1, MQ, many MDBs with each one configured with its own listener port, which can be stopped and started individually with WebSphere admin console.

    We want to replace the MDBs with Spring MDPs, but we need to keep the functionality to start and stop listener ports and the retry limit on the listener port.

    In other words: how can we configure a Spring MDP, and not have it receive any messages before we enable or start "something" in WebSphere admin console, and make sure that the "something" stops or is disabled if we throw an exception (after a configurable number of exceptions) that isn't caught in our code, but propagades all the way up to the container.

    I have googled, but not found a complete solution anywhere. I have seen postings that make me believe that JCA and WMQ resource adapters could be the way to go, but I am unsure if what I want is possible and how to do it.

    I have used MDPs before without the need to control the flow of messages, but this is a new scenario to me. I know we can send messages to error queues when things fail etc, but we want the same functionality as MDB and listener ports, but without EJB.

    Dag Framstad

    PS. My knowledge of WebSphere Application Server is limited.

  • #2
    Did you find a solution ?

    Did you find a solution ?


    • #3
      No solution found

      Sorry, I have not found a solution to this.
      We have to live with MDBs and WebSphere listening ports until we don't need the ability to stop and start listeners in our application any more.


      • #4
        update: a possible solution

        I have now found a possible solution which I describe here just in case someone has the same needs that I do:

        The org.springframework.jms.listener.AbstractJmsListen ingContainer
        has methods for starting, stopping, shutting down and initializing.

        I wrote a simple class that has a reference to a listening container and methods that call these methods on the listening container. I annotated the class with the JMX annotations (ManagedResource, ManagedOperation etc.). So now I can use jconsole to stop and start a listener containter.
        (Using JMX with WebSphere is not trivial, but you can find out how by googling).

        Next step was to make a web application for managing the listening container (so I don't have to depend on JMX). This was done by making a servlet that access the MBean. I used spring's http-invoker, but any technology can be used.
        Now all the web-application needs is a list with the URL's to the listening containers that you want to manage, and then call the HTTP-invoker, which is really easy (see the spring reference doc.)

        I used spring MVC and spring HTTP-invoker, but many technologies can be used to achieve this.
        The clue is the methods that AbstractJmsListeningContainer and subclasses make available.