Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

JOnAS Integration

The Bull Research R& Development D team in charge of JOnAS development is pleased to announce the Service Mix integration in the lastest JOnAS stable release (jonas4.6.6-tomcat5.5.12.tgz). This version is the latest J2EE 1.4 certfied release.

The Service Mix version needed for this integration must be one up to servicemix-3.0-M1.

Thanks to Guillaume Nodet for its contribution for example of the overnigth fix on the standard jms processor !

Installation

It is now possible after some configuration In order to deploy the ServiceMix web application into the JOnAS server. This web application is using JORAM as jms provider : the one released with JOnAS, follow the next configuration steps.

First of all, download the latest ServiceMix version (servicemix-3.0-M1) or SNAPSHOT released after the 2006-04-07. Then you can extract it in a directory of your choice to be able to update configuration files.

...

  • configure JORAM jms provider instead of activeMQ in the web app WEB-INF/applicationContext.xml
    Code Block
    <bean id="jmsFactory"
    	class="org.objectweb.joram.client.jms.local.LocalConnectionFactory">
    </bean>
    
  • remove references to activeMQ in the web app WEB-INF/
    Code Block
    <context-param>
    	<param-name>contextConfigLocation</param-name>
    	<param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>
    
    instead of
    Code Block
    <context-param>
    	<param-name>contextConfigLocation</param-name>
    	<param-value>/WEB-INF/applicationContext.xml WEB-INF/activeMQ.xml</param-value>
    </context-param>
    
    * remove
  •  remove references to activeMQ in the web app WEB-INF/applicationCOntextapplicationContext.xml

You can take the following code these files :
 

applicationContext.xml

Code Block
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xbean.org/schemas/spring/1.0"
	xmlns:sm="http://servicemix.apache.org/config/1.0"
	xmlns:my="http://servicemix.apache.org/demo/"
	xmlns:foo="http://servicemix.apache.org/demo/">

	<!-- the JBI container -->
	<sm:container id="jbi" rootDir="<at:var at:name="rootDir" />"
		useMBeanServer="true" createMBeanServer="true"
		installationDirPath="<at:var at:name="installationDirPath" />"
		deploymentDirPath="<at:var at:name="deploymentDirPath" />"
		monitorInstallationDirectory="true" dumpStats="true"
		statsInterval="10" transactionManager="#transactionManager">

	</sm:container>

	<bean id="transactionManager"
		class="org.jencks.factory.TransactionManagerFactoryBean" />


	<bean id="jmsFactory"
		class="org.objectweb.joram.client.jms.local.LocalConnectionFactory">
	</bean>

</beans>

web.xml

Code Block
 <<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

  <display-name>ServiceMix Web Application</display-name>
  <description>Deploys ServiceMix inside a Web Application</description>

  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext.xml</param-value>
  </context-param>
  <context-param>
    <param-name>contextClass</param-name>
    <param-value>org.apache.xbean.spring.context.XmlWebApplicationContext</param-value>
  </context-param>

  <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>

  <!-- servlet mappings -->

  <!-- the main JMX servlet -->
  <servlet>
    <servlet-name>JMXServlet</servlet-name>
    <servlet-class>org.apache.servicemix.web.jmx.JMXServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>


  <servlet-mapping>
    <servlet-name>JMXServlet</servlet-name>
    <url-pattern>/jmx/*</url-pattern>
  </servlet-mapping>

</web-app>

Warning : ServiceMix is delivering the web application with a set of jar files which is not sufficient enough to use all components. You can add any required jar into the WEB-INF/lib directory of the web application.
You can find a lots lot of used jars in ServiceMix standalone lib directory.

...

The client sends a SOAP message with an attachment over http to servicemix-http
which post it to the NMR. Then the message is forwarded to the drools component. If the SOAP body of the sent message contains the keyword 'keep', then the message is posted to the NMR without any modification. Else, the attachment is remove from the message. Then the message is routed to the servicemix-jms component which transforms it into a JMS Message sent to the ServiceMixOnJOnASExample1Queue queue. The client (which was waiting on this queue) received the message.

Here is a schema of the flow :
Image Added
 
You can download an archive containing all the example ; ServiceMixOnJOnASExample1

Limitations

ServiceMix clustering is using ActiveMQ classes so this functionnality is not supported in JOnAS which is using JORAM.

...