![]() | Novell exteNd Messaging Platform JMS 5.2Frequently Asked Questions |
This FAQ is divided into 4 sections:
Installation - answers common installation questions.
Getting Started - answers to common questions encountered when starting to use the Novell exteNd Messaging Platform's JMS.
Advanced Messaging - answers more advanced messaging questions, including how to use the JMS cluster.
Java Message Service - answers general JMS questions.
Below is a list of frequently asked questions for each of these sections.
![]() | How can I use a different jvm? |
![]() | What gets installed on my system? |
![]() | What tools are available in the product? |
![]() | Database
creation failed during install because I did't have the JDBC driver
on my CLASSPATH (or because of some other problem).
What can I do? |
![]() | I unintentionally installed the ORB as a Java 2 extension during install. How do I get rid of it? |
![]() | When I run jmqserv the following message appears: 'DB not created or unavailable...' |
![]() | When I run jmqserv the following message appears: 'detected ORB version 3.1; the JMS server requires ORB version 5.1 or higher ...' |
![]() | When I run jmqserv the message 'java.sql.SQLException' followed by some error message is printed. |
![]() | When I run jmqserv or dbinit this message is printed: 'Missing XX in properties file' and XX is either 'driver name', 'password' 'username', 'jdbcURL', 'min pool size' or 'max pool size'. |
![]() | When I run jmqserv, jmqrun or dbinit this message is printed: 'Exception in thread "main" java.lang.NoClassDefFoundError: com/sssw/jbroker/util/Messages' |
![]() | When I run jmqserv, jmqrun or dbinit this message is printed: 'Exception in thread "main" java.lang.NoClassDefFoundError: com/sssw/jbroker/api/security/SecurityException' |
![]() | What does the jmqrun program do? |
![]() | What is
"iioploc" in the ORBDefaultInitRef command
line argument? |
![]() | When I run a JMS client program I get the following error message: Exception in thread "main" org.omg.CORBA.BAD_PARAM: unable to resolve initial reference: NameService minor code: 0 completed: No |
![]() | Can I use jmqrun to run clients that are not on the same host as the JMS server? |
![]() | How do I run the JMS server with more memory? |
![]() | How do clients exchange messages with the JMS server? |
![]() | How do I run a client from a different host? |
![]() | When I run a client I get the following exception: javax.jms.JMSException: maximum connection count of developer version exceeded. |
![]() | How do I stop the JMS server? |
![]() | When I start jmqserv I get the following error message: 'Socket bind exception: Address already in use.' |
![]() | Can I run multiple JMS servers on the same machine? |
![]() | Can multiple JMS servers share the same database? |
![]() | The number of threads in my JMS client application keeps growing. What could be going on? |
![]() | I have a multi homed host. How do I bind the JMS server to a specific adapter? |
![]() | Why don't I get connect time fail-over when I run my client applications? |
![]() | Can you summarize what the JMS cluster does? |
![]() | How does clustering affect Pub/Sub messaging? |
![]() | How does clustering affect P2P messaging? |
![]() | Why does it sometimes take longer to send messages using a cluster. |
![]() | My producer application does not fail-over when I shutdown one of the brokers in the cluster. Why? |
![]() | How does clustering affect message ordering? |
![]() | Are there any limitation to producer fault-tolerance? |
![]() | What guarantees does JMS make about message ordering? |
![]() | Can I send an XML document using JMS? |
![]() | Can I acknowledge a specific message? |
![]() | Can I browse messages on a topic? |
![]() | How does a selector work? |
![]() | Can I use JMS to simulate a synchronous request (like invoking using RMI)? |
![]() | Are there any other FAQ's on JMS available? |
Question: How can I use a different jvm? Answer: First make sure that both the Novell exteNd Messaging Platform's JMS and the database you're using work with the that particular JVM. The jmqserv command simply uses the java program found in your |
Question: What gets installed on my system? Answer: The Novell exteNd Messaging Platform installation always
installs the binaries, libraries, documentation and sample programs
in the directory you specified during installation. Since JMS relies
on the ORB it will also install this unless it was already
installed. By default the ORB is installed as a Java extension. If
you do not have write permission in the Java home directory, the
installer will install the ORB in the top-level
|
Question: What tools are available in the product? Answer: The Novell exteNd Messaging Platform's JMS comes with several tools for managing the server. Please refer to the administrator's guide and the tools man pages for more details. |
Question: Database creation failed during install because I did't
have the JDBC driver on my
Answer: You can just create the JMS database tables after installation. Simply edit the |
Question: I unintentionally installed the ORB as a Java 2 extension during install. How do I get rid of it? Answer: Locate the |
Question: When I run jmqserv the following message appears: 'DB not created or unavailable...' Answer: You probably haven't created the JMS database. Try to run 'dbinit -create' |
Question: When I run jmqserv the following message appears: 'detected ORB version 3.1; the JMS server requires ORB version 5.1 or higher ...' Answer: Your environment points to a previous version of the ORB, which is not supported by this version of JMS. This often happens if the ORB is installed as a Java 2 extension on the Java virtual machine you are using. You need to remove or upgrade the extension, or update your environment to point to a newer version of the ORB. Please refer here for information about JVM settings. |
Question: When I run jmqserv the message 'java.sql.SQLException' followed by some error message is printed. Answer: One of the JDBC properties in the
|
Question: When I run jmqserv or dbinit this message is printed: 'Missing XX in properties file' and XX is either 'driver name', 'password' 'username', 'jdbcURL', 'min pool size' or 'max pool size'. Answer: This happens if the msgsvc.properties file doesn't have
that entry. Please refer to the sample
|
Question: When I run jmqserv, jmqrun or dbinit this message is printed: 'Exception in thread "main" java.lang.NoClassDefFoundError: com/sssw/jbroker/util/Messages' Answer: This happens if the ORB can not be found. Please ensure that the ORB is installed as the default ORB for the JDK or JRE you are using. Alternatively, refer to the question on how to use a different JVM. |
Question: When I run jmqserv, jmqrun or dbinit this message is printed: 'Exception in thread "main" java.lang.NoClassDefFoundError: com/sssw/jbroker/api/security/SecurityException' Answer: This happens if the ORB can not be found. Please ensure that ORB is installed as the default ORB for the JDK or JRE you are using. Alternatively, refer to the question on how to use a different JVM. |
Question: What does the jmqrun program do? Answer: This program invokes a JVM with the appropriate parameters for JMS clients on the command line. This includes setting the correct |
Question: What is "iioploc" in the
Answer: The argument given to
|
Question: When I run a JMS client program I get the following error message: Exception in thread "main" org.omg.CORBA.BAD_PARAM: unable to resolve initial reference: NameService minor code: 0 completed: No Answer: This typically happens if the JMS server is not running.
If you're using the
|
Question: Can I use jmqrun to run clients that are not on the same host as the JMS server? Answer: Yes, you can modify the default parameters of the jmqrun program using the -J flag:jmqrun -J-DORBDefaultInitRef=iioploc://<hostname>:<port> <class name> [parameters] |
Question: When running a JMS client program I get the following exception: javax.naming.ConfigurationException: COS Name Service not registered with ORB under the name 'NameService' [Root exception is org.omg.CORBA.ORBPackage.InvalidName: unable to resolve initial reference: NameService] Answer: The JMS server is probably not running. This error occurs because the JMS server has a naming service running in-process and client applications expect to find the naming service there. If the JMS server is definitely running, this can also happen if you didn't put the '-DORBDefaultInitRef=iioploc://host:port' on the command line. If the JMS server is running on the local host on port 53506, you should specify '-DORBDefaultInitRef=iioploc://localhost:53506' on the command line. |
Question: Running a JMS client program gives the following exception: 'Exception in thread "main" javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial' Answer: You need to specify the '-Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory' on the command line of your client program. This instructs JNDI to use a CORBA naming service to locate JMS administrated objects. |
Question: How do I run the JMS server with more memory? Answer: You can pass flags to the JVM using the -J command line flag. To set the maximum heap size to 250 MB you can start the JMS server like this:jmqserv -J-Xmx250m |
Question: How do clients exchange messages with the JMS server? Answer: The JMS server is running on top of the ORB and therefore uses IIOP. IIOP in turn uses the TCP/IP protocol stack to send messages. IIOP is a standards-based protocol with many advantages, including scalability, robustness, and interoperability. |
Question: How do I run a client from a different host? Answer: In order to run clients, you need the JMS libraries on
the client. The easiest thing to do it typically to install JMS on
the client machine. Then replace the 'localhost' part of the
|
Question: When I run a client I get the following exception: javax.jms.JMSException: maximum connection count of developer version exceeded. Answer: You are trying to create more connections than are allowed by the developer version. In order to create more connections, you need to purchase a JMS license. |
Question: How do I stop the JMS server? Answer: Simply invoke 'jmqserv -stop' from a different window. |
Question: When I start jmqserv I get the following error message: 'Socket bind exception: Address already in use.' Answer: This means that another JMS server is already running on that port. You must first stop the currently running broker or start the new broker on a different port. |
Question: Can I run multiple JMS servers on the same machine? Answer: Yes, but you must be careful that the servers do not conflict when accessing the database. The msgsvc.properties file has an entry called 'msgsvc.name' which identifies a particular JMS server. Multiple server must have different names to avoid database conflicts. For each different message server name, you must run 'dbinit -create' to create the tables for the JMS server with said name. You also need to ensure that each server is running on a different port. The easiest way to handle this is to maintain two separate property files and then start the two brokers like this:jmqserv -props b1.properties jmqserv -props b2.properties |
Question: Can multiple JMS servers share the same database? Answer: Yes, but they can not share the same tables. For each server you can create different tables in the same database by giving the server a different name. Refer to this entry for more information. |
Question: The number of threads in my JMS client application keeps growing. What could be going on? Answer: The most likely cause from the JMS client library's
point of view is creation of InitialContext
objects. Because of the way the JNDI/CosNaming driver is structured,
a new ORB is created every single time you instantiate an
|
Question: I have a multi homed host. How do I bind the JMS server to a specific adapter? Answer: Since JMS is a CORBA server based on the ORB, you can use the ORB runtime property |
Question: Why don't I get connect time fail-over when I run my client applications? Answer: This is probably because you didn't specify the |
Question: Can you summarize what the JMS cluster does? Answer: Here are the key features: |
Question: How does clustering affect Pub/Sub messaging? Answer: Topics are automatically available on all brokers in a JMS cluster. Topic messages are forwarded between brokers which means the publishers can publish messages to any broker and subscribers can receive messages from any broker. |
Question: How does clustering affect P2P messaging? Answer: Queues are bound to a broker to ensure that only one receiver can get each queue messages. Client applications can connect to a specific queue by using the "queue@broker" JNDI lookup string. Queue receivers can use a proxy to receive messages from a broker where the queue is not located. |
Question: Why does it sometimes take longer to send messages using a cluster. Answer: This can happens right after you start the servers in the cluster. The brokers in a cluster ping each other at regular intervals and until the clustered brokers have been inter-connected, messages will not flow. |
Question: My producer application does not fail-over when I shutdown one of the brokers in the cluster. Why? Answer: Probably because the connection you use also has consumers. Fail-over is only supported for producer applications. If any session created by the connection has a consumer (or the connection has a connection consumer), fail-over will not occur. |
Question: How does clustering affect message ordering? Answer: Ordering can be affected because of message delays due to latency and broker downtime. If you have two subscribers for the same topic, but connected to two different brokers, they may receive messages in different order if multiple publishers are sending messages to both brokers. |
Question: Are there any limitation to producer fault-tolerance? Answer: Besides the requirement that the connection can not have any consumers, it is also not possible to fail-over a distributed transaction. This restriction exists because you can't prepare the transaction on one broker and commit it on another broker. Finally, you can't fail-over on a temporary destination since these are not replicated on the cluster. |
Question: What guarantees does JMS make about message ordering? Answer: According to the JMS specification, messages with higher priority should be expedited. This means that if you send two messages where the latter message has higher priority, JMS may delivery the last message first. Within priority, the JMS specification requires that messages are ordered within the scope of a session. If one or more message producers use the same session to send messages, consumers will receive those messages in the order they were received by the session on the producer side. In summary, FIFO order is enforced within a session. Messages from multiple suppliers running in different sessions or processes will be ordered subject to when they were received by the JMS server. |
Question: Can I send an XML document using JMS? Answer: Yes, just insert the XML document into a TextMessage using the |
Question: Can I acknowledge a specific message? Answer: Yes, but you have to use JMS proprietary API's. The JMQSession defines an |
Question: Can I browse messages on a topic? Answer: Since a topic does not retain messages for future
subscribers, it is not possible to have a regular topic browser. You
can of course create a topic subscriber, which will then see all
messages on the topic since the time of connection. Also, you can
create a durable subscriber and every time this durable subscriber
connects it can browse all message since last time it was connected.
If you want such a browser to be able to browse the topic messages
more than once, you should use
|
Question: How does a selector work? Answer: In Pub/Sub a selector is like a filter: if a message doesn't match a subscribers selector, that message will not exist as far as that subscriber is concerned. It will be as if the message was received by the topic before the subscriber connected. In P2P a selector merely limits which message a particular receiver can see, i.e. it is a view applied by the receiver. A receiver can get messages, which did not match another receivers selector. |
Question: Can I use JMS to simulate a synchronous request (like invoking using RMI)? Answer: Yes, you can use a TopicRequestor or a QueueRequestor. A requestor is a concrete class in the javax.jms package, which sends a JMS message on a regular destination with the ReplyTo field set to a newly created temporary destination. Application developers are responsible for implementing the consumer, which must send a message back to the ReplyTo destination. Once the requestor receives a reply on the temporary topic, the reply is handed back to the user of the requestor. |
Question: Are there any other FAQ's on JMS available? Answer: Yes, you can try one of these: You can also visit the Novell Developer Site for articles and discussion about JMS. |
Copyright © 2003, 2004 Novell, Inc. All rights reserved. Copyright © 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.