Follow the steps below to configure the JMS transport of the ESB profile with the Broker profile.
From the below configurations, do the ones in the axis2.xml file based on the profile you use as follows:
- To enable the JMS transport in the ESB profile, edit the
- To enable the JMS transport in other profiles, edit the
<PROFILE_HOME>refers to the main directory of the profile inside the WSO2 EI distribution. For example, to enable the JMS transport in the Business Process profile, edit the
To enable the JMS transport of the ESB profile to communicate with the Broker profile, edit the
<EI_HOME>/conf/axis2/axis2.xmlfile, find the commented
<transport receiver>block and uncomment it as shown below.
Uncomment the following
<transport sender>block for JMS in the same file:
For more information on the JMS configuration parameters used in the code segments above, see JMS Connection Factory Parameters.
Use carbon as the virtual host.
- Define a queue named
Comment out the topic, since it is not required in this scenario. However, in order to avoid getting the
javax.naming.NameNotFoundException:TopicConnectionFactoryexception during server startup, make a reference to the Broker profile from the
For instructions on configuring the JMS transport in a cluster of the WSO2 EI Broker profile, see Running the Broker instances .
- Ensure that the Broker profile is running, and then open a command prompt (or a shell in Linux) and go to the
- Start the WSO2 EI server by executing the following commands:
sh integrator.sh(on Linux/OS X) or
Now, you have both the Broker and the ESB profile of WSO2 EI configured and running with the JMS transport enabled.
Managing security of the configuration
JMS is an integral part of enterprise integration solutions that are highly-reliable, loosely-coupled and asynchronous. As a result, implementing proper security to your JMS deployments is vital. The below sections discuss some of the best practices of an effective JMS security implementation when used in combination with WSO2 Enterprise Integrator.
Let's see how some of the key concepts of system security such as authentication, authorization and availability are implemented in different types of broker servers as follows.
You can apply the same information mentioned in this section when configuring JMS with Apache QPid.
Given below is an overview of how some common security concepts are implemented in EI-Broker runtime.
|Security Concept||How it is Implemented in EI-Broker|
|Authentication||Andes Authenticator connected entities to authenticate.|
|Authorization||Creation and use of role-based permissions.|
|Availability||Clustering using Apache Zookeeper.|
|Integrity||Message-level encryption using WS-Security.|
Let's see how each concept in the table above is implemented in EI-Broker.
After setting up EI-Broker runtime with the ESB runtime in WO2 EI, open
<EI_HOME>/wso2/broker/conf/advanced/qpid-config.xml file and add the following line as a child element of <tuning>.
Authentication: Plain Text
EI-Broker requires all its incoming connections to be authenticated. The
<EI_HOME>/conf/jndi.properties file contains lines similar to the following. They contain the username and password credentials used to authenticate connections made to the EI-Broker runtime. This is plain text authentication.
In the EI-Broker authentication example below, we send a request to the proxy service testJMSProxy, which adds a message to the example.MyQueue queue.
If you change the authentication credentials of the jndi.properties file, the connection will not be authenticated. You will see an error similar to:
In the previous authentication example, the user names and passwords are stored in plain text inside the WSO2 EI’s jndi.properties file. These credentials can be stored in an encrypted manner for added security.
EI-Broker runtime allows user-based authorization as seen in the example on WSO2 MB Authentication. To set up users, follow the instructions in User Management section of the WSO2 Admin Guide.
EI-Broker provides role-based authorization for topics, where public/subscribe access can be assigned to user groups. For more information on setting up role-based authorization for topics, refer to section Managing Topics and Subscriptions section of the WSO2 MB documentation.