Below are the steps to create and register a custom MBean Service for the FioranoMQ Server:
1. Create Service: (See Sample 1.)
- Create an MBean Java Class and extend the fiorano.jms.jmx.ComponentMBean.
- Override life cycle methods including createService(), startService() and stopService() which are invoked by the Fiorano Server during server initialization.
- Write the code specific to the service in these methods. (Look at the sample 1.)
- Compile using compile-client.bat.
- Write an .xml file of the same name describing the MBean's attributes and save it in the same directory as the MBean class file. Create a jar file. (See Sample 4.)Update the fmq.conf with the location of this jar file (under the java.classpath heading).
- To install FioranoMQ as a Windows NT Service, update %FIORANO_HOME%/WinService/conf/fmq.conf with the location of this jar file.
2. Configure Service: (See Sample 2.)
- Create a directory in the %FIORANO_INSTALL_DIR%\fmq\profiles\FioranoMQ\deploy\services.
- For example- Create a directory PubSubTest in the location. Create a service descriptor file with the MBean Class name, the name and type of service and copy this file into the above directory.
- If this service is dependent on other services, use the dependent element in the Service Descriptor:
4. If the service on which this is dependent is not known, configure this service to start after all other Server services have started. as stated in step 3
3. Deploy Service: (See Sample 3.)
- If the required dependencies have been specified in the service descriptor file then this file can be appended to any the FioranoMQ.lst file. (Note: The sorting order is defined by the dependency specified not by the location of the dependency in the file.)
- If required dependencies have not been specified start the service after all other Server services are started. Create a separate list file and add service entries to this file. Add this file to the end of the list file entries in the deploy.xml file.
4. Start the FioranoMQ server