Starting and deleting a messaging engine affects the life
cycle of its data store. Appropriate actions must be carried out on
the data store.
Starting the messaging engine
When starting,
a messaging engine performs checks on the tables that comprise the
data store to determine whether they are suitable. If the tables do
not exist, and the user has selected the Create tables option
when configuring the messaging engine, the messaging engine attempts
to create the tables. Otherwise, your database administrator must
create the tables beforehand, using the DDL statements generated by
the sibDDLGenerator command.
Make sure that
the database that contains the data store is available before starting
the messaging engine, or the server that is hosting the messaging
engine.
If the
database is unavailable, the messaging engine cannot connect to the
data store, and fails to start:- If the messaging engine is hosted by a stand-alone application
server, the messaging engine might enter the stopped state. You must
restart the application server to start the messaging engine.
- If the messaging engine is hosted by a cluster member, the cluster
member is disabled for high availability. The high availability manager
attempts to start the messaging engine on another eligible server.
If the database continues to be unavailable, the messaging engine
fails to start again, that server is disabled for high availability,
and the high availability manager attempts to start the messaging
engine on another eligible server. In this manner, every member of
the cluster can become disabled for high availability. You must manually
re-enable the servers for high availability, either by restarting
the servers, or through the administrative console.
The messaging
engine tries to connect for up to 15 minutes by default, before failing
to start.
Stopping the database
If you want to stop
the database that contains the data store, ensure that the messaging
engine is stopped first. If the messaging engine is running and has
exclusive locks on the data store, stopping the database can cause
the messaging engine to be in an inconsistent state, because the messaging
engine might continue to run and accept work. The same behavior occurs
if the database fails while the messaging engine is running.
You can configure the messaging
engine and its hosting server to shut down and restart when the database
connection is lost, to prevent such inconsistencies. To configure
this behavior, set the sib.msgstore.jdbcFailoverOnConnectionLoss custom
property on the messaging engine.
You can also tune your system
to decrease the probability of the messaging engine failing to start
before the database becomes available.
Removing a messaging engine
Remember: When
you remove a messaging engine, WebSphere Application Server does not delete
the data store tables automatically. If you want to recreate the same
messaging engine, you must first delete the previous set of tables.
But if you create a messaging engine with existing tables, they must
be empty, so that the messaging engine can function correctly. Refer
to the documentation for your chosen relational database management
system (RDBMS) for information about how to delete tables. However,
if you have created a data store with default settings, you do not
need to delete previous tables.