Default messaging provider: Troubleshooting tips


New feature: In this release, two new admin console panels have been added that show very similar information from two different perspectives:

For general tips about troubleshooting problems with WAS messaging, see Messaging troubleshooting tips. This page provides additional tips specific to the default messaging provider and its use of service integration technologies.

 

A destination becomes full and can no longer receive messages because the existing messages are not being consumed.

When you configure an application to use the default messaging provider, you associate it with either of the following resource sets:

Use the following administrative console panel to inspect the configuration of the applications and JMS resources that are using the destination: Application resources for this destination.

This panel can help you find the cause of the problem by giving you a high level view of many relevant resources.

 

A JMS application can no longer send or receive messages

When you configure an application to use the default messaging provider, you associate it with either of the following resource sets:

You connect the application to the message beans or enterprise beans through the application's deployment descriptor or through code in the application itself. If you connected the application through the deployment descriptor, we can use the following admin console panel to view the installed business application as whole and inspect the configuration of the JMS resources that are being used by the application: Messaging resources for this application.

This panel can help you find the cause of the problem by giving you a high level view of many relevant resources.

 

JMS client applications running inside the Java EE client container fail when invoking the ConnectionFactory.createConnection method

When a JMS client application is running inside the Java EE client container, on a machine that is running no other WAS processes, a call to the ConnectionFactory.createConnection method can fail with the following error:

Cause

The ConnectionFactory for the default messaging provider has a dependency on the Channel Framework Service. It locates the Channel Framework Service using a lookup in the JNDI namespace. To connect to a naming service, the ConnectionFactory uses an InitialContext object created by using the default constructor.

When the JMS client is running within an appserver environment, the InitialContext object is able to successfully connect to the naming service, the Channel Framework Service is located and the call to createConnection completes successfully.

However, when the JMS client is executing within the Java EE client container, the InitialContext object uses the value of the java.naming.provider.url system property, to determine the location of the naming service to connect to. If no value is specified for this property, it attempts to connect to a naming service located at port 2809 on the local client machine. If there is no server running on the client machine, there is no naming service listening on this port on the local machine. This causes the createConnection method to fail.

Solution

A JMS client application can specify the value of the java.naming.provider.url programmatically, by using code of the form:

    String key = "java.naming.provider.url";
    String value = "iiop: //some.remote.machine:9810";
    System.setProperty(key, value);

This code should be run prior to invoking the createConnection method on the ConnectionFactory object. Alternatively, if you use the launchClient script from the command line to start the Java EE client container, we can specify either of the following command line parameters:

  • launchClient <CLIENT EAR> -CCBootstrapHost=some.remote.machine -CCBootstrapPort=981
  • launchClient <CLIENT EAR> -CCproviderURL=iiop: //some.remote.machine:9810

This ensures that if no provider URL is specified programmatically, then any InitialContext objects default to using the provider URL specified on the command line.