Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page walks you through the development of a complete sample application. It includes the following sections:

...

  • ActiveMQ
    • activemq-core-5.x.x.jar (in ActiveMQ version 5.8.0 and above, activemq-core-5.8.0.jar has been split into activemq-broker-5.8.0.jar and activemq-client-5.8.0.jar
    • geronimo-j2ee-management_1.1_spec-1.0.1.jar
    • geronimo-jms_1.1_spec-1.1.1.jar (For latest WSO2 servers this is not required.)
  • MySQL JDBC Driver
    • mysql-connector-java-5.1.13-bin.jar

...

Avoid port conflicts

Edit $DSS_HOME/repository/conf/carbon.xmlto set the offset parameter. Set the value to

  <
  Offset
  >
  6
  </
  Offset
  >

Enable database access

Copy the MySQL driver library (mysql-connector-java-5.1.13-bin.jar) to ($DSS_HOME/repository/components/lib).

...

Avoid port conflicts

Leave the offset parameter of the $AS_HOME/repository/conf/carbon.xmlas it is. That is keep the offset parameter to 0.

  <
  Offset
  >
  0
  </
  Offset
  >

Enable the Application Server to talk over a message queue

Copy the ActiveMQ libraries (activemq-core-5.4.2.jar, geronimo-j2ee-management_1.1_spec-1.0.1.jar and geronimo-jms_1.1_spec-1.1.1.jar) to the App Server ($AS_HOME/repository/components/lib).

Enable the JMS transport on the App Server (this can also be done via the admin console, but this will not be described here)

This only requires un-commenting two sections in the App Server's configuration file. To enable JMS transport, we are going to edit axis2.xml that resides in $AS_HOME/repository/conf/axis2. Look for the two sections that begin with [transportReceiver name="jms"] and [transportSender name="jms"] and uncomment the XML. After un-commenting, your axis2.xml will be as below.

...

   </transportReceiver>

 

AND

  <
  transportSender
   
  name
  =
  "jms"
   
  class
  =
  "org.apache.axis2.transport.jms.JMSSender"
  />

Anchor
ConfigureESB
ConfigureESB

...

Avoid port conflicts

Edit $ESB_HOME/repository/conf/carbon.xmlto set the offset parameter. Set the value to

  <
  Offset
  >
  1
  </
  Offset
  >

Enable the ESB to talk over a message queue

Copy the ActiveMQ libraries (activemq-core-5.4.2.jar, geronimo-j2ee-management_1.1_spec-1.0.1.jar and geronimo-jms_1.1_spec-1.1.1.jar) to the ESB ($ESB_HOME/repository/components/lib).

Enable the JMS transport on the ESB

Follow the same step that we did for App Server in the previous step.

...

Avoid port conflicts

Edit $BPS_HOME/repository/conf/carbon.xmlto set the offset parameter. Set the value to

  <
  Offset
  >
  2
  </
  Offset
  >

Creating Mock Objects to represent Legacy Systems

...

Now we want to enable, JMS transport since this service will communicate via JMS transport. To enable this, we need to add following block to services.xml under /src/main/resources/META-INF.

  <
  transports
  >
    <
  transport
  >jms</
  transport
  >
</
  transports
  >

Now your services.xml will look like below.

...