JMS Connector Usage
A JMSConnector is used as a factory for creating JMS connections. For more information regarding connectors and how they are used within the context of alakai, please see the the user guide.
To use a JMSConnector within your code, you retrieve it and cast it to a javax JMS ConnectionFactory as demonstrated below. Note that JMSConnector configuration is provider specific. Please refer to each specific provider for configuration examples.
...
// note that once directory server feature has been implemented, connectors
// will be automatically bound to a name context and can be retrieved via jndi
Container container = SystemContext.getContext().getSystem().getContainer();
Connector connector = container.getConnector("myJMSConnector");
javax.jms.ConnectionFactory connectionFactory = (javax.jms.ConnectionFactory)connector;
javax.jms.Connection connection = connectionFactory.createConnection();
...