+

Search Tips | Advanced Search

Sample error conditions creating a JMS object

A number of common error conditions can arise when you create an object.

Here are examples of these error conditions:

Here are examples of error conditions that might arise on Windows when looking up JNDI administered objects from a JMS application.

  1. If you are using the WebSphere JNDI provider, com.ibm.websphere.naming.WsnInitialContextFactory, you must use a forward slash (/) to access administered objects defined in subcontexts; for example, jms/MyQueueName. If we use a backslash (\), an InvalidNameException is thrown.
  2. If you are using the Oracle JNDI provider, com.sun.jndi.fscontext.RefFSContextFactory, you must use a backslash (\) to access administered objects defined in subcontexts; for example, ctx1\\fred. If we use a forward slash (/), a NameNotFoundException is thrown.