Before you can use the message service to send and receive messages, you must configure the service and install the message service parts. Once you configure the message service, it is available to every server that you create.
EAServer includes an ASA database, which is used to store the message service configuration information. To use an Oracle database instead:
Change to the EAServer Repository/Component/CtsComponents directory.
Copy MessageServiceConfig.props.oracle to MessageServiceConfig.props.
Follow the instructions in “Using the Configure Message Service wizard.”
Using the Configure Message Service wizard
You can enable the message service and configure the connection cache properties using the Configure Message Service wizard.
In EAServer Manager, highlight the Message Service folder, and select File | Configure Message Service.
Or, if you double-click the Message Service folder, a message box asks if you want to configure the message service. To start the wizard, select Yes.
Select the server for which you want to configure the message service, and choose Next.
The wizard adds “CtsComponents/MessageService” to the com.sybase.jaguar.server.services property in the /Repository/Server/<server_name>.props file. Once you have configured the message service, you can enable it for another server either by adding this value to the server’s .props file, or by using the wizard.
Enter a connection cache name or select one from the list, and click Next.
By default, the message service uses the preconfigured JavaCache. If you change the message service cache, set it to the name of a JDBC connection cache that allows cache-by-name access.
If you configure the message service to use JavaCache, start the jagdemo database using either start_sampledb (UNIX) or jagdemo.bat (Windows); both are located in the EAServer bin subdirectory.
Do not use sun.jdbc.odbc.JdbcOdbcDriver as the database driver for your message service connection cache. This driver does not work correctly when accessing binary column data.
If you are using a Sybase ASA or Adaptive Server Enterprise database, set these values:
Database Driver – com.sybase.jdbc2.jdbc.SybDriver
Server Name – jdbc:sybase:Tds:host:2638
Optionally, edit the connection cache properties, and test the connection using ping. You must have a working connection to use the message service.
Select Finish. A message box asks if you want to restart the server. To enable the message service, select Yes.
Configuring message service cluster, database, and debugging options
If your server is in a cluster, each server in the cluster must share the same database for the message service data and metadata. For information about synchronizing a cluster, see Chapter 6, “Clusters and Synchronization.”
Use a text editor to make these changes to the MessageServiceConfig.props file, located in the EAServer Repository/Component/CtsComponents directory:
To enable message service debugging at server start-up, change the value of cms.debug from false to true.
If your database server does not accept the default syntax, change the SQL commands in the XX.YYYYYY statements. If the database does not have an image type, change image to unbounded (large) binary. If the database driver cannot handle character set conversions, change the datatype of the varchar columns in the SQL schemas to varbinary.
To limit the number of persistent messages in the <system> queue and other queues that do not have a maximum size configured, modify or add the default.maximum property, for example:
default.maximum=100
The default is 100. This setting restricts in-memory caching of persistent messages; you can change it to tune the memory used to hold persistent messages in the <system> queue and user-defined queues where the maximum property is 0 or a negative value.
This setting also determines how many persistent messages EAServer reads into memory during message service initialization. A large default size can delay server start-up when there is a large backlog of unprocessed messages, since the message service reads this many messages into memory when initializing.
The setting does not restrict the number of transient messages in the <system> queue or in user-defined queues where the maximum property is 0 or a negative value.
Restart EAServer. The message service starts automatically when you start the server.
Copyright © 2005. Sybase Inc. All rights reserved. |