Inprise VisiMessage Service FAQ

General Questions:
JM001-What is the Java Message Service?
JM002-What is the essential difference between Publisher-Subscriber and Queue paradigms?
JM003-Which messaging paradigms does VisiMessage support?

Broad Architecture:
JM100-What is the basic communication protocol used?
JM101-What are the advantages of building our system on top of CORBA?
JM102-Is there a persistence layer in the architecture of VisiMessage? How does it work?
JM103-What is a domain?
JM104-Why is there a need to setup a domain? What are the advantages?
JM105-Can two different servers in the same domain support the topics with the same name?
JM106-Can a domain support both queue and topic?
JM107-What is cluster ? How do you setup a cluster?
JM108-How does a cluster work in a domain?
JM109-Can a cluster span across more than one domain?
JM110-Is there any way to load balance among the servers in a cluster?
JM111-How does VisiMessage achieve scalability? Can I add Servers to a Domain incrementally when the load on the system grows?
JM112-Is there any failover support in JMS? How does it work?
JM113-Do we support any form of server-to-server communication?

Server Side Implementation:
JM200-Can I have more than one server on the same machine?
JM201-What database does VisiMessage use for storing persistent messages?
JM202-Is there a limit to the number of messages that can be stored by the Server?
JM203-Does JMS Server guarentee message delivery? What happens when the machine crashes?
JM204-How many topics/queues can a VisiMessage host?
JM205-How many requests can a VisiMessage Server handle in a second?
JM206-How many connections can a VisiMessage Server support?
JM207-What is the minimum system requirements for VisiMessage server?

Installing the VisiMessage Service
JM301-Does the JMS service come with the supported backing store(JDBC) adapter or do I have to install them separately?
JM302-Is there a default adapter for the JMS Service?
JM303-For the JDBC adapter, are the supported JDBC drivers, part of the install package?
JM304-How do we get and install the JDBC driver for JDataStore?
JM305-How do we get and install the JDBC driver for Sybase?
JM306-How do we get and install the JDBC driver for Oracle?
JM307-How do we get and install the JDBC driver for MSSQL?
JM308-Do I need any JNDI package in order to run VisiMessage?
JM309-How do we get and install the JNDI packages?

SetUp & Configuration Questions :
JM400-What services need to be running in the background when I start the JMS Service?
JM401-What is the simplest way to activate the VisiMessage Service?
JM402-Can I start the VisiMessage Service without a name?
JM403-How to start the JMS Service with some other supported backing store?
JM404-How to tell if the JMS Service is up and running and can accept requests?
JM405-How to bring down the VisiMessage Service?
JM406-If I bring down the VisiMessage Service and bring it up again, what is the impact?
JM407-Can I start a second JMS Service for the same backing store when persistent storage is used?
JM408-What can I configure for the VisiMessage Service?
JM409-Where can I keep the configuration settings so that the VisiMessage Service can access them?
JM410-What does the configuration file look like?
JM411-What do the settings in the configuration file for the VisiMessage Service mean exactly and what are the defaults?
JM412-How do I configure the JMS Service to use the JDBC adapter with JDataStore?
JM413-How do I configure the JMS Service to use the JDBC adapter with Sybase?
JM414-How do I configure the JMS Service to use the JDBC adapter with Oracle?
JM415-How do I configure the VisiMessage Service to use the JDBC adapter with MS SQL?
JM416-How do I configure the JMS Service to participate in a domain?
JM417-How do I configure a cluster so that there is failover support among the Servers in that cluster?
JM418-Can I change any of the configuration settings while the JMS Service is running ?
JM419-How do I configure the JMS Service to use the JDBC adapter with remote Data Store?
JM420-What are the facilities provided for creating JMS administered objects such as Topic Connection Factory and Queue Connection Factory?
JM421-How do I manage the JMS server? Is there a way to destroy a topic and probe the general status of a JMS Server?
JM422-Is there a way to control user?s access to the VisiMessage Server? Can I create user profiles?
JM423-What are the third party products VisiMessage is dependent on?
JM424-What are the tunable properties in the client side?
JM425-How does a client override the default property values?
JM426-How does a client look up a topic or a client?

Usage Questions :
JM500-What is an InitialContext object?
JM501-How does a client differeniate between different VisiMessage Servers?
JM502-What is a Connection Factory for? Is there a need to create multiple Connection factories?
JM503-Does a client application need to create more than one connection object?
JM504-What is the difference between Durable and non-Durable subscribers?
JM505-What is a transactions in the context of JMS?
JM506-What is a temporary Topic/Queue? How is it used?
JM507-Is it advisable to have two subscribers to the same topic in a session?
JM508-Can we have subscribers to the same topic in different sessions?
JM509-Does it make sense to have multiple queue receivers in different sessions on the same queue?
JM510-What is the default timeout value for a message published?
JM511-What is the default delivery mode for a message published?
JM512-When does the publisher return from publish() method call?
JM513-How do you create a server session pool?
JM514-How many messages can a client buffer up before acknowledging a message when in client acknowledgement mode?
JM515-What is the effect of acknowledging the same message twice in client acknowledgement mode?
JM516-A Runtime exception is thrown during the execution of a listener. How does the client handle it?
JM517-What is the default client id of the topic connection?
JM518-What is the default client id of the queue connection?
JM519-What happened to the server session pool when a connection consumer is closed?
JM520-How many types of server session pool are there?
JM521-What is the exact difference between persistent and non-persistent delivery modes?
JM522-What is the difference between AUTO_ACKNOWLEDGE and DUPS_OK_ACKNOWLEGE modes?
JM523-What is the impact if we assign a high priority to a particular message that is published?
JM524-Why the same object can be both a Topic and a Queue connection factory? How does it work?
JM525-What happens to the JMS server when a client suddenly crashes? Is the state of a client recoverable?
JM526-Can I perform a recover operation during a transaction?
JM527-How do I shutdown a JMS client gracefully? What are the actions I need to perform?
JM528- What happened when a connection is closed? Does the connection send out all the pending messages before exiting?
JM529-Can I use a closed subscriber?
JM530-What is the effect of closing a subscriber more than once?
JM531-Is a session object thread-safe?
JM532-After I create a message, why do I get a ReadonlyException when I set message body ?
JM533-When I use Sybase as the backing store, why the VisiMessage Server hangs after a while ?
JM534-How do I create a Queue/Topic or lookup a Queue/Topic in VisiMessage ?
 

General Questions:

JM001-What is the Java Message Service? (sun)

The Java Message Service is an API for accessing enterprise messaging systems. It makes it EASY to write business applications that asynchronously send and receive critical business data and events. The Java Message Service defines a common enterprise messaging API that is designed to be easily and efficiently supported by a wide range of enterprise messaging products. The Java Message Service supports both message queue and publish-subscribe styles of messaging.
 

JM002-What is the essential difference between Publisher-Subscriber and Point-to-Point  paradigms?

In publisher-subscriber paradigm, multiple subscribers created on a topic can receive all the messages published to that topic from any publishers. In queue paradigm, you can have multiple senders sending messages to the queue. All these messages will stay in the queue until they are requested by one of the receivers. In this case, even if there are multiple receivers created on a particular queue, the messages in the queue will go out one at a time to only one of those receivers that are ready to receive it.
 

JM003-Which messaging paradigms does VisiMessage support?

VisiMessage is a complete JMS implementation. It supports both publisher-subscriber and queue paradigms. Both these paradigms enjoy practically the same set of features. It is a tightly integrated system, that attempts to offer a robust and powerful system leveraging off a strong foundation common to both these paradigms.
 
 

Broad Architecture:

JM100-What is the basic communication protocol used?

VisiMessage is built on top CORBA, therefore IIOP is the basic communication protocol. IIOP is a standard-based protocol that is based on TCP/IP. It provides a strong foundation for extending our system, and providing bridges with other third-party products or services that are conforming to the CORBA standard.
 

JM101-What are the advantages of building our system on top of CORBA?

CORBA is a platform-independent industrial standard for developing distributed application. We are developing our system on top of one of the most robust, scalable and proven CORBA implementations, Visibroker 4.0. It is fully compliant with CORBA 2.3 .And we exploit the POA functionality and Visibroker's own unique enhancements to implement features to activate Corba server objects on demand and removing idle objects and various other things to keep the system lean and mean.

JM102-Is there a persistence layer in the architecture of VisiMessage? How does it work?

Yes, there is a persistence layer, which allow VisiMessage to store messages and any related information persistently. Persistence layer is designed in a adapter approach, which allows various types of persistence store to be plugged in. Currently, VisiMessage supports JdataStore3.1 and above, Oracle 7.3.2 and above, Sybase 11.9 and above, and MSSQL 7 and above,  via JDBC.
 

JM103-What is a domain?

It is a logical grouping of related Topics or Queues.
 

JM104-Why is there a need to setup a domain? What are the advantages?

It allow us to group related Topics or Queues.  It also allow us to use the same Topic or Queue name over different domains
 

JM105-Can two different servers in the same domain support the topics with the same name?

Yes, if and only if they belong to the same cluster.
 

JM106-Can a domain support both queue and topic?

Yes, it can.
 

JM107-What is cluster ? How do you setup a cluster?

A cluster is group of VisiMessage servers which support the exact same set of Topics and Queues. This means that every server is accessing the same backing store and resources. See the cluster example that comes with VisiMessage to see how a cluster can be set up.
 

JM108-How does a cluster work in a domain?

See the cluster example that comes with VisiMessage which discusses this.
 

JM109-Can a cluster span across more than one domain?

In this version, we do not allow a server to span more than one domain. Therefore, a cluster cannot span across more than one domain either. But in future the framework may be enhanced to allow this.
 

JM110-Is there any way to load balance among the servers in a cluster?

Load balancing is automatic in a cluster using the round robin scheme. It only happens during binding. The client will continue to talk to the same server after binding occurs. In clustered mode, you need to turn on the dispatcher scheduler. This can be done by setting the property visimessage.Dispatch.Interval to a value greater than 0. We recommend that the value be set to 10 seconds, when a server is in clustered mode.

JM111-How does VisiMessage achieve scalability? Can I add Servers to a Domain incrementally when the load on the system grows?

Scalability, is addressed through two ways, cluster and federation support.  You can add servers to a cluster. This allows you to support greater load for a set of topics/queues managed by a server. You can add servers when in the federated mode, to support a greater number of topics/queues. These topics and queues can be added incrementally.
 

JM112-Is there any failover support in JMS? How does it work?

At this time, we do not support failover. But there is a limited form of failover, in that there is failover for clients which are publishing/sending messages. If they are sending messages to a queue/topic in a server in the cluster, and the server goes down, then the client will automatically failover to the same queue/topic on another server in the cluster.

JM113-Do we support any form of server-to-server communication?

Not anything that as a user, you need to be aware of.
 
 

Server Side Implementation:

JM200-Can I have more than one server on the same machine?

Yes, you can start up any number of servers on the same machine, as long as there are sufficient resources on the machine to support that many servers.

JM201-What database does VisiMessage use for storing persistent messages?

VisiMessage supports 4 databases at this time for storing persistent messages. Infact, for the current version, we persist all messages. The 4 databases are JDataStore 3.1, Sybase, Oracle and MS SqlServer. More databases will be supported in the future.

JM202-Is there a limit to the number of messages that can be stored by the Server?

The limit depends on the limits of the database and the system. We do not set any limits for the number of messages or the size of the messages that can be stored.

JM203-Does JMS Server guarentee message delivery? What happens when the machine crashes?

Yes, all messages in VisiMessage are logged in a persistent database and delivered when there is a subscriber or receiver that can receive the message. Machine crashes do not affect the offline database. Once written into the database, the durable subscription information is safe and secure; when the machine comes up again, the server can again start receiving messages and deliver them to connected subscribers (and store them for unconnected durable subscribers).

JM204-How many topics/queues can a VisiMessage Server host?

Again this is constrained by the resources available on the machine. We have tried to host 20 topics and 20 queues on a VisiMessage server running on NT (350MHz & 256 Mb memory).

JM205-How many requests can a VisiMessage Server handle in a second?

This will depend on the resources of the machine on which it runs and the size of the messages etc. For an NT machine with 256Mb memory and running at 350 MHz, we were able to handle at a rate of about 10 (short, 0.5 K) messages  per second (ie sender and receiver running together). If the sender first queues the messages and then a receiver connects to pick the messages up, the rate goes up to about 15 messages per second.
 

JM206-How many connections can a VisiMessage Server support?

We do not set any limits on the number of connections a VisiMessage Server can support. We have tried a server with 100 connections subscribing/receiving messages from it.

JM207-What is the minimum system requirements for VisiMessage server?

The minimum system requirements are similar to that of VBJ and AppServer. Please look these up at our website.
 
 

Installing the VisiMessage Service

JM301-Does the JMS service come with the supported backing store(JDBC) adapter or do I have to install them separately?

For the current version of the VisiMessage, the only supported backing store adapter is JDBC and it comes with the jar file for the JMS Service. In future other adapters are added, we may require the adapters to be installed separately.

JM302-Is there a default adapter for the JMS Service?

The default configuration of the VisiMessage specifies the JDBC adapter as the backing store.

JM303-For the JDBC adapter, are the supported JDBC drivers, part of the install package?

No, the JDBC drivers are not included with VisiMessage. You will need to get your JDBC drivers from your database vendor. To get up and running you can use JDataStore, which comes with IAS. We are assuming that you already have IAS, if you have access to VisiMessage. However, you can still use VisiMessage in the standalone mode, in which case you will need JDataStore installed somewhere.

JM304-How do we get and install the JDBC driver for JDataStore?

JDataStore is a Pure Java ORDBMS and includes JDBC Type 4 Local and Remote Drivers. A copy of JDataStore and a development license for JDataStore is provided with  IAS. Please note that when you create a JDataStore database, you need to set/associate a transaction manager (TxManager) with it. We provide an utility to create and clean a JDataStore database, which comes with the examples.

JM305-How do we get and install the JDBC driver for Sybase?

You will need to get your Sybase jConnect driver from www.sybase.com. (For our testing, we used Sybase jConnect 4.1/5.0. One important thing to note is that you need to run a script at the Sybase Database Server, to setup stored procedures which are required by the JDBC Driver when the DatabaseMetaData class is used. This class is used by the VisiMessage startup and if the Database Server is not set up properly, you will face problems. The script is found in jConnect\sp and is called sql_server.sql .

JM306-How do we get and install the JDBC driver for Oracle?

We are using the type 4 JDBC driver from Oracle. You can download this driver from the Oracle website at technet.oracle.com or get it from the Oracle installation CD. Follow the instructions that come with the JDBC driver. It is fairly straight forward. We assume that the Oracle Host Server is 7.3.2 and above.

JM307-How do we get and install the JDBC driver for MSSQL?

The JDBC driver which has been certified for  VisiMessage for MSSQL comes from WebLogic. You can download jdbcKona/MSSQLServer4 Kit 3.1.11 from www.weblogic.com/download.

JM308-Do I need any JNDI package in order to run VisiMessage?

Yes. VisiMessage supports the standard lookup using  JNDI, so you need to include the following JAR files in your ClassPath to run VisiMessage: jndi.jar, providerutil.jar and cosnaming.jar.

JM309-How do we get and install the JNDI packages?

You can download the JNDI packages fromhttp://www.javasoft.com/products/jndi/index.html#download. Our VisiMessage Server is certified against JNDI 1.2 . To use the JNDI packages, the CLASSPATH has to be modified to include the rquired jars.
 

SetUp & Configuration Questions :

JM400-What services need to be running in the background when I start the JMS Service?

VisiMessage is built on top of VisiBroker 4.0. It needs a Naming Service running (preferably a seperate one for a domain/federation, but not necessarily), before any of the VisiMessage servers which use this Naming Service is started up. You need the OSagent running before starting up the Naming Service.
 

JM401-What is the simplest way to activate the VisiMessage Service?

The simplest way to activate the VisiMessage is to startup the it with the following command:

jmserv

This will activate a VisiMessage Server with a default name called "VisiMessage" and assumes that a Naming Service is running with the  naming server name NameService. It will use the default values for all the required attributes of the VisiMessage Server. By default, the VisiMessage Service will use the JDBC adapter, which is the only adapter at this time.
 

JM402-Can I start the VisiMessage Service without a name?

Yes. The default VisiMessage Server name is "VisiMessage".

JM403-How to start the JMS Service with some other supported backing store?

The first thing to do is to make sure that the backing store is installed and ready for use. Then you would need to configure the VisiMessage Server using a local property file to point to the backing store. After all these are done, issue the following command:

jmserv -config <pathName to local property file> <VisiMessage Server Name>

The above command will use the default Naming Service name (NameService). If you want to start jmserv to use a specific Naming Service you can start it as follows:

jmserv -ns <Naming Service Name> -config <pathName to local property file> <VisiMessage Server Name>

JM404-How to tell if the JMS Service is up and running and can accept requests?

There are a couple of ways to tell that the VisiMessage Service is up and running. Firstly, after issuing the command to startup the VisiMessage Service, you should see some output "VisiMessage is ready". For the clients that wish to use the VisiMessage Service, you first need to determine whether there is an instance of VisiMessage Server running in the network. You can use the "osfind" utility to find out whether any VisiMessage Servers are registered with the Osagent. The default behaviour of the VisiMessage Server is to register itself with the Osagent upon startup.

JM405-How to bring down the VisiMessage Service?

You would need to bind to the VisiMessage Server Factory first. After obtaining a reference to the VisiMessage Service, you can then bring it down gracefully by issuing a call to shutdown(). You can also shut down the VisiMessage Server using the jmadmin program that comes with VisiMessage. You can do by issuing either

jmadmin -ns <Naming Service Name> -shutdown <VisiMessage Server Name> <Domain Name>

or

vbj com.inprise.visimessage.tools.VisiMessageAdmin -ns <Naming Service Name> -shutdown <VisiMessage Server Name> <Domain Name>
 

JM406-If I bring down the VisiMessage Service and bring it up again, what is the impact?

Since the underlying adapter supports persistence, there is little impact since the state of the VisiMessage Service can be reverted to its original form when it comes back up again. The only impact is the temporary loss of VisiMessage Service during the down time.

JM407-Can I start a second JMS Service for the same backing store when persistent storage is used?

You can start multiple VisiMessage Services against the same backing store. But do not use the Caching facility provided. Caching should be disabled when starting up servers in a cluster.

JM408-What can I configure for the VisiMessage Service?

At this time, you can configure the following for the VisiMessage Service:
There is only one supported backing store adapter type, which is JDBC. To use the JDBC adapter, you have to set the type of JDBC driver (depending on the Database you wish to support), the location of the database, the login name and password and the size of the connection pool for the database. The trace flag, which if turned on (set to 1) will display trace statements. There are other settings for caching, thread pool size etc. These are discussed in detail below.

JM409-Where can I keep the configuration settings so that the VisiMessage Service can access them?

The configuration settings are kept in a property file. The file can be specified at the command line when starting up the VisiMessage Service.

JM410-What does the configuration file look like?

The contents of a sample configuration (property file) is shown below:

#General VisiMessage Settings

visimessage.FactoryName=MQueueFactory
visimessage.MQueuesContext=MQueues
visimessage.ClientsContext=Clients
visimessage.timeout=1800
visimessage.Topics=defTopic1,defTopic2
visimessage.Queues=defQueue1,defQueue2
visimessage.traceOn=0

#ThreadPool Settings
visimessage.ThreadPool.Size=5

#Cache Settings
visimessage.queueCacheSize=200
visimessage.noOfTopicBlocks=10
visimessage.topicBlockSize=20

#Scheduled Tasks Settings
visimessage.Cleanup.Interval=1800
visimessage.Dispatch.Interval=0

#Backing Store Settings
visimessage.backingStoreType=JDBC
visimessage.poolSize=5
visimessage.jdbcDriver=com.borland.datastore.jdbc.DataStoreDriver
visimessage.url=jdbc:borland:dslocal:H:/jms_new/DB/rootDB.jds
visimessage.loginName=VisiMessage
visimessage.loginPwd=VisiMessage
visimessage.adminPwd=VisiMessage
visimessage.jdsSvrPort=2508
 

JM411-What do the settings in the configuration file for the VisiMessage Service mean exactly and what are the defaults?

The settings and their values are described below:

Backing Store Settings

- visimessage.backingStoreType
This property defines the type of backing store we wish to have for the VisiMessage Service. At this time, it can only be JDBC.

- visimessage.poolSize
This defines the number of r/w and readonly database connections in our connection pool when using the JDBCAdapter as our backing store. The default value is 5, but it can be increased to whatever value the database can handle. If we expect that a lot of requests will be made to the VisiMessage Service,this value should be increased.

- visimessage.jdbcDriver
This is the JDBC driver that is needed to access the database used as your backing store. The VisiMessage service will load the appropriate JDBC driver according to the setting. The default is the Java DataStore JDBC driver.

-.visimessage.url
This specifies the location of the database which you want to access. The setting is dependent on the database in use. The default is the JDataStore and the database location is the current directory and is called rootDB.jds.

-visimessage.loginName
This stores the login name associated with the database. The default value is VisiMessage.

-visimessage.loginPwd
This stores the login password associated with the database. The default value is VisiMessage.

-visimessage.jdsSvrPort
This is the port setting needed when we us JDataStore as a backing store in the server mode. The default value is 2508.

Thread Pool Settings

-visimessage.ThreadPool.Size
This sets the number of threads we want to have on the VisiMessage Server . The threads are used to perform the various tasks for the different Queues and Topics on the server. The default value is 5.
 

Cache Settings

-visimessage.queueCacheSize
This sets the size of the cache for each Queue for Point To Point, created on the server. If you have a lot of memory you should consider setting this to a higher value as it will lead to marked improvement in performance. Setting the value of this to 0 will mean that there will be no caching for Point To Point. When using the clusters feature, the caching feature should be turned of, ie this value should be set to 0. Default value is 200.

-visimessage.noOfTopicBlocks
For Pub-Sub, we use a paging scheme. We keep a set of blocks for each Topic, each up to a fixed size. This variable specifies the number of blocks we want to have. Setting this value to 0 means no caching for Pub-Sub. Default value is 10.

-visimessage.topicBlockSize
This specifies the maximum size of each Topic block. Default value is 20. For safety set this to 0 when u turn caching off.
 

General Settings

-visimessage.traceOn
This value is set to 1, if you want to print out the trace statements. It is set to 0, if you do not want the trace statements. The default value is 0.

-visimessage.timeout
This specifies the timeout value(in seconds)  for a Queue or a Topic. After this time, if there is no request to a Queue or Topic, it is made inactive (to save resources)  and reactivated when a new request arrives. The default value 1800 seconds (30 minutes).

-visimessage.Topics
This specifies a default set of topics maintained by the server for which this property is set.

-visimessage.Queues
This specifies a default set of queues maintained by the server for which this property is set.
 

Scheduled Tasks Settings

-visimessage.Cleanup.Interval
Every Queue or Topic on the VisiMessage Server has an evictor to cleanup completed/expired messages and other redundant information. This value is used to define the interval at which this task will be kicked off. The default setting is 1800 seconds (30 minutes).

-visimessage.Dispatch.Interval
When a VisiMessage server is running as part of a cluster, we need to have a dispatch task in every queue/topic, kick off at reasonable intervals, so that messages delivered to a particular server in the cluster can be dispatched by other servers in the cluster, to those subscribers/receivers that they are servicing. In a non-clustered mode (which should be the case in most cases), this value should be set to 0, which will disable this feature (it is not needed in the non-clustered  case). For a server in a cluster, this value can be set to 10 seconds.
 

Avoid Setting the Properties Below

-visimessage.FactoryName=MQueueFactory
-visimessage.MQueuesContext=MQueues
-visimessage.ClientsContext=Clients
 

JM412-How do I configure the JMS Service to use the JDBC adapter with LOCAL JDataStore?

The following settings in the configuration file should be modifed as follows:

visimessage.backingStoreType=JDBC
visimessage.jdbcDriver=com.borland.datastore.jdbc.DataStoreDriver
visimessage.url=jdbc:borland:dslocal:<database name>
visimessage.loginName=<user name>
visimessage.loginPwd=<password>
 

JM413-How do I configure the JMS Service to use the JDBC adapter with Sybase?

The following settings in the configuration file should be modifed as follows:

jmessage.backingStoreType=JDBC
visimessage.jdbcDriver= com.sybase.jdbc.SybDriver
visimessage.url= jdbc:sybase:Tds:<hostname>:<port>/<databaseName>
visimessage.loginName=<user name>
visimessage.loginPwd=<password>

JM414-How do I configure the JMS Service to use the JDBC adapter with Oracle?

The following settings in the configuration file should be modifed as follows:

visimessage.backingStoreType=JDBC
visimessage.jdbcDriver= oracle.jdbc.driver.OracleDriver
visimessage.url= jdbc:oracle:thin:@<hostname>:<port>:<databaseSID>
visimessage.loginName=<user name>
visimessage.loginPwd=<password>
 

JM415-How do I configure the VisiMessage Service to use the JDBC adapter with MS SQL?

The following settings in the configuration file should be modifed as follows (we assume you use jdbc driver from weblogic):

.visimessage.backingStoreType=JDBC
visimessage.jdbcDriver=weblogic.jdbc.mssqlserver4.Driver
visimessage.url=jdbc:weblogic:mssqlserver4:db_name@host_name:port_number
visimessage.loginName=<user name>
visimessage.loginPwd=<password>
 

JM416-How do I configure the JMS Service to participate in a domain?

Set the following property: visimessage.domain, to whatever domain you want the JMS Server to participate in.
 

JM417-How do I configure a cluster so that there is failover support among the Servers in that cluster?

In VBJ4, failover support is the default behaviour in a cluster. The VisiMessage Server sits on top of VisiBroker, so it benefits from this. So to start up a set of servers in the same cluster, make all of them use the same backing store and give them the same server name.

JM418-Can I change any of the configuration settings while the JMS Service is running?

For the current version of the VisiMessage Service, we do not allow settings to be changed while the VisiMessage Service is running. To change a setting, you have to bring down the service, make the change to the configuration file and then restart the VisiMessage service. This may be changed in the next release.

JM419-How do I configure the JMS Service to use the JDBC adapter with remote Data Store?

In order to use remote JDataStore, you need a few jar files in the CLASSPATH. They are:
dsserver3.1.jar, dsremote3.1.jar.

To access a remote JDataStore database, you need to specify the following parameters in the property file:

visimessage.backingStoreType=JDBC
visimessage.jdbcDriver=com.borland.datastore.jdbc.DataStoreDriver
visimessage.url=jdbc:borland:dsremote://hostname/<fullpath_of_database>
visimessage.loginName=<JDataStore_LoginName>
visimessage.loginPwd=<JDataStore_LoginPassword>
visimessage.jdsSvrPort=<JDataStore_ JDBC_Server_Port>

The hostname is where the JDataStore JDBC server is running and the port is the one on which JDataStore JDBC server listens. The default value for this is 2508. Before starting VisiMessage Server, start the JDataStore Server:

java com.borland.dbtools.dsserver.Server

Note that if you want more than one VisiMessage Server to access the same JDataStore backing store via the JDBC Adapter, then this is the way to do it. Using the JDataStore Server allows several servers to connect to the JDataStore database at the same time. If you connect directly to the JDataStore database, another VisiMessage Server that is trying to access it, will fail. For other databases, there is no such issue.
 

JM420-What are the facilities provided for creating JMS administered objects such as Topic Connection Factory and Queue Connection Factory?

The creation of these factory objects is simple and requires no work on the part of the user. Our ConnectionFactory is the main factory object supported by the JMS server. There is only one such factory object in the server. When JMS server starts up, the ConnectionFactory object automatically binds itself to the JNDI namespace. A JMS client can then access it through JNDI. All these are done transparently through the use of J2EE resource file.
 

JM421-How do I manage the JMS server? Is there a way to destroy a topic and probe the general status of a JMS Server?

We provide a command line tool for administrative purposes. It is called jmadmin. This facility allows you to create topics and queues, find out the general status of the Server in terms of the number of messages that are buffered up for delivery, the number of expired messages waiting to be cleared and the number of clients currently connected to the server. To see usage, you can do the following:

jmadmin -ns <Naming Service Name> -help

or

vbj com.inprise.visimessage.tools.VisiMessageAdmin -ns <Naming Service Name> -help

The option to see Queue/Topic statistics is -list <queue/topic name> or -listAll. The option to delete a Queue/Topic is -delete <queue/topic name>. The option to force the evictor to be called for a Queue/Topic, to cleanup redundant messages and other info, is -compact <queue/topic name>. The option to shutdown a server is -shutdown <server name>.

JM422-Is there a way to control user's access to the VisiMessage Server? Can I create user profiles?

Currently our VisiMessage has no support for user profiles. Thus, the name and password parameters needed for the creation of connections are not being used. This feature and other security-related features will be addressed in the future.

JM423-What are the third party products VisiMessage is dependent on?

VisiMessage is dependent on VBJ4.0. It is also dependent on JNDI for doing its lookups. It is also dependent on the JDBC Drivers for its backing stores.

JM424-What are the tunable properties in the client side?

The following properties are tunable on the client side:

visimessage.client.traceOn=0

The defaults for these properties are shown above. By default, client logging is turned off. Client logging facility is provided to provide a detailed trace of what is happening in the client code when it is running. It is very helpful in hunting down bugs. When a user encounters a problem, he should turn the logging on to reproduce the bug and send it to us for diagnosing the source of the problem.
 

JM425-How does a client override the default property values?

The client can specify a property file as well. Or it can override the properties via the commandline, eg
                vbj -D<overridden property> -DSVCnameroot=<NamingServiceRoot>
                       <ClientProgramName>

JM426-How does a client look up a topic or a client?

It goes through JNDI.

Usage Questions :
 

JM500-What is an InitialContext object?

An InitialContext object is a bound handle to a directory server which is used for looking up administered resources. In JMS context a Connection Factory and a Destination (Topic/Queue) are the only two admistered objects.

JM501-How does a client differeniate between different VisiMessage Servers?

In VisiMessage, a client is interacting with a domain. A domain is made up of VisiMessages Servers. The client can be talking to any of VisiMessage Server in the domain.  The client needs to specify explicitly the domain of the VisiMessages Servers he is interested in when looking up a JMS administered object.

JM502-What is a Connection Factory for? Is there a need to create multiple Connection factories?

The connection factory is to create connections towards the VisiMessage Server. You don?t need multiple connection factories because one connection factory can serve the purpose of creating multiple connections.

JM503-Does a client application need to create more than one connection object?

No. For normal case, a client application only needs one connection object. But, a client application can create more than one connection in some circumstances, e.g if a subscriber is created with NoLocal set to true, and using two connections in one client application allows the subscriber still be able to receive message sent within the same client application.

JM504-What is the difference between Durable and non-Durable subscribers?

The main difference between durable and non-durable subscriber is that durable subscriber gets every message sent to the topic once it subscribes to the topic, but non-durable subscriber only gets message sent to the topic during its life time. Once a durable subscriber subscribes to a topic, even the client application exits and then starts up again later, the subscriber is still able to get all those messages sent to the topic when it is offline. But if a non-durable subscriber client application exits and then starts up again, the non-durable subscriber does not get messages sent when it is offline. It only carries on receiving from the point where it starts up again.

JM505-What is a transactions in the context of JMS?

Transaction allows us to group a set of operations as a single atomic operation for consistency. All the operations in a transaction either commit successful together or fail as a whole. In JMS, a transaction is defined at the session level. A Publisher transaction is used to group of set of published messages into one single transaction. JMS Server guarantees that either all the messages in this transaction are published or none of them are published from the client to the server. A Subscriber transaction serves to group a set of consumed messages and acknowledges a set of consumed messages. This ensures that if the messages are marked Persistent and are redelivered, either all of them will be redelivered or none of them will be redelivered.

JM506-What is a temporary Topic/Queue? How is it used?

A temporary topic is a topic, which is created on-the-fly by an application and is destroyed as soon as the creating connection is closed. It is typically used for creating temporary inboxes for receiving directed replies. Name of each temporary topic is guaranteed to be unique.

JM507-Is it advisable to have two subscribers to the same topic in a session?

No. If there are two subscribers on the same topic in a session, only one of them will get the messages sent to the topic.

JM508-Can we have subscribers to the same topic in different sessions?

Yes. If there is a message being sent to the topic, all the subscribers, which subscribes to the same topic in different sessions get the message.

JM509-Does it make sense to have multiple queue receivers in different sessions on the same queue?

You can have multiple queue receivers on the same queue in different sessions, but when there is a message being sent to the queue, only one of the queue receivers (no guarantee which one) gets the message. So unless you coordinate very well among queue receivers, or it doesn?t make much sense to have multiple queue receivers in different sessions on the same queue.

JM510-What is the default timeout value for a message published?

The default timeout value for both Publisher and QueueSender is one hour.

JM511-What is the default delivery mode for a message published?

The default delivery mode is PERSISTENT.

JM512-When does the publisher return from publish() method call?

Once the message being sent by the publisher has been received by the Message Server and being put into the queue in order for delivery towards subscribers, the publisher returns from publish() method call.

JM513-How do you create a server session pool?

We provide a factory for generating server session pool. This factory has two static methods which are used to generate server session pools for both queue and topic. This is proprietary to VisiMessage since the JMS spec leaves the creation of server session pool to the JMS provider. The factory name is called ServerSessionPoolFactory. Clients that need to create server session pool has to import this class from the directory at com.inprise.visimessage.client.

JM514-How many messages can a client buffer up before acknowledging a message when in client acknowledgement mode?

In client acknowledgement mode, the acknowledgements for all unacknowledged messages have to be buffered up in the client before the user decides to issue an acknowledgement call on the message. At that point, all the acknowledgements will be sent out in the right order to the server. In our implementation, a limit of 15 unacknowledged messages is imposed on the buffer to prevent the client from being overrun with unacknowledged messages.

JM515-What is the effect of acknowledging the same message twice in client acknowledgement mode?

All the subsequent acknowledgments after the first one are ignored.

JM516-A Runtime exception is thrown during the execution of a listener. How does the client handle it?

It depends on which mode the session is in. If the session is in AUTO_ACKNOWLEDGE mode, the message will be redelivered three times to the clients. If the session is in CLIENT_ACKNOWLEDGE mode, the message won?t be redelivered

JM517-What is the default client id of the topic connection?

The default client id for topic connection is "default_user". This particular attribute serves no useful purpose except in the case Durable Subscriber. Thus, it is important to assign the desired client id on the topic connection before proceeding to create a durable subscriber. User is only able to pick up the correct messages from the topic for a durable subscriber if he specifies the subscriber name and the client id correctly.

JM518-What is the default client id of the queue connection?

The default client id for queue connection is "default_user".

JM519-What happened to the server session pool when a connection consumer is closed?

A connection consumer is tightly coupled with a server session pool. Without a connection consumer, the server session pool is practically useless. And vice versa. Once, a server session pool is associated with connection consumer, there is no way to break the link. Furthermore, you cannot share a server session pool among connection consumers. For these various reasons, the server session pool is destroyed once the connection consumer is closed.

JM520-How many types of server session pool are there?

A server session pool is collection of server sessions that are wrappers around sessions. In JMS, there are two types of sessions. These are topic session as well as queue session. Thus, we provide a Factory class to create two types of server session pools. One is designed specifically to take care messages published to a topic. The another one is meant for handling messages in a queue. These two types are mutually exclusive and should never be used together.

JM521-What is the exact difference between persistent and non-persistent delivery modes?

With persistent delivery mode set, all messages are logged persistently. So if VisiMessage server crashes, messages won?t be lost. In contrary, with non-persistent delivery mode, messages are only store in the memory, if VisiMessage server crashes, messages are lost.

JM522-What is the difference between AUTO_ACKNOWLEDGE and DUPS_OK_ACKNOWLEGE modes?

By JMS 1.0.1 specification, DUPS_OK_ACKNOWLEDGE is lazy acknowledgment mechanism, which may results in duplicated messages. AUTO_ACKNOWLEDGE is active acknowledgement mechanism, which acknowledges back once the consumer gets the message. VisiMessage implements DUPS_OK_ACKNOWLEDGE as same as AUTO_ACKNO|WLEDGE for the current version.

JM523-What is the impact if we assign a high priority to a particular message that is published?

By JMS 1.0.1 specification, message with high priority should be delivered first. But for current version of VisiMessage, message priority is not implemented.

JM524-Why the same object can be both a Topic and a Queue connection factory? How does it work?

Our Factory object is a composite object that can be used as a Topic or a Queue connection factory. This helps to simplify the work needed to access a factory object from JNDI. However, the user must make a firm decision after accessing the factory object as to what he wants to use the object for. He should then cast the object retrieved from JNDI into either a Topic or Queue connection factory. Once an operation is invoked on the factory object specific to its type, it cannot be used to perform an operation specific to the other type. This is because once the factory object is used, some resources specific to its type are allocated.

JM525-What happens to the JMS server when a client suddenly crashes? Is the state of a client recoverable?

No state information about client is kept in the VisiMessage server, and therefore the client is not recoverable.

JM526-Can I perform a recover operation during a transaction?

No. It is because if a recover operation is performed during a transaction, it only recovers the consumed messages, but does nothing is done towards published messages. Since a transaction is an atomic operation, it is not right only to recover part of the transaction. Thus VisiMessage doesn?t allow recover operation to be performed during a transaction.

JM527-How do I shutdown a JMS client gracefully? What are the actions I need to perform?

In order to shutdown a client gracefully,  all the relevant JMS objects have to be closed first to ensure that the all the resources used are released back to the system. These objects include publishers, subscribers, sessions and connections. The order the entities are closed is important. The principle is simple. Basically, a JMS object should be closed only after closing those entities that it has created. That would mean that you have to close publishers before its sessions, and sessions before its connection.

JM528- What happened when a connection is closed? Does the connection send out all the pending messages before exiting?

Yes. The connection flushes all the pending messages and acknowledgment to the VisiMessage server before exiting.

JM529-Can I use a closed subscriber?

No. Any operation invoked on a closed subscriber throws an exception.

JM530-What is the effect of closing a subscriber more than once?

If a subscriber is closed more than once, an exception is thrown for subsequent close after the first close.

JM531-Is a session object thread-safe?

No. This is in accordance to the JMS specification. So applications have to take precautions not to invoke methods on a session object concurrently. The state of the session object can be corrupted if accessed concurrently and thereby adversely affecting the client.

JM532-After I create a message, why do I get a ReadonlyException when I set message body ?

After the message is created, its status is readonly, Do a clearBody() before setting message body.

JM533-When I use Sybase as the backing store, why the VisiMessage Server hangs after a while ?

It is most probably because the log of the Sybase database is full. You need to dump the log.

JM534-How do I create a Queue/Topic or lookup a Queue/Topic in VisiMessage ?

The best way to see how this is done is to look at the examples. In VisiMessage, we have the concept of a domain. To lookup a Queue/Topic via JNDI, you can do it as ctx.lookup(<domain_name>/MQueues/<queue_or_topic_name>). To create a queue, you can simply do it as session.createQueue(<queue_or_topic_name>). You don't need to specify the domain name, as the queue or topic will automatically be created in the domain to which the connection factory for the session belongs.