The suggested architecture requires two JOnAS server instances. You can do this as follows:
Create two base directories. For example JONAS_REGISTRY and JONAS_EJB.
Set the JONAS_BASE environment variable so that it points towards the JONAS_REGISTRY directory.
In the $JONAS_ROOT directory, type: ant create_jonasbase
Set the JONAS_BASE environment variable so that it points towards the JONAS_EJB directory.
In the $JONAS_ROOT directory, type: ant create_jonasbase
The JOnAS servers may now be configured independently.
The "Registry" server is the JOnAS server that hosts the registry service. Its configuration files are in JONAS_REGISTRY/conf.
In the jonas.properties files, declare only the registry and jmx services:
jonas.services registry,jmx |
In the carol.properties file, declare the rmi protocol:
carol.protocols=rmi |
You can also configure its port:
carol.rmi.url=jrmi://localhost:2000 |
The "EJB" server is the JOnAS server that is used as the application server. Its configuration files are in JONAS_EJB/conf. Libraries must be added in JONAS_EJB/lib/ext.
In the jonas.properties files, set the registry service as remote:
jonas.service.registry.mode remote |
In the carol.properties file, declare the rmi protocol and set the correct port:
carol.protocols=rmi carol.rmi.url=jrmi://localhost:2000 |
In lib/ext, the following libraries must be added:
com.ibm.mqjms.jar, including WebSphere MQ JMS classes.
com.ibm.mq.jar, also a WebSphere MQ library.