+

Search Tips   |   Advanced Search

Creating a new listener port

We create a new listener port for the message listener service to define the association between a connection factory, a destination, and a deployed message-driven bean. This association enables the message-driven bean to retrieve messages from the associated destination.

To use message-driven beans with a messaging provider that does not have a JCA Version 1.5 or 1.6 resource adapter, we cannot use activation specifications and therefore configure the beans against a listener port. There are also a few scenarios in which, although you could use activation specifications, you might still choose to use listener ports. For example, for compatibility with existing message-driven bean applications.

If we have existing message-driven beans that use the WebSphere MQ messaging provider (or a compliant third-party JMS provider) with listener ports, and instead to use EJB 3 message-driven beans with listener ports, these new beans can continue to use the same messaging provider.

For more information about when to use listener ports rather than activation specifications, see Message-driven beans, activation specifications, and listener ports.

(zos) Before configuring message listener resources, consider the message listener service implementation on the z/OS platform, which affects how you should configure the listener port. For more information, see (zos) Message listener service on z/OS.

A listener port defines the association between a connection factory, a destination, and a deployed message-driven bean. This association enables deployed message-driven beans associated with the port to retrieve messages from the destination. For more information, see Message-driven beans - listener port components.

  1. Start the console.

  2. In the navigation pane, click Servers > Server Types > WebSphere application servers->server_name > [Communications] Messaging > Message listener service > [Additional Properties] Listener Ports > listener_port. The Message listener port collection panel is displayed.

  3. Click New.

  4. Specify the following required properties:

    Name

    The name by which the listener port is known for administrative purposes.

    Connection factory JNDI name

    The JNDI name for the JMS connection factory to be used by the listener port; for example, jms/connFactory1.

    Destination JNDI name

    The JNDI name for the destination to be used by the listener port; for example, jms/destn1.

  5. Optional: Change other properties for the listener port, as required.

  6. Click OK.

  7. Save the changes to the master configuration.

  8. To have the changed configuration take effect, stop then restart the application server.


Results

If we set the initial state of a listener port to Started, the listener port is started automatically when a message-driven bean associated with that port is installed.


Related concepts

  • Message-driven beans - listener port components


    Related tasks

  • Configure a listener port
  • Start a listener port
  • Stopping a listener port
  • Delete a listener port
  • Deploy an enterprise application to use message-driven beans with listener ports
  • Manage message listener resources for message-driven beans

  • Listener port settings