Default messaging provider: Troubleshooting tips
Use this set of specific tips to help you troubleshoot problems for JMS messaging with the default messaging provider.
For general tips about troubleshooting problems with WebSphere® Application Server messaging, see Messaging troubleshooting tips. This topic 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.
- A JMS application can no longer send or receive messages
- JMS client applications running inside the Java Platform, Enterprise Edition (Java EE) client container fail when invoking the ConnectionFactory.createConnection method
A destination becomes full and can no longer receive messages because the existing messages are not being consumed.
- 一或多個透過 Java™ 訊息服務 (JMS) 啟動規格連接的訊息 Bean。
- 透過 JMS Connection Factory 和 JMS 目的地來連接的一或多個 Enterprise Bean。
您可以利用下列管理主控台畫面,來檢驗使用目的地之應用程式和 JMS 資源的配置:這個目的地的應用程式資源。
這個畫面可供您從高階檢視許多相關資源,協助您尋找問題原因。
A JMS application can no longer send or receive messages
- 一或多個透過 Java 訊息服務 (JMS) 啟動規格連接的訊息 Bean。
- 透過 JMS Connection Factory 和 JMS 目的地來連接的一或多個 Enterprise Bean。
您透過應用程式的部署描述子,或透過應用程式本身的程式碼,將應用程式連接至訊息 Bean 或 Enterprise Bean。 如果已透過部署描述子來連接您的應用程式,您可以利用下列管理主控台畫面,將已安裝的商業應用程式當作一個整體來檢視,以及檢驗應用程式所用之 JMS 資源的配置:這個應用程式的傳訊資源。
這個畫面可供您從高階檢視許多相關資源,協助您尋找問題原因。
JMS client applications running inside the Java Platform, Enterprise Edition (Java EE) client container fail when invoking the ConnectionFactory.createConnection method
CWSIJ0005E: An instance of the channel framework service to use for communication
cannot be found.
- 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 application server 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, you 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.