23.11 Queues
This section explains the creation of Queue objects:
- Creating the Admin Service
MQ admin service creates queues on the FioranoMQ server. The instance of admin service can be obtained from the admin connection.
acf = (MQAdminConnectionFactory) ic.lookup ("primaryACF");
ac = acf.createMQAdminConnection ("admin", "passwd");
adminService = ac.getMQAdminService();
2. Queue Metadata
Create a queue metadata, specifying the name, description and the storage type. The storage type of the destination can be RDBMS_BASED_DATABASE or FILE_BASED_DATABASE
QueueMetaData metadata = new QueueMetaData ();
metadata.setName ("myqueue");
// For RDBMS based storage type
metadata.setStorageType(IFioranoConstants.RDBMS_BASED_DATABASE);
or
// For File based storage type
metadata.setStorageType(IFioranoConstants.FILE_BASED_DATABASE);
3. Create the Queue
Create the Queue object using the adminService and the queue metadata.
adminService.createQueue (metadata);