tag:blogger.com,1999:blog-62328133863366157232024-03-14T09:35:26.918+01:00Charles Moulliard (@cmoulliard)Integration with Apache Camel, ServiceMix and ActiveMQ
<br>Sr. RedHat Architectcmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.comBlogger40125tag:blogger.com,1999:blog-6232813386336615723.post-64460290930050192542012-06-28T17:13:00.001+02:002012-06-28T17:36:31.928+02:00Cloud Integration with Fabric Camel (Part I)Since the launch of <a href="http://fusesource.com/products/fuse-esb-enterprise/" target="_blank">Fuse ESB 7</a>, <a href="http://fusesource.com/products/fuse-mq-enterprise/" target="_blank">Fuse MB 7</a> and in fact the official release of <a href="http://fuse.fusesource.org/fabric/download.html" target="_blank">Fuse Fabric</a>, Camel has moved in a new era called "Cloud Integration where machines, services are distributed everywhere.<br />
<a href="http://www.fusesource.com/" target="_blank">FuseSource</a> (which is now part of <a href="http://www.redhat.com/" target="_blank">RedHat</a> company) is the leader of "Integration Everywhere" has supported the development of the Fabric project to facilitate the creation of such integration project in the "cloud".<br />
<br />
With Fabric, the information of the Camel endpoints are registered in a global registry which can be accessed by the different machines part of the cloud. This mechanism which is presented here<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dx79PppE2nb9g1HBXXOy-XWAprSC4u75Qqcb6Spt5ikwXwPTm_VQbcPgoyQ7BWXeOw0EtMyGJp3JKWuLd1VzQ' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div>
<br />
You Tube link of the video : <a href="http://www.youtube.com/watch?v=CO1WcTFivT0">http://www.youtube.com/watch?v=CO1WcTFivT0</a><br />
<br />
requires some Fabric agents which are used to communicate with the registry (= Fabric ensemble). This ensemble is in fact a Zookeeper server which will contain configurations, profiles and of course services registered. When a Camel producer wants to publish a camel exchange, it will perform a lookup in the registry to find endpoints using as a key the name associated to a fabric group.<br />
The endpoints available are returned as a list :<br />
<br />
<br />
zk:list -r -d fabric/registry/camel<br />
endpoints/local/00000000000 = jetty:http://0.0.0.0:9090/fabric<br />
endpoints/local/00000000001 = jetty:http://0.0.0.0:9191/fabric<br />
<br />
<br />
As <a href="http://fuse.fusesource.org/fabric/docs/fabric-agent.html" target="_blank">Fabric agents</a> which are deployed in <a href="http://fuse.fusesource.org/fabric/docs/fabric-cloud-containers.html" target="_blank">Fabric containers</a> can be added or removed dynamically according to the needs, this list is continuously refreshed. The endpoint registered could be of type Jetty, CXF, Mina, Netty, JMS as they are able to transport information from a machine to another using HTTP, JMS, TCP/IP ... protocols.<br />
The other advantage of this mechanism is that the Camel producer when communicating with Fabric will use a internal loabalancer if more than one Camel route exposing the service has been deployed in several Fabric containers.<br />
<br />
To deploy a Fabric Camel project, you just need to use some of the <a href="http://fuse.fusesource.org/fabric/docs/commands/commands.html" target="_blank">Fabric commands</a> to create the profiles of the camel routes exposed as service and also used to consume the services. With such profiles, we can create Fabric containers and deploy the camel routes as the following video will show you<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dz-E7XQOeyl1tg8AhhNHKh-VpPYMRuFvW9Gj3omyRdnlK0uTCVTi5An8ISLMImJkj6uXKTb8I7GP7zA49ODGw' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div>
<br />
Youtube Link of the video : <a href="http://www.youtube.com/watch?v=RUg2rgY4BME">http://www.youtube.com/watch?v=RUg2rgY4BME</a><br />
<br />
The code of the demo is available here : <a href="https://github.com/fusesource/fuse/tree/master/fabric/fabric-examples/fabric-camel-cluster-loadbalancing">https://github.com/fusesource/fuse/tree/master/fabric/fabric-examples/fabric-camel-cluster-loadbalancing</a><br />
<br />
Enjoy Cloud Integration Camel Rider !<br />
<br />cmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com0tag:blogger.com,1999:blog-6232813386336615723.post-86483134381683551342012-04-26T15:00:00.001+02:002012-04-26T18:23:05.048+02:00Real Time HTML5 application with Websocket and ActiveMQ/camelAs part of my <a href="http://fusesource.com/apache-camel-conference-2012/" target="_blank">CamelOne</a> presentation, I have prepared some examples to dig into what Apache <a href="http://activemq.apache.org/" target="_blank">ActiveMQ</a> and <a href="http://camel.apache.org/" target="_blank">Camel</a> propose to work with <a href="http://www.html5rocks.com/en/" target="_blank">HTML5</a> and <a href="http://www.websocket.org/" target="_blank">WebSocket </a>technology.<br />
Developing "Real Time Web Applications" has always been painful not matter if the technology used was based on Java Applet, Adobe Flash, Adobe ShockWave, Microsoft Silverlight and the protocol (HTTP, RMI, ...).<br />
<br />
Since HTML5 publication (2009) and the work done by W3C and IETF organisations, we now have a standard <a href="http://datatracker.ietf.org/doc/rfc6455/" target="_blank">rfc-6455 </a>that we can use to exchange in a bi-directional way "messages" between the browser and the Web Server. Only one HTTP(s) request is required to initiate the WebSocket communication and later on the exchange of data frames (text or bytes).<br />
<br />
ActiveMQ (release 5.6) like Camel (release 2.10) proposes a WebSocket Transport Connector or Endpoint using Jetty WebServer WebSocket implementation (v7.5). This allow not only to retrieve data from topics but when combining the EIP patterns of Camel and some components like : sql, jpa, file, rss, atom, twitter, ... we can "aggregate", "enrich" or "filter" content receive from feed providers before to publish them for feed consumers.<br />
<br />
ActiveMQ uses Stomp as a wired format to send WebSockets messages between the WebSocket server running within the ActiveMQ broker and the Web browser. In this context, we must use one of the two javascript librairies available (<a href="http://www.jmesnil.net/stomp-websocket/doc/">stomp.js</a>, <a href="https://github.com/krukow/stomple">stomple</a>) to develop the project
<br />
<br />
<pre class="brush:jscript" name="stompo-js-script"> $(document).ready(function() {
var client, destinationQuotes;
$('#connect_form').submit(function() {
var url = $("#connect_url").val();
client = Stomp.client(url);
// the client is notified when it is connected to the server.
var onconnect = function(frame) {
var stockTable = document.getElementById("stockTable");
var stockRowIndexes = {};
client.subscribe(destinationQuotes, function(message) {
var quote = JSON.parse(message.body);
$('.' + "stock-" + quote.symbol).replaceWith("" +
"" + quote.symbol + "" +
"" + quote.open.toFixed(2) + "" +
"" + quote.last.toFixed(2) + "" +
"" + quote.change.toFixed(2) + "" +
"" + quote.high.toFixed(2) + "" +
"" + quote.low.toFixed(2) + "" +
"");
...
client.connect(login, passcode, onconnect);
</pre>
<br />
and of course the WebSocket protocol must be enable.<br />
<br />
<pre class="brush:xml" name="websocket-transport"> <transportconnectors>
<transportconnector name="websocket" uri="ws://0.0.0.0:61614">
</transportconnector></transportconnectors>
</pre>
Camel does not need a special format to exchange the data between its WebSocket endpoint and the browser as JSon text will be send through the WebSocket Data Frames to the browser. We must just expose a Camel Route as a WebSocket Server.
<br />
<br />
<pre class="brush:java" name="camel-websocket-route">public class WebSocketStockPricesRoute extends RouteBuilder {
@Override
public void configure() throws Exception {
from("activemq:topic:stockQuoteTopic")
.log(LoggingLevel.DEBUG,">> Stock price received : ${body}")
.to("websocket:stockQuoteTopic?sendToAll=true");
}
}
</pre>
<br />
and use in the browser the WebSocket HTML5 js script.<br />
<br />
<pre class="brush:jscript" name="camel-javascript"> var socket;
$('#connect_form').submit(function () {
var stockTable = document.getElementById("stockTable");
var stockRowIndexes = {};
var host = $("#connect_url").val();
socket = new WebSocket(host);
// Add a connect listener
socket.onopen = function () {
$('#msg').append('<div class="event">
Socket Status: ' + socket.readyState + ' (open)</div>
');
}
socket.onmessage = function (msg) {
// $('#msg').append('<div class="message">
Received: ' + msg.data + "</div>
");
var quote = JSON.parse(msg.data);
....
</pre>
<br />
In both cases, you can combine other javascript librairies (jquery, jquery-ui) to improve the design of the JSon objects to be displayed in the browser.<br />
<br />
Here are some screenshots about the demos<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-lXKG58IX278/T5lGRTrZVRI/AAAAAAAAACA/beDm4HSC48Q/s1600/activemq-stocks.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="http://4.bp.blogspot.com/-lXKG58IX278/T5lGRTrZVRI/AAAAAAAAACA/beDm4HSC48Q/s200/activemq-stocks.png" width="146" /></a></div>
Stock Trader<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-XRRwViL04GE/T5lGS9FwmAI/AAAAAAAAACI/uGuXaaefNAU/s1600/chat-camel.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="118" src="http://1.bp.blogspot.com/-XRRwViL04GE/T5lGS9FwmAI/AAAAAAAAACI/uGuXaaefNAU/s200/chat-camel.png" width="200" /></a></div>
Chat Room<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<a href="http://1.bp.blogspot.com/-ZEbfboXSMW0/T5lGUsQqVPI/AAAAAAAAACQ/xI9XPZvwWmw/s1600/news-camel.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="163" src="http://1.bp.blogspot.com/-ZEbfboXSMW0/T5lGUsQqVPI/AAAAAAAAACQ/xI9XPZvwWmw/s200/news-camel.png" width="200" /></a><br />
Twitter and News Feed<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Code can be retrieved from <a href="https://github.com/FuseByExample/">FuseByExample</a> web site. Look to "<a href="https://github.com/FuseByExample/websocket-activemq-camel" target="_blank">websocket-activemq-camel</a>" git hub project.<br />
<br />
Enjoy WebSocket with Apache Camel and ActiveMQ.Anonymousnoreply@blogger.com4tag:blogger.com,1999:blog-6232813386336615723.post-59096582571362491712012-04-13T14:08:00.003+02:002012-04-13T14:10:25.148+02:003 reasons to use FuseSource Documentation<span style="font-family: Arial, Helvetica, sans-serif;">As an Apache Committer but also FuseSource Consultant and Solution Architect, the documentation and its quality is a critical factor in my day by day work. Until now, even using google search engine, that was difficult to find in one place all the information required and a wasting time.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">This situation has changed and I will give you three reasons to use/adopt </span><a href="http://fusesource.com/documentation/" style="font-family: Arial, Helvetica, sans-serif;" target="_blank">FuseSource documentation</a><span style="font-family: Arial, Helvetica, sans-serif;"> for your Apache Camel, Apache ServiceMix and Apache Karaf projects.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><u>Reason 1 : Fuse maintains history of Apache releases</u></span><br />
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Apache websites uses Atlassian Confluence to maintain content publishes for each Apache project. This tool does not allow to create a history of the different releases of Camel by example (2.6, 2.7, 2.8). This is not the case with FuseSource documentation which allow you to browse a </span><a href="http://fusesource.com/documentation/" style="font-family: Arial, Helvetica, sans-serif;" target="_blank">specific version</a><span style="font-family: Arial, Helvetica, sans-serif;"> like the current. And with the help of google, you can make specific search like that</span></div>
<div>
<span style="background-color: white; color: #383838; font-family: monospace; font-size: 13px; line-height: 18px;"> site:fusesource.com/docs/router/2.8/ "followed by the keywords"</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">or </span></div>
<div>
<span style="background-color: white; color: #383838; font-family: monospace; font-size: 13px; line-height: 18px;"> site:fusesource.com/docs/router </span><span style="background-color: white; color: #383838; font-family: monospace; font-size: 13px; line-height: 18px;">"followed by the keywords"</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><span style="font-family: Arial, Helvetica, sans-serif;"><u>Reason 2 : Javadoc and Schema are well documented</u></span><br />
<div>
<a href="http://fusesource.com/docs/router/2.8/apidoc/index.html" style="font-family: Arial, Helvetica, sans-serif;" target="_blank">Javadoc</a><span style="font-family: Arial, Helvetica, sans-serif;"> like </span><a href="http://fusesource.com/docs/router/2.8/xmlref/index.html" style="font-family: Arial, Helvetica, sans-serif;" target="_blank">XML Schema</a><span style="font-family: Arial, Helvetica, sans-serif;"> are also 2 interesting examples as there is no XML Schema javadoc on Apache websites for by example Spring DSL language. This is completely different on FuseSource web site as you can read the documentation and discover what are the tags or attributes to be used for specific Apache Camel DSL words. Here is an example containing the options proposed for Apache Camel Dataformat.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"> http://fusesource.com/docs/router/2.8/xmlref/http.camel.apache.org.2033734988/element/dataformats.html</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-29VVhpwSk74/T4gUbIhPZWI/AAAAAAAAAB0/sDdhQdBkul8/s1600/Screen+Shot+2012-04-13+at+13.55.00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="http://3.bp.blogspot.com/-29VVhpwSk74/T4gUbIhPZWI/AAAAAAAAAB0/sDdhQdBkul8/s320/Screen+Shot+2012-04-13+at+13.55.00.png" width="320" /></a></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><u>Reason 3 : New chapters have been added</u></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">FuseSource documentation contains missing pieces of information or cover in depth points which are described poorly on Apache websites or in an disparate way. So take the time to read the following chapters when you need more info about Transactions, Security, ...</span><br />
<br />
<ul>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Camel and Transactions : http://fusesource.com/docs/router/2.8/transactions/front.html</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Camel and WebServices : http://fusesource.com/docs/router/2.8/camel_cxf/front.html</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Fuse ESB - Security guide : http://fusesource.com/docs/esb/4.4.1/esb_security/front.html</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Transactions with Fuse ESB : http://fusesource.com/docs/esb/4.4.1/camel_tx/front.html</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">ActiveMQ - Security : http://fusesource.com/docs/esb/4.4.1/amq_security/front.html</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">ActiveMQ - Tuning Guide : http://fusesource.com/docs/esb/4.4.1/amq_tuning/front.html</span></li>
</ul>
<div style="text-align: center;">
<span style="font-family: Arial, Helvetica, sans-serif;">____________________________</span></div>
<br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<ul>
</ul>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
</div>Anonymousnoreply@blogger.com0tag:blogger.com,1999:blog-6232813386336615723.post-27754225207734714652012-04-13T09:26:00.001+02:002012-04-13T14:15:16.782+02:00Apache Camel at CamelOne<span style="font-family: inherit;">FuseSource organises for the second time an event dedicated to the famous Apache Camel EIP Framework - <a href="http://camelone2012.eventbrite.com/" target="_blank">CamelOne</a>, the 15th and 16nd of May. This conference is not only a vitrine dedicated to Apache Camel Integration framework or FuseSource products but related technologies like ESB, SOA, BPM, Cloud, MOM, HTML5, Big Data and <a href="http://fusesource.com/apache-camel-conference-2012/camelone_speakers_2012/#cmouillard" target="_blank">Real Time applications</a> will be presented through a panel of different <a href="http://fusesource.com/apache-camel-conference-2012/camelone_agenda_2012/" target="_blank">CamelOne talks</a> and <a href="http://fusesource.com/apache-camel-conference-2012/camelone_speakers_2012/" target="_blank">speakers</a> (Rob Davies, James Strachan, Claus Ibsen, Hiram Chirino, Tony Shan, Robin Howlett, Dan Kulp, Jon Anstey, Kai Wahner, Charles Moulliard, Jazon Van Zyl, ...).</span><br />
<div>
<br />
<div>
<span style="font-family: inherit;">A special attention was also given this year to present projects deployed and running in Enterprise (Christian Mueller - Atos, Rob Terpilowski - Lynden, <span style="background-color: white;">Matt Pavlovich - Media Driver, </span><span style="background-color: white;">David Reiser, Ram Raju and Shane Kent -- Department of Transportation, </span><span style="background-color: white;">Robin Howlett - Silver Chalice) proving that Apache Camel is not only used by early adopters but is now part of the Enterprise Software Architecture like RDBMS and Web Technologies. </span></span></div>
<div>
<span style="font-family: inherit;"><span style="background-color: white;"><br /></span></span></div>
<div>
<span style="font-family: inherit;"><span style="background-color: white;">If your are not yet registered, I recommend to do it to have the chance to meet some Apache Committers and people working every day with SOA and Integration projects. This is incredible opportunity which is only offered one time a year. Do not forget that the CamelOne conference include also a program to <a href="http://fusesource.com/apache-camel-conference-2012/camelone_training_2012/" target="_blank">train people </a>on Apache Camel, ActiveMQ and Apache ServiceMix.</span></span></div>
<div>
<span style="font-family: inherit;"><span style="background-color: white;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgglRaFzEgEiT-OJUJWkFu2cJD8YpA0dqwMvnB5LcGFeuyd2aV424qYurs9ZT2vNKzyaLECV25ctcUSUuCv2vO9HgAmGGJn7PVvuV0krtM1f8-aFoYmWLBko5if4o2CC-y5xATbwkymDXw/s1600/camelone_sig_v1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="90" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgglRaFzEgEiT-OJUJWkFu2cJD8YpA0dqwMvnB5LcGFeuyd2aV424qYurs9ZT2vNKzyaLECV25ctcUSUuCv2vO9HgAmGGJn7PVvuV0krtM1f8-aFoYmWLBko5if4o2CC-y5xATbwkymDXw/s320/camelone_sig_v1.jpg" width="320" /></a></div>
<div>
<span style="font-family: inherit;"><span style="background-color: white;"><br /></span></span></div>
<div>
<div>
<br /></div>
<div>
</div>
</div>
</div>cmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com1tag:blogger.com,1999:blog-6232813386336615723.post-54627516358161609372011-12-16T15:12:00.000+01:002013-01-15T18:53:42.316+01:00Run a Google Web Toolkit 2 project on Apache Karaf/ServiceMixTo simplify the development of Web projects on Apache Karaf/Apache ServiceMix, we have created <a href="https://github.com/ops4j/org.ops4j.pax.web/tree/master/pax-web-archetypes" target="_blank">archetypes</a> to setup WAR or WAB projects. They are very basic but they can be enriched with framework like Struts 2, Wicket, plain JSP or MyFaces JSF as they are currently supported on Apache Karaf - ServiceMix.<br />
<br />
For the <a href="http://code.google.com/webtoolkit/" target="_blank">GWT users</a>, it exists now an archetype which will create a GWT 2.4 project. To create such a project, you must generate a project from the archetype<br />
<br />
<pre class="text" name="code">mvn archetype:generate \
-DarchetypeGroupId=org.ops4j.pax.web.archetypes\
-DarchetypeArtifactId=wab-gwt-archetype \
-DarchetypeVersion=<span style="background-color: white; color: #202020; font-family: arial, sans-serif; font-size: 13px; line-height: 18px; white-space: normal;">2.1.2</span> \
-DgroupId=com.mycompany \
-DartifactId=hello \
-Dversion=1.0
</pre>
<pre class="text" name="code"></pre>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLDApcJqwxClTmCDiXYvafpvSzLcZYkPVU2t12qLBV7WNooedw3rdveGnSI67FiOYn17GFpfK9BTSwoxiGFpGG0QUh6KjhW7G5-lGkbZjmkSCYHJVmqywmryefR8sgS7UEM7HvYKtDE6M/s1600/archetype-creation.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="279" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLDApcJqwxClTmCDiXYvafpvSzLcZYkPVU2t12qLBV7WNooedw3rdveGnSI67FiOYn17GFpfK9BTSwoxiGFpGG0QUh6KjhW7G5-lGkbZjmkSCYHJVmqywmryefR8sgS7UEM7HvYKtDE6M/s320/archetype-creation.png" width="320" /></a></div>
<pre class="text" name="code"></pre>
<br />
build next the WAB using hello/mvn clean install<br />
<br />
and deploy it on Apache Karaf<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbvXsrxeUEV0WX01DhLhYWUTOQ4SzgOt1L1Qr2yyhrhjt7Uh-tNF9PRWjNoaymtikJjWH-VyV9AUXgUmyRl0knOPNbObBXJJ-XGrc_19R90TnXxoci1xKi661Jf2lh36KRapGZLsroDb0/s1600/karaf-gwt2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="181" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbvXsrxeUEV0WX01DhLhYWUTOQ4SzgOt1L1Qr2yyhrhjt7Uh-tNF9PRWjNoaymtikJjWH-VyV9AUXgUmyRl0knOPNbObBXJJ-XGrc_19R90TnXxoci1xKi661Jf2lh36KRapGZLsroDb0/s320/karaf-gwt2.png" width="320" /></a></div>
<br />
<br />
Verify that the web site is well registered :<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh34Yer5QvXzUkNvrvi0-k9o7ULFAJ6nUqkSuEjaUKTdArH8_GchGkP7_rD717f_z1uK6AuuhEZRI58BC4NyLjXRqgNFBDFGS16WZsugOY7T94QMohfec5T5hDkwQt2A0HfXRaNxJsV9xM/s1600/web-list.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="23" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh34Yer5QvXzUkNvrvi0-k9o7ULFAJ6nUqkSuEjaUKTdArH8_GchGkP7_rD717f_z1uK6AuuhEZRI58BC4NyLjXRqgNFBDFGS16WZsugOY7T94QMohfec5T5hDkwQt2A0HfXRaNxJsV9xM/s320/web-list.png" width="320" /></a></div>
<br />
<br />
Next, you can navigate to your application in your browser and click on the button to say Hello.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDSXbynTvd_CXrTiQ00KN8qVhiaK7LncZQwAjDF6Ts1H6XtRJdY0LRhGrVNyP9NmZMVWp6pHOP794ta3FlRTNKfGDfNLWsOwqiltPaLA0GggJ3bR_f1nBrJXAkkAsYF6MM7yiizhUvdwM/s1600/browser-gwt2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDSXbynTvd_CXrTiQ00KN8qVhiaK7LncZQwAjDF6Ts1H6XtRJdY0LRhGrVNyP9NmZMVWp6pHOP794ta3FlRTNKfGDfNLWsOwqiltPaLA0GggJ3bR_f1nBrJXAkkAsYF6MM7yiizhUvdwM/s320/browser-gwt2.png" width="320" /></a></div>
<br />
<br />
<br />
Remark : A WAB project is nothing more than a WAR excepted it is packaged as a bundle file, that we have removed the WEB-INF/lib dependencies and create a MANIFEST file containing the OSGI instructions.<br />
<br />
<br />cmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com8tag:blogger.com,1999:blog-6232813386336615723.post-84141629901974123172011-11-21T15:53:00.001+01:002011-11-22T18:43:04.579+01:00Apache Camel, Cxf, ActiveMQ & ServiceMix at DevoxxThis year, I get the chance to present 2 talks at the <a href="http://www.devoxx.com/display/DV11/Home">Devoxx</a> event,<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwxuYN3uC8XGNu2mUFC6g2JUE-3Zxzang9YgacX0RjdvQdYSknTN4B2bKR7oGI8jDp_tyzkt3K_9c87zY8l4jIgXds6QvfoAm7Wtiu51c5kt24lv-afbbo-sfTg-rAvRsdl00bEZ_kF5U/s1600/LogoDevoxx150dpi.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="74" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwxuYN3uC8XGNu2mUFC6g2JUE-3Zxzang9YgacX0RjdvQdYSknTN4B2bKR7oGI8jDp_tyzkt3K_9c87zY8l4jIgXds6QvfoAm7Wtiu51c5kt24lv-afbbo-sfTg-rAvRsdl00bEZ_kF5U/s200/LogoDevoxx150dpi.jpg" width="200" /></a></div>
<br />
<br />
one for University Talk and the other for Hands on Lab. With the help of Gert Vanthienen, we took the time to present in more detail what finally we can design as solution, architecture with Apache projects like Camel, CXF, ActiveMQ and ServiceMix and move it into a scalable, high-available platform.<br />
<br />
That was a great challenge as this is not really easy to introduce "integration" which is not so sexy comparing to a Web Development framework, an iPhone or Android application. But times are changing and a lot of developers / architects are interested by agile approaches that we develop at Apache foundation.<br />
<br />
With <a href="http://fusesource.com/products/fuse-ide/">Fuse IDE</a> tool,<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpZ2rNkckrmYm8iEfrIr5tRiHvtSX2mdhr-ypo_wSS6UTe7NbGL60Z1MG_fNFLAVDjMo7yoRbzmXkreOSKov87L5WsOCJPUtVxEBGfD1MSClnA9j2ot_8JvLM7mDyHO-IS5Qn4uUrzzVM/s1600/Screen+shot+2011-11-22+at+18.25.18.png" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: 1em; text-align: center;"></a>we can now accelerate the creation of a project using Apache Camel. The wysiwig editor and EIPs patterns allow you to quickly create new routes while the runtime editor enable to review existing project. IDE is more than a tool as it allows to run and deploy the routes in Fuse ESB, Tomcat application servers or locally. The tool is not yet finalized (release 2.1 should be available soon) but it offers a lot of possibilities to facilitate integration projects, tracing of messages (= exchanges) and investigation about time passing through the different processors.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpZ2rNkckrmYm8iEfrIr5tRiHvtSX2mdhr-ypo_wSS6UTe7NbGL60Z1MG_fNFLAVDjMo7yoRbzmXkreOSKov87L5WsOCJPUtVxEBGfD1MSClnA9j2ot_8JvLM7mDyHO-IS5Qn4uUrzzVM/s1600/Screen+shot+2011-11-22+at+18.25.18.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpZ2rNkckrmYm8iEfrIr5tRiHvtSX2mdhr-ypo_wSS6UTe7NbGL60Z1MG_fNFLAVDjMo7yoRbzmXkreOSKov87L5WsOCJPUtVxEBGfD1MSClnA9j2ot_8JvLM7mDyHO-IS5Qn4uUrzzVM/s400/Screen+shot+2011-11-22+at+18.25.18.png" width="400" /></a></div>
<br />
Integration projects are moving into cloud space and this is what we have presented next with FuseSource <a href="http://fabric.fusesource.org/">Fabric</a>. Fabric is not a new hype but a strategy to reduce impact of OSGI dependencies calculation, provisioning of Apache Camel routes on local, remote or cloud instances using Apache Zookeeper as registry of artefacts to be deployed (features, jars, configurations). It offers also elastic services when deploying services into the cloud.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAjwY_VWd0Dc5fwKR_MtrHYZiRLOsjPKh76b8bK1Xsu-lCxhoCB1ZtnW9t-SIOmgMjTLyMMoilQB9u86dOvA5ovx-LQ1nH8k1RiAFJRr8yp_axmy36UMsVLhYc49j0K4IUrJy1eUgjtTI/s1600/fabric-cloud.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="247" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAjwY_VWd0Dc5fwKR_MtrHYZiRLOsjPKh76b8bK1Xsu-lCxhoCB1ZtnW9t-SIOmgMjTLyMMoilQB9u86dOvA5ovx-LQ1nH8k1RiAFJRr8yp_axmy36UMsVLhYc49j0K4IUrJy1eUgjtTI/s320/fabric-cloud.png" width="320" /></a></div>
<br />
<br />
For those who were not there, here are the links of the presentation like also the hands on lab material that we have used in the afternoon to develop a real Japa Application Project (Spring, JPA, Web) on Fuse ESB.<br />
<ul>
<li><a href="http://www.slideshare.net/cmoulliard/devoxx-2011-integrationcamelcxfservicemixactivemq" target="_blank">Presentation</a> : http://www.slideshare.net/cmoulliard/devoxx-2011-integrationcamelcxfservicemixactivemq</li>
<li><a href="https://github.com/cmoulliard/Devoxx-2011-HandsOnLab" target="_blank">Hands on Lab</a> : https://github.com/cmoulliard/Devoxx-2011-HandsOnLab</li>
<li><a href="http://fabric.fusesource.org/" target="_blank">Fusesource Fabric</a> : http://fabric.fusesource.org/</li>
<li><a href="http://fusesource.com/" target="_blank">Fusesource : Leader in Integration OpenSource</a></li>
</ul>
Remark : The step by guide is available on the github repo like also the skeleton (zip file)cmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com0tag:blogger.com,1999:blog-6232813386336615723.post-85795440019915680032011-02-24T09:58:00.003+01:002011-02-24T10:03:32.910+01:00Talks about Integration with Camel and ESBThis year, I plan to make some talks about Apache ServiceMix, Apache Camel, apache ActiveMQ and show how easy it is to build integration solutions with Apache technologies.<br /><br />Take free time, a two break hours and joint me during one of the following events :<br /><br /><ul><li><a href="http://www.parisjug.org/xwiki/bin/view/Meeting/20110510">ParisJug - 10 May 2011</a></li><li><a href="http://www.bejug.org/confluenceBeJUG/display/BeJUG/Integration+with+Apache+Camel+and+ESB">BeJug - 9 June 2011</a></li></ul><b>Agenda</b><br /><br />The purpose of this presentation/demo is to show you how easy it is to design integration between systems (web services, file systems, database, queue engine) using the projects Camel, ServiceMix and ActiveMQ of the foundation Apache.<br /><br /><b>First part :</b><br /><br />Presentation of the projects Camel, ServiceMix and ActiveMq<br />Description of the topologies proposed : messaging, osgi, web, ...<br />High-availability and scalability (ServiceMix and/or ActiveMQ)<div><br /><b>Second part :</b><br /><br />Making of of the demo solution<br />Transpose it into camel DSL language<br />Coding of WebService (using Apache CXF), DAO and Persistence layer (Spring + Hibernate JPA) and Web layer (Apache Wicket),<br />Development of Camel routes,<br />Packaging and Deployment<br />Demo</div>cmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com3tag:blogger.com,1999:blog-6232813386336615723.post-42099238279629281502011-02-23T18:27:00.029+01:002011-02-24T09:32:51.854+01:00Measure elapsed time with CamelWith the last version of Apache Camel, we provide a <a href="http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/management/EventNotifierSupport.java?view=markup">event notifier support class</a> which allow to keep information about what happen on Exchange, Route and Endpoint. One of the benefit of this class is that you can easily audit messages created in Camel Routes, collect information and report that in log by example.<br /><br />When developing an application, it is very important to calculate/measure elapsed time on the platform to find which part of your code, processor or system integrated which is the bad duck and must be improved.<br /><br />In three steps, I would show you How to enable this mechanism to report :<br />- Time elapsed to call an endpoint (could be another camel route, web service, ...)<br />- Time elapsed on the route exchange<br /><br />STEP 1 - Create a Class implementing the EventNotifierSupport<br /><br /><pre name="code" class="java"><br /><br />public class AuditEventNotifier extends EventNotifierSupport {<br /><br />public void notify(EventObject event) throws Exception {<br /> if (event instanceof ExchangeSentEvent) {<br /> ExchangeSentEvent sent = (ExchangeSentEvent) event;<br /> log.info(">>> Took " + sent.getTimeTaken() + " millis to send to external system : " + sent.getEndpoint());<br /> }<br /><br /> if (event instanceof ExchangeCompletedEvent) {;<br /> ExchangeCompletedEvent exchangeCompletedEvent = (ExchangeCompletedEvent) event;<br /> Exchange exchange = exchangeCompletedEvent.getExchange();<br /> String routeId = exchange.getFromRouteId();<br /> Date created = ((ExchangeCompletedEvent) event).getExchange().getProperty(Exchange.CREATED_TIMESTAMP, Date.class);<br /> // calculate elapsed time<br /> Date now = new Date();<br /> long elapsed = now.getTime() - created.getTime();<br /> log.info(">>> Took " + elapsed + " millis for the exchange on the route : " + routeId);<br /> }<br />}<br /><br />public boolean isEnabled(EventObject event) {<br /> return true;<br />}<br /><br />protected void doStart() throws Exception {<br /> // filter out unwanted events<br /> setIgnoreCamelContextEvents(true);<br /> setIgnoreServiceEvents(true);<br /> setIgnoreRouteEvents(true);<br /> setIgnoreExchangeCreatedEvent(true);<br /> setIgnoreExchangeCompletedEvent(false);<br /> setIgnoreExchangeFailedEvents(true);<br /> setIgnoreExchangeRedeliveryEvents(true);<br /> setIgnoreExchangeSentEvents(false);<br />}<br /><br />protected void doStop() throws Exception {<br /> // noop<br />}<br /><br />}<br /></pre><br /><br />Not really complicated and the code is explicit. Check the doStart() method to enable/disable the events for which you would like to gather information.<br /><br />This example uses only Exchange.CREATED_TIMESTAMP property but the next version of Camel 2.7.0 will provide you the property exchange.RECEIVED_TIMESTAMP and so you will be able to calculate more easily the time spend by the exchange to call the different processors till it arrives at the end of the route.<br /><br />This example collects Date information but you can imagine to use this mechanism to check if your route processes the message according to SLA, ....<br /><br />STEP 2 - Instantiate the bean in Camel Spring XML<br /><br /><pre name="code" class="xml"><br /><!-- Event Notifier --><br /><bean id="auditEventNotifier" class="com.sfr.audit.AuditEventNotifier"><br /></bean><br /></pre><br />By adding this bean definition, Camel will automatically register it to the CamelContext created.<br /><br />STEP 3 - Collect info into the log<br /><pre name="code" class="html"><br />18:10:46,060 | INFO | tp1238469515-285 | AuditEventNotifier | ? ? | 68 - org.apache.camel.camel-core - 2.6.0.fuse-00-00 | >>> Took 3 millis for the exchange on the route : mock-HTTP-Server<br />18:10:46,062 | INFO | tp2056154542-293 | AuditEventNotifier | ? ? | 68 - org.apache.camel.camel-core - 2.6.0.fuse-00-00 | >>> Took 25 millis to send to external system : Endpoint[http://localhost:9191/sis]<br />18:10:46,077 | INFO | tp2056154542-293 | AuditEventNotifier | ? ? | 68 - org.apache.camel.camel-core - 2.6.0.fuse-00-00 | >>> Took 103 millis for the exchange on the route : ws-to-sis<br /></pre>cmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com5tag:blogger.com,1999:blog-6232813386336615723.post-26957851734339268382010-09-24T08:45:00.009+02:002010-09-24T09:44:26.448+02:00Secure Web Services - WS-SecuritySecurity is one of the important key in the success of a IT project but most of the time only user authentication or data encryption are taken into account. So security of the application is often not adressed or leave aside due to complexity of the implementation.<br />One of the reason explaining this situation comes from the fact that solutions or frameworks proposed to secure an application are difficult to configure and maintain. And this remark prevalls over the specification WS-Security.<br /><br />In large company having deployed WS-Services to allow intra or inter connection between applications, Web application authentication with HTTPS protocol mechanisms are use to secure platforms. That means that users discovering the credentials used to connect to the web server can potentially have access to the services of the company.<br /><br />WS-Security offers a way to authenticate the user connected to a web service or allow also a user to be trusted on the web server it is connected. This mechanism is interesting because it reinforce the security but provides also a way to restrict access to unauthorized users to web services.<br /><br />Apache Camel and CXF frameworks offers a simplify way to implement this with only few lines of code and spring beans definition. Let's see that in action :<br /><br />STEP 1<br /><br />We only need to use JAAS api to authenticate the user using the following java package "javax.security.auth.callback" and the project <a href="http://ws.apache.org/wss4j/">WS4J</a> of Apache. Here is a simple example authenticate a user using a list and the password provided.<br /><br /><pre name="code" class="html"><br />package org.apache.camel.example.reportincident;<br /><br />import java.io.IOException;<br />import java.util.HashMap;<br />import java.util.Map;<br /><br />import javax.security.auth.callback.Callback;<br />import javax.security.auth.callback.CallbackHandler;<br />import javax.security.auth.callback.UnsupportedCallbackException;<br /><br />import org.apache.ws.security.WSPasswordCallback;<br /><br />/**<br />* Callback handler to handle passwords<br />*/<br />public class UTPasswordCallback implements CallbackHandler {<br /><br /> private Map<string, string=""> passwords = new HashMap<string, string="">();<br /><br /> public UTPasswordCallback() {<br /> passwords.put("claus", "sualc");<br /> passwords.put("charles", "selrahc");<br /> passwords.put("james", "semaj");<br /> passwords.put("abcd", "dcba");<br /> }<br /><br /> /**<br /> * Here, we attempt to get the password from the private alias/passwords map.<br /> */<br /> public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {<br /><br /> String user = "";<br /><br /> for (int i = 0; i < pc =" (WSPasswordCallback)" user =" pc.getIdentifier();" pass =" passwords.get(user);" string=""><string, string=""><br /></pre><br /><br />STEP 2 This is here that the magic will operates as we will use Spring beans definition with Apache Web Services Framework - <a href="http://cxf.apache.org/">CXF</a> and Apache <a href="http://camel.apache.org/cxf.html">Camel</a> to expose the web service<br /><br />Instantiate your WS4J bean<br /><br /><pre name="code" class="xml"><br /><bean id="wss4jInInterceptor" class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor"><br /> <constructor-arg></constructor-arg></bean> <bean id="wss4jInInterceptor" class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor"><br /> <constructor-arg><br /> <map><br /> <entry key="action" value="UsernameToken Timestamp"><br /> <entry key="passwordType" value="PasswordDigest"><br /> <entry key="passwordCallbackClass" value="org.apache.camel.example.reportincident.UTPasswordCallback"><br /> </entry></entry></entry></map><br /> </constructor-arg><br /> </bean><br /></pre><br /><br />Add it as an interceptor to CXF to allow CXF to authenticate the user using the credentials provided in the SOAP header definition.<br /><br /><pre name="code" class="xml"><br /> <cxf:cxfendpoint id="reportIncident" address="http://localhost:9080/camel-example-reportincident/webservices/incident" wsdlurl="etc/report_incident.wsdl" serviceclass="org.apache.camel.example.reportincident.ReportIncidentEndpoint"><br /><br /> <cxf:ininterceptors><br /> <ref bean="loggingInInterceptor"><br /> <ref bean="wss4jInInterceptor"><br /> </ref><br /><br /> <cxf:outinterceptors><br /> <ref bean="loggingOutInterceptor"><br /> <!-- <ref bean="wss4jOutInterceptor"> --><br /> </ref><br /><br /> </cxf:outinterceptors><br /> <cxf:cxfendpoint id="reportIncident" address="http://localhost:9080/camel-example-reportincident/webservices/incident" wsdlurl="etc/report_incident.wsdl" serviceclass="org.apache.camel.example.reportincident.ReportIncidentEndpoint"><cxf:ininterceptors><br /></pre><br /><br /><br />Here is an example of the SOAP header<br /><br /><pre name="code" class="xml"><br /><soap:envelope soap="http://schemas.xmlsoap.org/soap/envelope/"><br /> <soap:header><br /> <wsse:security wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" mustunderstand="1"><br /> <wsu:timestamp wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" id="Timestamp-2"><br /> <wsu:created>2010-09-24T07:31:06.308Z</wsu:created><br /> <wsu:expires>2010-09-24T07:36:06.308Z</wsu:expires><br /> </wsu:timestamp><br /> <wsse:usernametoken wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" id="UsernameToken-1"><br /> <wsse:username>charles</wsse:username><br /> <wsse:password type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">KoNvkEh9jwgvxTfcTza6+kHkKNI=</wsse:password><br /> <wsse:nonce encodingtype="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">havIKNKvlRuatlp3CncMKw==</wsse:nonce><br /> <wsu:created>2010-09-24T07:31:06.306Z</wsu:created><br /> </wsse:usernametoken><br /> </wsse:security><br /> </soap:header><br /> <soap:body><br /> <ns2:inputreportincident ns2="http://reportincident.example.camel.apache.org"><br /> <incidentid>222</incidentid><br /> <incidentdate>2010-07-14</incidentdate><br /> <givenname>Charles</givenname><br /> <familyname>Moulliard</familyname><br /> <summary>Bla</summary><br /> <details>Bla bla</details><br /> <email>cmoulliard@apache.org</email><br /> <phone>0011 22 33 44</phone><br /> </ns2:inputreportincident><br /> </soap:body><br /></soap:envelope><br /></pre><br /><br />And finally, declare your camel route using the web services<br /><br /><pre name="code" class="xml"><br /><camel:camelcontext id="camel"><br /> <camel:route><camel:from uri="cxf:bean:reportIncident"><camel:convertbodyto type="org.apache.camel.example.reportincident.InputReportIncident"><camel:setheader headername="CamelFileName"><camel:to uri="velocity:etc/MailBody.vm"><camel:to uri="file://target/subfolder"> <camel:camelcontext id="camel"><br /> <camel:route><br /> <camel:from uri="cxf:bean:reportIncident"><br /> <camel:convertbodyto type="org.apache.camel.example.reportincident.InputReportIncident"><br /> <camel:setheader headername="CamelFileName"><br /> <camel:method bean="filenameGenerator" method="generateFilename"><br /> </camel:method><br /> <camel:to uri="velocity:etc/MailBody.vm"><br /> <camel:to uri="file://target/subfolder"><br /> <camel:transform><br /> <camel:method bean="myBean" method="getOK"><br /> </camel:method><br /> </camel:transform><br /></pre><br /><br />To play with the example, follow this <a href="https://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-reportincident-ws-security-osgi/">example of Camel CXF</a> and enjoy it !cmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com0tag:blogger.com,1999:blog-6232813386336615723.post-23056793315578783012010-09-23T12:18:00.003+02:002010-09-23T12:29:11.845+02:00Fuse Community Day - Paris - 14th of OctoberThe Fuse Community Day will take place the 14th of October in Paris. Feel free to sign up <a href="http://form.fusesource.com/forms/registerparis2010">here</a> and come to see Claus Ibsen, Guillaume Nodet, Rob Davies and myself presenting news about OSGI, SOA, Camel and ESB and some of our customers showing that in action (Lionel Cons - CERN, Cédric Bourgeois - Atos Worldwide, Jean Folly-Kpodar - Osmocom).cmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com0tag:blogger.com,1999:blog-6232813386336615723.post-38783452835455408052010-06-18T13:13:00.006+02:002010-06-18T13:44:36.604+02:00Parse / Format fixed length message with camel-bindyCamel-bindy which is a data formatting tool to parse / format non XML message will be enriched in the next camel release 2.4. This new version will allow to work with Fixed Length message.<br /><br />A Fixed Length message as its name mention it contains data positioned at a fixed position which is by far different from Comma Separate Value format where we use a separator.<br /><br />So, you will be able able to model your message like that :<br /><br /><code><br /> @FixedLengthRecord(length=60, paddingChar=' ')<br /> public static class Order {<br /><br /> @DataField(pos = 1, length=2)<br /> private int orderNr;<br /><br /> @DataField(pos = 3, length=2)<br /> private String clientNr;<br /><br /> @DataField(pos = 5, length=9)<br /> private String firstName;<br /><br /> @DataField(pos = 14, length=5, align="L")<br /> private String lastName;<br /><br /> @DataField(pos = 19, length=4)<br /> private String instrumentCode;<br /><br /> @DataField(pos = 23, length=10)<br /> private String instrumentNumber;<br /><br /> @DataField(pos = 33, length=3)<br /> private String orderType;<br /><br /> @DataField(pos = 36, length=5)<br /> private String instrumentType;<br /><br /> @DataField(pos = 41, precision = 2, length=7)<br /> private BigDecimal amount;<br /><br /> @DataField(pos = 48, length=3)<br /> private String currency;<br /><br /> @DataField(pos = 51, length=10, pattern = "dd-MM-yyyy")<br /> private Date orderDate;<br /><br /></code><br /><br />to parse/format the following text :<br /><br />"10A9 PaulineM ISINXD12345678BUYShare2500.45USD01-08-2009"<br /><br />The tool allows to add 'padding' characters and to align "LEFT" or " RIGHT" the string in the field.<br /><br />More info are available on the wiki web page of camel-bindy : http://camel.apache.org/bindy.htmlcmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com0tag:blogger.com,1999:blog-6232813386336615723.post-47349738299786248342010-03-30T11:22:00.006+02:002010-03-30T12:08:01.051+02:00Run Camel route on ServiceMix 3.3.xEven if Apache ServiceMix (ESB) was mainly designed as a JBI container, it is perfectly possible to use camel routes and camel components (bindy, file, jms, ...) on this platform. <br /><br />This allows by example to :<br />- Combine JBI binding components or Services with Camel routes,<br />- Use a camel component when the binding component does not exist,<br />- Deploy camel as Service Unit in Service Assembly<br /><br />Here is a small example showing that in action. The creation of the project is very simple as you have to create a Service Unit. If you work with maven, you can use the servicemix plugin which will allow to create the maven project. Otherwise, you can create the maven structure manually.<br /><br />To be able to deploy camel next, you must create a Service Assembly (= SA) who will include the Service Unit.<br /><br />Don't be afraid and follow the tutorial described here for that part of the work : http://servicemix.apache.org/2-beginner-using-maven-to-develop-jbi-applications.html <br /><br />When the project is ready, you create a camel-context.xml file in the directory src/main/resources. This file which is a spring xml file will contain the camel routes + beans definitions or will point to your packages if you prefer to code your routes using Camel Java DSL language instead of Spring DSL language.<br /><br />Remark : in my example, I use Spring DSL language.<br /><br />The route is very basic and will create a message containing the text "Hello World from SMX3!" as body value. The message is copied in an activemq queue called "in". A second route take the messages and send it to the log. The log message is readable from the console where ServiceMix 3.3.x has been started.<br /><br />In the Spring file, you must add the camel bean "org.apache.camel.component.jms.JmsComponent" definition to instantiate a connection factory to the queueing engine. The broker is created and started at the launch of ServiceMix3 so you don't need to do anything else here !<br /><br /><pre name="code" class="xml"><br /><beans xmlns="http://www.springframework.org/schema/beans"<br /> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br /> xsi:schemaLocation="<br /> http://www.springframework.org/schema/beans<br /> http://www.springframework.org/schema/beans/spring-beans.xsd<br /> http://camel.apache.org/schema/spring<br /> http://camel.apache.org/schema/spring/camel-spring.xsd"><br /><br /> <bean id="activemq" class="org.apache.camel.component.jms.JmsComponent"><br /> <property name="connectionFactory"><br /> <bean class="org.apache.activemq.ActiveMQConnectionFactory"><br /> <property name="brokerURL" value="tcp://localhost:61616"/><br /> </bean><br /> </property><br /> </bean><br /><br /> <camelContext xmlns="http://camel.apache.org/schema/spring"><br /> <package>org.apache.servicemix.samples</package><br /> <br /> <route><br /> <from uri="timer:myTimerEvent?fixedRate=true&period=15000"/><br /> <setBody><br /> <constant>Hello World from SMX3 !</constant><br /> </setBody><br /> <to uri="activemq:queue:in"/><br /> </route><br /> <br /> <route><br /> <from uri="activemq:queue:in"/><br /> <to uri="log:org.apache.servicemix.samples.camel.ExampleCamelRoute"/><br /> </route><br /> </camelContext><br /><br /></beans><br /></pre><br /><br />To allow Camel to work with its jms component, the following dependency must be added in the pom of the camel-su. <br /><br /><pre name="code" class="xml"><br /><br /> <dependencies><br /> <dependency><br /> <groupId>org.apache.camel</groupId><br /> <artifactId>camel-core</artifactId><br /> <version>2.2.0</version><br /> </dependency><br /> <dependency><br /> <groupId>org.apache.camel</groupId><br /> <artifactId>camel-spring</artifactId><br /> <version>2.2.0</version><br /> </dependency><br /> <dependency><br /> <groupId>org.apache.camel</groupId><br /> <artifactId>camel-jms</artifactId><br /> <version>2.2.0</version><br /> </dependency><br /> </dependencies><br /><br /></pre><br /><br /><br />To compile the project, simply launch the command "mvn install" to generate the SU and do the same for the SA. When the Service Assembly jar file is available, copy it in the hotdeploy directory of ServiceMix 3 server and check the log.<br /><br />This example which is very basic can be extended with another camel components. In that case, don't forget to add their dependency in the SU pom as the camel lib must be added in the lib directory of the SU.<br /><br />Have fun with that !cmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com6tag:blogger.com,1999:blog-6232813386336615723.post-85135345436127382542010-02-26T10:33:00.009+01:002010-02-26T13:31:33.394+01:00Is Webservice Reliable Messaging (WS-RM) the ugly duck of the WS-* story ?The Webservice Reliable Messaging (WS-RM) specification has been designed a couple of years ago (2005) but few projects used it. Different reasons could explain this situation, the complexity of the specification, the cost to implement it and the lack of use cases. Personally, I think that developers and architects adopt a low profile when designing a solution and spend times developing alternative solutions providing functionality similar to what WS-RM propose.<br /><br />WS-RM is not a the ugly duck of the story and need more attention from community because it allows you to design solutions where you will be able to<br />- Guaranty of message (= web services) delivery required by example in financial order processing, alarm monitoring systems, ...<br />- Control the communication between the client and the server (retransmission, ...)<br />- Implement asynchronous solution by decoupling the request from the reply<br /><br />Well, what I have presented could be assimilated to a style exercise or a faith act and you will adhere or not. To convince you about the interests to use WS-RM, I will show you How easy it is to design such a solution using Apache CXF framework. This process can be achieved in three simple steps<br /><br /><ul><li>A. Turn on your WSDL contract into a WS-addressing</li></ul><br />WS-addressing needs to be used because the communication between the client and server will be governed by the Reliable Message Server which is running on a different<br />port address number. This decoupling is required to allow to retransmit message, acknowledge the messages received and guaranty the delivery<br /><br />Here is one way that you can adopt :<br /><br /><pre name="code" class="xml"><br /> <!-- Service definition --><br /> <wsdl:service name="ReportIncidentEndpointService"><br /> <wsdl:port name="ReportIncidentPort" binding="tns:ReportIncidentBinding"><br /> <soap:address location="http://localhost:8080/cxf/camel-example/incident"><br /> <!-- <wswa:usingaddressing wswa="http://www.w3.org/2005/02/addressing/wsdl"> --><br /> <wswa:usingaddressing wswa="http://www.w3.org/2005/02/addressing/wsdl"><br /> </wswa:usingaddressing><br /> </soap:address><br /></wsdl:port></wsdl:service></pre><br /><br />the other consists in to use a Policy Rule (= WS-Policy)<br /><br /><pre name="code" class="xml"><br /> <wsp:policy wsp="http://www.w3.org/2006/07/ws-policy"><br /> <wsam:addressing wsam="http://www.w3.org/2007/02/addressing/metadata"><br /> <wsp:policy><br /> </wsp:policy><br /> </wsam:addressing><br /></wsp:policy></pre><br /><br /><ul><li style="">B. Activate the Reliable Server </li></ul><br />Now that the WSDL contract is modified, we need to add the Reliable Server to the configuration of our platform. I will show you using a spring xml configuration file<br />but you can use the Apache CXF classes in your java code if you want<br /><br />To activate the RM server, you simply needs to add the tags wsa:addressing and wsrm-mgr in the bus definition of Apache CXF. Different parameters are available like<br />retransmission interval, acknowledge interval. I will not digg into these ones and if you need information, I invite you to check Apache CXF javadoc and specifications. By example<br />ikt is possible to activate also the persistence manager of the RM server ;-)<br /><br /><pre name="code" class="xml"><br /> <cxf:bus><br /> <cxf:features><br /> <cxf:logging><br /> <wsa:addressing><br /> <wsrm-mgr:reliablemessaging><br /> <wsrm-policy:rmassertion><br /> <wsrm-policy:baseretransmissioninterval milliseconds="4000"><br /> <wsrm-policy:acknowledgementinterval milliseconds="2000"><br /> </wsrm-policy:acknowledgementinterval><br /> <wsrm-mgr:destinationpolicy><br /> <wsrm-mgr:ackspolicy intramessagethreshold="0"><br /> </wsrm-mgr:ackspolicy><br /> </wsrm-mgr:destinationpolicy><br /> </wsrm-policy:baseretransmissioninterval><br /> </wsrm-policy:rmassertion><br /></wsrm-mgr:reliablemessaging></wsa:addressing></cxf:logging></cxf:features></cxf:bus></pre><br /><br />If you use CXF in combination with the Routing engine Apache Camel, you don't need to do additional things as the Apache CXF endpoint who will consume the web servicesmessages<br />will be drived by the RM server of CXF.<br /><br />Here is an example of Camel integration with CXF<br /><br /><pre name="code" class="xml"><br /> <!-- webservice endpoint --><br /> <cxfcamel:cxfendpoint id="reportIncident" address="http://localhost:8080/cxf/camel-example/incident" serviceclass="org.apache.camel.example.reportincident.ReportIncidentEndpoint" s="http://reportincident.example.camel.apache.org"><br /> </cxfcamel:cxfendpoint><br /><br /> <!-- Camel route --><br /> <camel:camelcontext trace="true" xmlns="http://camel.apache.org/schema/osgi"><br /> <camel:route><br /> <camel:from uri="cxf:bean:reportIncident"> // messages are consumed from CXF endpoint<br /> <camel:convertbodyto type="org.apache.camel.example.reportincident.InputReportIncident"> // the body of the WS message is converted directly into a POJOI<br /> <camel:to uri="bean:webservice"> // We call a POJO to save the reportincident in a DB<br /> <camel:inOnly uri="osgiqueuingservice:queue:in"> // We put the object in a queue<br /> <camel:transform><br /> <camel:method bean="feedback" method="setOk"> // We provide a feedback message as the WS is of type request/replyt<br /> </camel:method><br /><br /> </camel:transform><br /> </camel:to><br /></camel:to></camel:convertbodyto></camel:from></camel:route></camel:camelcontext></pre><br /><br /><ul><li>C. Verify</li></ul><br />If you use a java client using Apache CXF java classes, you can easily enable the logging of the IN/OUT WS messages exchanged with the RM server and the application.<br />The following trace shows that :<br />- a sequence has been started<br />- each message is identified '' with a UID<br />- Within a sequence, the messages send receive a messageID<br />- The server acknowledge the reception (= processing) of the messages<br /><br /><textarea cols="80" rows="20"><br /><br />>>>> Invoking reportIncident ... for accident : 0<br />24-fÚvr.-2010 9:48:39 org.apache.cxf.transport.http.HTTPConduit setUpDecoupledDestination<br />INFO: creating decoupled endpoint: http://localhost:9999/camel-example/incident<br />2010-02-24 09:48:39.796::INFO: Logging to STDERR via org.mortbay.log.StdErrLog<br />2010-02-24 09:48:39.828::INFO: jetty-6.1.21<br />2010-02-24 09:48:39.921::INFO: Started SelectChannelConnector@localhost:9999<br />24-fÚvr.-2010 9:48:40 org.apache.cxf.ws.rm.Proxy invoke<br />INFO: Sending out-of-band RM protocol message {http://schemas.xmlsoap.org/ws/2005/02/rm}CreateSequence.<br />24-fÚvr.-2010 9:48:41 org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onClose<br />INFO: Outbound Message<br />---------------------------<br />ID: 1<br />Address: http://localhost:8080/cxf/camel-example/incident<br />Encoding: UTF-8<br />Content-Type: text/xml<br />Headers: {SOAPAction=["http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence"], Connection=[Keep-Alive], Accept=[*/*]}<br />Payload:<br /><br /><soap:envelope soap="http://schemas.xmlsoap.org/soap/envelope/"><br /> <soap:header><br /> <action xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence</action><br /> <messageid xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">urn:uuid:508b8914-1621-4992-ae2d-2249d417069a</messageid><br /> <to xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://localhost:8080/cxf/camel-example/incident</to><br /> <replyto xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><br /> <address>http://localhost:9999/camel-example/incident</address><br /> </replyto><br /> </soap:header><br /> <soap:body><br /> <createsequence xmlns="http://schemas.xmlsoap.org/ws/2005/02/rm" ns2="http://schemas.xmlsoap.org/ws/2004/08/addressing"><br /> <acksto><br /> <ns2:address>http://localhost:9999/camel-example/incident</ns2:address><br /> </acksto><br /> <expires>PT0S</expires><br /> <offer><br /> <identifier>urn:uuid:b12e4ccf-3bec-4f76-85f6-2b64f24745b5</identifier><br /> <expires>PT0S</expires><br /> </offer><br /> </createsequence><br /> </soap:body><br /></soap:envelope><br /><br />--------------------------------------<br />24-fÚvr.-2010 9:48:41 org.apache.cxf.interceptor.LoggingInInterceptor logging<br />INFO: Inbound Message<br />----------------------------<br />ID: 1<br />Response-Code: 202<br />Encoding: UTF-8<br />Content-Type: text/xml; charset=utf-8<br />Headers: {content-type=[text/xml; charset=utf-8], Content-Length=[532], Server=[Jetty(6.1.x)]}<br />Payload:<br /><br /><soap:envelope soap="http://schemas.xmlsoap.org/soap/envelope/"><br /> <soap:header><br /> <messageid xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><br /> urn:uuid:73d86df6-7d45-42df-8008-2a4ca48682fd<br /> </messageid><br /> <to xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</to><br /> <replyto xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><br /> <address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/none</address><br /> </replyto><br /> </soap:header><br /> <soap:body><br /></soap:body><br /><br />--------------------------------------<br />24-fÚvr.-2010 9:48:41 org.apache.cxf.interceptor.LoggingInInterceptor logging<br />INFO: Inbound Message<br />----------------------------<br />ID: 2<br />Address: /camel-example/incident<br />Response-Code: 200<br />Encoding: UTF-8<br />Content-Type: text/xml; charset=UTF-8<br />Headers: {content-type=[text/xml; charset=UTF-8], connection=[keep-alive], Host=[localhost:9999], Content-Length=[1006], User-Agent=[Progress FUSE Services Fram<br />ework 2.2.6-fuse-01-00], Content-Type=[text/xml; charset=UTF-8], Accept=[*/*], Pragma=[no-cache], Cache-Control=[no-cache]}<br />Payload:<br /><br /><soap:envelope soap="http://schemas.xmlsoap.org/soap/envelope/"><br /> <soap:header><br /> <action xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequenceResponse</action><br /> <messageid xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><br /> urn:uuid:c8e59735-7738-40b2-98c1-28be15274b35<br /> </messageid><br /> <to xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://localhost:9999/camel-example/incident</to><br /> <relatesto xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">urn:uuid:508b8914-1621-4992-ae2d-2249d417069a</relatesto><br /> </soap:header><br /> <soap:body><br /> <createsequenceresponse xmlns="http://schemas.xmlsoap.org/ws/2005/02/rm" ns2="http://schemas.xmlsoap.org/ws/2004/08/addressing"><br /> <identifier>urn:uuid:b35dff50-43cb-43ad-9c9e-4b59f7cb55e7</identifier><br /> <expires>P0Y0M0DT0H0M0.0S</expires><br /> <accept><br /> <acksto><br /> <ns2:address>http://localhost:8080/cxf/camel-example/incident</ns2:address><br /> </acksto><br /> </accept><br /> </createsequenceresponse><br /> </soap:body><br /></soap:envelope><br /><br />--------------------------------------<br />24-fÚvr.-2010 9:48:41 org.apache.cxf.ws.rm.soap.RMSoapInterceptor updateServiceModelInfo<br />INFO: Updating service model info in exchange<br />24-fÚvr.-2010 9:48:41 org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onClose<br />INFO: Outbound Message<br />---------------------------<br />ID: 3<br />Address: http://localhost:8080/cxf/camel-example/incident<br />Encoding: UTF-8<br />Content-Type: text/xml<br />Headers: {SOAPAction=["http://reportincident.example.camel.apache.org/ReportIncident"], Connection=[Keep-Alive], Accept=[*/*]}<br />Payload:<br /><br /><soap:envelope soap="http://schemas.xmlsoap.org/soap/envelope/"><br /> <soap:header><br /> <action xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://reportincident.example.camel.apache.org/ReportIncident</action><br /> <messageid xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">urn:uuid:85a1ebac-5293-4daa-a656-987967aa2a4d</messageid><br /> <to xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://localhost:8080/cxf/camel-example/incident</to><br /> <replyto xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><br /> <address>http://localhost:9999/camel-example/incident</address><br /> </replyto><br /> <wsrm:sequence ns2="http://schemas.xmlsoap.org/ws/2004/08/addressing" wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm"><br /> <wsrm:identifier>urn:uuid:b35dff50-43cb-43ad-9c9e-4b59f7cb55e7</wsrm:identifier><br /> <wsrm:messagenumber>1</wsrm:messagenumber><br /> </wsrm:sequence><br /> </soap:header><br /> <soap:body><br /> <ns2:inputreportincident ns2="http://reportincident.example.camel.apache.org"><br /> <incidentid>0</incidentid><br /> <incidentdate>29-04-2009</incidentdate><br /> <givenname>moulliard</givenname><br /> <familyname>charles</familyname><br /> <summary><br /> This is a web service incident</summary><br /> <details>This is a web service incident - details</details><br /> <email>cmoulliard@gmail.com</email><br /> <phone><br /> +222 10 50 22<br /> </phone><br /> </ns2:inputreportincident><br /> </soap:body><br /></soap:envelope><br /><br />--------------------------------------<br />24-fÚvr.-2010 9:48:41 org.apache.cxf.interceptor.LoggingInInterceptor logging<br />INFO: Inbound Message<br />----------------------------<br />ID: 3<br />Response-Code: 202<br />Encoding: UTF-8<br />Content-Type: text/xml; charset=utf-8<br />Headers: {content-type=[text/xml; charset=utf-8], Content-Length=[532], Server=[Jetty(6.1.x)]}<br />Payload:<br /><br /><soap:envelope soap="http://schemas.xmlsoap.org/soap/envelope/"><br /> <soap:header><br /> <messageid xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><br /> urn:uuid:37dceb90-e1f5-4014-9749-8d4ae7eebb13</messageid><br /> <to xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</to><br /> <replyto xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><br /> <address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/none</address><br /> </replyto><br /> </soap:header><br /> <soap:body><br /></soap:body><br /><br />--------------------------------------<br />2010-02-24 09:48:41.937::INFO: seeing JVM BUG(s) - cancelling interestOps==0<br />24-fÚvr.-2010 9:48:42 org.apache.cxf.interceptor.LoggingInInterceptor logging<br />INFO: Inbound Message<br />----------------------------<br />ID: 4<br />Address: /camel-example/incident<br />Response-Code: 200<br />Encoding: UTF-8<br />Content-Type: text/xml; charset=UTF-8<br />Headers: {content-type=[text/xml; charset=UTF-8], connection=[keep-alive], Host=[localhost:9999], Content-Length=[1057], User-Agent=[Progress FUSE Services Fram<br />ework 2.2.6-fuse-01-00], Content-Type=[text/xml; charset=UTF-8], Accept=[*/*], Pragma=[no-cache], Cache-Control=[no-cache]}<br />Payload:<br /><br /><soap:envelope soap="http://schemas.xmlsoap.org/soap/envelope/"><br /> <soap:header><br /> <action xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://reportincident.example.camel.apache.org/ReportIncidentEndpoint/ReportIncidentResponse</action><br /> <messageid xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">urn:uuid:6163b07e-c983-47f7-8699-c4670b61a213</messageid><br /> <to xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://localhost:9999/camel-example/incident</to><br /> <relatesto xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">urn:uuid:85a1ebac-5293-4daa-a656-987967aa2a4d</relatesto><br /> <wsrm:sequence ns2="http://schemas.xmlsoap.org/ws/2004/08/addressing" wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm"><br /> <wsrm:identifier>urn:uuid:b12e4ccf-3bec-4f76-85f6-2b64f24745b5</wsrm:identifier><br /> <wsrm:messagenumber>1</wsrm:messagenumber><br /> </wsrm:sequence><br /> </soap:header><br /> <soap:body><br /> <ns2:outputreportincident ns2="http://reportincident.example.camel.apache.org"><br /> <code>OK</code><br /> </ns2:outputreportincident><br /> </soap:body><br /></soap:envelope><br /><br />--------------------------------------<br /><br />>>>> Result - code : OK<br /><br />24-fÚvr.-2010 9:48:43 org.apache.cxf.interceptor.LoggingInInterceptor logging<br />INFO: Inbound Message<br />----------------------------<br />ID: 5<br />Address: /camel-example/incident<br />Response-Code: 200<br />Encoding: UTF-8<br />Content-Type: text/xml; charset=UTF-8<br />Headers: {content-type=[text/xml; charset=UTF-8], connection=[keep-alive], Host=[localhost:9999], Content-Length=[955], SOAPAction=["http://schemas.xmlsoap.org/<br />ws/2005/02/rm/SequenceAcknowledgement"], User-Agent=[Progress FUSE Services Framework 2.2.6-fuse-01-00], Content-Type=[text/xml; charset=UTF-8], Accept=[*/*], P<br />ragma=[no-cache], Cache-Control=[no-cache]}<br />Payload:<br /><br /><soap:envelope soap="http://schemas.xmlsoap.org/soap/envelope/"><br /> <soap:header><br /> <action xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2005/02/rm/SequenceAcknowledgement<br /> </action><br /> <messageid xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">urn:uuid:f57c0b96-fcc3-4543-bbc3-fd15a54622e7</messageid><br /> <to xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://localhost:9999/camel-example/incident</to><br /> <replyto xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><br /> <address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/none</address><br /> </replyto><br /> <wsrm:sequenceacknowledgement ns2="http://schemas.xmlsoap.org/ws/2004/08/addressing" wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm"><br /> <wsrm:identifier>urn:uuid:b35dff50-43cb-43ad-9c9e-4b59f7cb55e7</wsrm:identifier><br /> <wsrm:acknowledgementrange lower="1" upper="1"><br /> </wsrm:acknowledgementrange><br /> </wsrm:sequenceacknowledgement><br /> <soap:body><br /></soap:body><br /><br /><br />--------------------------------------<br />24-fÚvr.-2010 9:48:43 org.apache.cxf.ws.rm.soap.RMSoapInterceptor updateServiceModelInfo<br />INFO: Updating service model info in exchange<br />24-fÚvr.-2010 9:48:44 org.apache.cxf.ws.rm.Proxy invoke<br />INFO: Sending out-of-band RM protocol message {http://schemas.xmlsoap.org/ws/2005/02/rm}SequenceAcknowledgement.<br />24-fÚvr.-2010 9:48:44 org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onClose<br />INFO: Outbound Message<br />---------------------------<br />ID: 6<br />Address: http://localhost:8080/cxf/camel-example/incident<br />Encoding: UTF-8<br />Content-Type: text/xml<br />Headers: {SOAPAction=["http://schemas.xmlsoap.org/ws/2005/02/rm/SequenceAcknowledgement"], Connection=[Keep-Alive], Accept=[*/*]}<br />Payload:<br /><br /><soap:envelope soap="http://schemas.xmlsoap.org/soap/envelope/"><br /><soap:header><br /> <action xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2005/02/rm/SequenceAcknowledgement</action><br /> <messageid xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">urn:uuid:c5584570-c10f-49cc-a3ef-c2c53363ec66</messageid><br /> <to xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://localhost:8080/cxf/camel-example/incident</to><br /> <replyto lns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><br /> <address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/none</address><br /> </replyto><br /> <wsrm:sequenceacknowledgement ns2="http://schemas.xmlsoap.org/ws/2004/08/addressing" wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm"><br /> <wsrm:identifier>urn:uuid:b12e4ccf-3bec-4f76-85f6-2b64f24745b5</wsrm:identifier><br /> <wsrm:acknowledgementrange lower="1" upper="1"><br /> </wsrm:acknowledgementrange><br /></wsrm:sequenceacknowledgement><br /><soap:body><br /></soap:body><br /><br />--------------------------------------<br />24-fÚvr.-2010 9:48:44 org.apache.cxf.interceptor.LoggingInInterceptor logging<br />INFO: Inbound Message<br />----------------------------<br />ID: 6<br />Response-Code: 202<br />Encoding: UTF-8<br />Content-Type: text/xml; charset=utf-8<br />Headers: {content-type=[text/xml; charset=utf-8], Content-Length=[532], Server=[Jetty(6.1.x)]}<br />Payload:<br /><br /><soap:envelope soap="http://schemas.xmlsoap.org/soap/envelope/"><br /> <soap:header><br /> <messageid xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><br /> urn:uuid:786ad464-fb01-452a-9036-63c383955133</messageid><br /> <to xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</to><br /> <replyto xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><br /> <address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/none</address><br /> </replyto><br /> </soap:header><br /> <soap:body><br /></soap:body><br /><br />--------------------------------------<br />24-fÚvr.-2010 9:49:12 org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine shutdown<br /><br /><br /></soap:envelope></soap:header></soap:envelope></soap:header></soap:envelope></soap:envelope></soap:envelope></textarea><br /><br /><ul><li>Conclusion </li></ul><br />Awesome, isn'it. Even, if you continue to doubt about this specification, I'm pretty sure that in the future you will take it into account into your decision process regarding<br />to what has been developed here.cmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com0tag:blogger.com,1999:blog-6232813386336615723.post-59080191631105081062009-11-20T16:55:00.002+01:002009-11-20T17:03:12.096+01:00New features for Apache Camel Bindy (non XML binding framework)Today has been a very productive day. I have found the time to update the documentation about the Apache Camel Tutorial on <a href="http://camel.apache.org/tutorial-osgi-camel-part2.html">OSGI </a>and commit the last new features added to camel-bindy : the non XML binding framework used to parse or generate CSV, FIX, ... messages<br /><br />This new version of bindy includes important new features like :<br />- Required (@DataField) to check mandatory field<br />- Position (@DataField and @KeyValuePairField) when the CSV/FIX message to be generate contain fields which are placed at a different position then those used to parse it<br />- Section which allow to define the class containing by example the header, body or footer section<br /><br />and<br /><br />- OneToMany which allow to :<br /><br /><ul><li>Read a FIX message containing repetitive groups (= group of tags/keys)</li><li>Generate a CSV with repetitive data</li></ul>More info can be find <a href="http://camel.apache.org/bindy.html">here</a>.<br /><br /><div style="border: 1px solid black ! important; margin: 0px ! important; padding: 2px ! important; background: rgb(168, 236, 255) none repeat scroll 0% 0% ! important; -moz-background-clip: border ! important; -moz-background-origin: padding ! important; -moz-background-inline-policy: continuous ! important; font-family: arial ! important; font-size: 12px ! important; color: rgb(0, 0, 0) ! important; line-height: normal ! important; font-weight: normal ! important; vertical-align: middle ! important; left: 254px ! important; top: 40px ! important; visibility: visible ! important; display: inline ! important; width: auto; height: auto ! important; position: absolute ! important; -moz-border-radius-topleft: 5px ! important; -moz-border-radius-topright: 5px ! important; -moz-border-radius-bottomright: 5px ! important; -moz-border-radius-bottomleft: 5px ! important; text-align: left ! important; z-index: 1410065406 ! important;" id="gmBFtt"><div style="border-bottom: 1px dotted black ! important; background: rgb(168, 236, 255) none repeat scroll 0% 0% ! important; -moz-background-clip: border ! important; -moz-background-origin: padding ! important; -moz-background-inline-policy: continuous ! important; font-family: arial ! important; font-size: 12px ! important; color: rgb(0, 0, 0) ! important; line-height: normal ! important; font-weight: normal ! important; vertical-align: middle ! important; padding-bottom: 2px ! important; padding-top: 2px ! important;"><span id="bfconfigButton" title="Language configuration" style="border: 1px dotted gray ! important; margin: 1px ! important; padding: 0px 2px ! important; background: rgb(168, 236, 255) none repeat scroll 0% 0% ! important; -moz-background-clip: border ! important; -moz-background-origin: padding ! important; -moz-background-inline-policy: continuous ! important; font-family: arial ! important; font-size: 12px ! important; color: rgb(0, 0, 0) ! important; line-height: normal ! important; font-weight: normal ! important; vertical-align: middle ! important; cursor: pointer ! important;">Lang</span><span id="bfdetectButton" title="Detect and set language" style="border: 1px dotted gray ! important; margin: 1px ! important; padding: 0px 2px ! important; background: rgb(168, 236, 255) none repeat scroll 0% 0% ! important; -moz-background-clip: border ! important; -moz-background-origin: padding ! important; -moz-background-inline-policy: continuous ! important; font-family: arial ! important; font-size: 12px ! important; color: rgb(0, 0, 0) ! important; line-height: normal ! important; font-weight: normal ! important; vertical-align: middle ! important; cursor: pointer;">Detect</span><span title="From English To French (switch direction)" id="bflangsSpan" style="border: 1px dotted gray ! important; margin: 1px ! important; padding: 0px 2px ! important; background: rgb(168, 236, 255) none repeat scroll 0% 0% ! important; -moz-background-clip: border ! important; -moz-background-origin: padding ! important; -moz-background-inline-policy: continuous ! important; font-family: arial ! important; font-size: 12px ! important; color: rgb(0, 0, 0) ! important; line-height: normal ! important; font-weight: normal ! important; vertical-align: middle ! important; cursor: pointer ! important;">en>fr </span><span title="Translation service: Yahoo (switch service)" id="bfsvcSpan" style="border: 1px dotted gray ! important; margin: 1px ! important; padding: 0px 2px ! important; background: rgb(168, 236, 255) none repeat scroll 0% 0% ! important; -moz-background-clip: border ! important; -moz-background-origin: padding ! important; -moz-background-inline-policy: continuous ! important; font-family: arial ! important; font-size: 12px ! important; color: rgb(0, 0, 0) ! important; line-height: normal ! important; font-weight: normal ! important; vertical-align: middle ! important; cursor: pointer ! important;">Yahoo</span><span title="Copy result to clipboard" id="bfclipboardSpan" style="border: 1px dotted gray ! important; margin: 1px ! important; padding: 0px 2px ! important; background: rgb(168, 236, 255) none repeat scroll 0% 0% ! important; -moz-background-clip: border ! important; -moz-background-origin: padding ! important; -moz-background-inline-policy: continuous ! important; font-family: arial ! important; font-size: 12px ! important; color: rgb(0, 0, 0) ! important; line-height: normal ! important; font-weight: normal ! important; vertical-align: middle ! important; cursor: copy ! important;">C</span><span title="" id="bferrorSpan" style="border: 1px dotted gray ! important; margin: 1px ! important; padding: 0px 2px ! important; background: rgb(168, 236, 255) none repeat scroll 0% 0% ! important; -moz-background-clip: border ! important; -moz-background-origin: padding ! important; -moz-background-inline-policy: continuous ! important; font-family: arial ! important; font-size: 12px ! important; color: rgb(0, 0, 0) ! important; line-height: normal ! important; font-weight: normal ! important; vertical-align: middle ! important; cursor: pointer ! important; display: none ! important; visibility: hidden ! important;"></span><img id="bffishImg" style="border: medium none ! important; margin: 0px ! important; float: none ! important; vertical-align: top ! important; cursor: pointer ! important; display: inline ! important;" title="Click to translate" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAOCAYAAAA8E3wEAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1QUUDyoqJjAqRwAAAN1JREFUOMu1lMkVwyAMBYe0JGpCNUFNVk3k4AUwxPGS+ILxkzX8jyTH/Sfu9nrmJ3cXlnMASyWRPwd2d5XlHCBZn1BthcbRAdxTZQDI8k3mQzg11rhF+QZ9jdNOcQib6GFQYJYgCFucSRf6GsLU6wEY5yubTFqF2yq1vRwr3INXdQUWG+je1pELX4ED1wDyRAR0WfuAA9gloITyvsFMIMgYInYRqF6rO9Sqz9qkO5ilyo0o3YBwJ+6vrdQonxWUQllhXeHcb/wabMPkP2n81ocAIoLZrMqn/4y2RwP8DcQ+d6rT9ATiAAAAAElFTkSuQmCC" /></div><div style="background: rgb(168, 236, 255) none repeat scroll 0% 0% ! important; -moz-background-clip: border ! important; -moz-background-origin: padding ! important; -moz-background-inline-policy: continuous ! important; font-family: arial ! important; font-size: 12px ! important; color: rgb(0, 0, 0) ! important; line-height: normal ! important; font-weight: normal ! important; vertical-align: middle ! important; width: auto;"> OSGI</div></div>cmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com0tag:blogger.com,1999:blog-6232813386336615723.post-28044799123903501682009-11-02T12:36:00.004+01:002009-11-02T14:27:10.430+01:00Tutorial part 1 about Apache Camel and OSGI (reviewed)Last friday, I have spend some times to update the part 1 of the Apache Camel tutotrial. This tutorial shows how you can easily and quickly build and deploy a small SOA project using Camel 2.0 top of Apache Felix Karaf 1.0.0<br /><br />The second part of this tutorial will be upgraded soon and will include a new section about integration tests with Pax Examcmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com0tag:blogger.com,1999:blog-6232813386336615723.post-36546042340520749812009-11-02T12:33:00.005+01:002009-11-02T14:27:32.737+01:00Apache Camel Group on LinkedlnApache Camel has now its Group on Linkedln web site : <a href="http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm">http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm</a><br /><br />Feel free to join us to discuss / exchange ideas / news and jobs about your favorite mediation and router frameworkcmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com0tag:blogger.com,1999:blog-6232813386336615723.post-33057720208241814752009-10-28T10:21:00.002+01:002009-10-28T10:24:44.316+01:00Building OSGi applications with the Blueprint Container specification<b>Jarek Gawor </b>which is an advisory software engineer for IBM and an Apache Geronimo committer /PMC member has published an interesting article on :<br /><br /><a href="http://www.ibm.com/developerworks/opensource/library/os-osgiblueprint/index.html?ca=drs-">Building OSGi applications with the Blueprint Container specification</a>cmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com0tag:blogger.com,1999:blog-6232813386336615723.post-52286488258490859542009-09-16T13:44:00.004+02:002009-09-16T14:41:22.556+02:00Fuse Community Day - Paris - 1st OctoberThe first "Fuse Community day" will take place the 1st October 2009 in Paris. Different topics will be presented by the founders James Strachan, Rob Davies, Guillaume Nodet of the projects Apache Camel, ActiveMq and Karaf during this day.<br /><br /><span style="font-weight: bold;">To join the day, please register on this site : http://form.fusesource.com/forms/registerforParisDay</span><br /><br />Here is the agenda :<br /><br /><p style="margin: 0px;"> </p> <p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR">09:30 - Réception et petit-déjeuner</span></b></span></p><p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><br /><span style="font-size:100%;"><b style=""><span lang="FR"><o:p></o:p></span></b></span></p> <p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR">10:00 - Ouverture de la conférence par Magali Briol <o:p></o:p></span></b></span></p> <p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR"><br /></span></b></span></p><p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR">10:15 - FUSE et OSGi par Guillaume Nodet; Membre PMC<o:p></o:p></span></b></span></p> <p class="NoSpacing" style="margin: 0pt 0pt 0pt 36pt; text-indent: -18pt;font-family:times new roman;"><span lang="FR" style="font-size:100%;">-<span style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><span lang="FR" style="font-size:100%;">“</span><span lang="FR" style="font-size:100%;">La technologie OSGi est au coeurs des produits FUSE. Cette présentation vous permettra de découvrir OSGi, Apache Karaf, et leur utilisation au sein de FUSE ESB.“</span><span lang="FR" style="font-size:100%;"><o:p></o:p></span></p> <p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR"><br /></span></b></span></p><p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR">11:00 - Enterprise Apache ActiveMQ par Rob Davies; Membre PMC et Co-fondateur <o:p></o:p></span></b></span></p> <p class="NoSpacing" style="margin: 0pt 0pt 0pt 36pt; text-indent: -18pt;font-family:times new roman;"><span style="font-size:100%;">-<span style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><span style="font-size:100%;">“</span><span style="font-size:100%;">Apache ActiveMQ is a the most widely used open source messaging system to date.</span><span style="font-size:100%;"><o:p></o:p></span></p> <p class="NoSpacing" style="margin: 0pt 0pt 0pt 36pt;font-family:times new roman;"><span style="font-size:100%;">This presentation will look at deploying Apache ActiveMQ in the enterprise - for high<span style=""> </span>availibity, </span></p><p class="NoSpacing" style="margin: 0pt 0pt 0pt 36pt;font-family:times new roman;"><span style="font-size:100%;">across wide area networks and how to tune Apache ActiveMQ to for performance<o:p></o:p></span></p> <p class="NoSpacing" style="margin: 0pt 0pt 0pt 36pt;font-family:times new roman;"><span style="font-size:100%;">and scalability.</span><span style="font-size:100%;">“<span style=""> </span></span><span style="font-size:100%;"><o:p></o:p></span></p> <p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR"><br /></span></b></span></p><p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR">11:45</span></b><b style=""><span style="" lang="FR"> - </span></b><b><span lang="FR">Cas client par Sylvain Thomas; Architecte Capgemini</span></b><b><span style="" lang="FR"><o:p></o:p></span></b></span></p> <p class="NoSpacing" style="margin: 0pt 0pt 0pt 36pt; text-indent: -18pt;font-family:times new roman;"><span lang="FR" style="font-size:100%;">-<span style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><span lang="FR" style="font-size:100%;">“</span><span lang="FR" style="font-size:100%;">Recueil de données satellites via FUSE ESB. Mise à disposition de Géo localisations et de<span style=""> </span><o:p></o:p></span></p> <p class="NoSpacing" style="margin: 0pt 0pt 0pt 36pt;font-family:times new roman;"><span lang="FR" style="font-size:100%;"><span style=""> </span>données règlementaires.</span><span style="font-size:100%;">“</span><span lang="FR" style="font-size:100%;"><o:p></o:p></span></p> <p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR"><br /></span></b></span></p><p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR">12:30</span></b><b style=""><span style="" lang="FR"> </span></b><b style=""><span lang="FR">- Déjeuner</span></b><b style=""><span style="" lang="FR"><o:p></o:p></span></b></span></p> <p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR"><br /></span></b></span></p><p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR">13:30</span></b><b style=""><span style="" lang="FR"> </span></b><b style=""><span lang="FR">- Intégration avec Apache Camel par James Strachan; Membre PMC et Co-fondateur</span></b><b style=""><span style="" lang="FR"><o:p></o:p></span></b></span></p> <p class="NoSpacing" style="margin: 0pt 0pt 0pt 36pt; text-indent: -18pt;font-family:times new roman;"><span style="font-size:100%;">-<span style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><span style="font-size:100%;">“</span><span style="font-size:100%;">Apache Camel is a powerful open source integration framework based on Enterprise Integration Patterns with Beans Integration. This presentation will give an overview of Apache Camel and how to implement Enterprise Integration Pattern to solve a number of integration issues.</span><span style="font-size:100%;">“<o:p></o:p></span></p> <p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR"><br /></span></b></span></p><p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR">14:15 - Camel 2.0 et le développement de solutions orientées entreprise par <o:p></o:p></span></b></span></p> <p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR"><span style=""> </span>Charles Moulliard; Apache Camel Committer et Senior Enterprise Architecte<o:p></o:p></span></b></span></p> <p class="NoSpacing" style="margin: 0pt 0pt 0pt 36pt; text-indent: -18pt;font-family:times new roman;"><span lang="FR" style="font-size:100%;">-<span style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><span lang="FR" style="font-size:100%;">“</span><span lang="FR" style="font-size:100%;">Cette présentation va vous donner un aperçu des nouvelles fonctionnalités de Camel 2.0 et comment celles-ci vont aider les architectes/développeurs à construire des solutions orientées entreprises dans un environnement OSGI.</span><span lang="FR" style="font-size:100%;">“<o:p></o:p></span></p> <p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR"><br /></span></b></span></p><p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR">15:00</span></b><b style=""><span style="" lang="FR"> - </span></b><b style=""><span lang="FR">Pause Café</span></b><b style=""><span style="" lang="FR"><o:p></o:p></span></b></span></p> <p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR"><br /></span></b></span></p><p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR">15:15</span></b><b style=""><span style="" lang="FR"> </span></b><b style=""><span lang="FR">- Intégrer JBI et OSGi avec<span style=""> </span>ServiceMix4, JBI Components nouvelles caractéristiques et </span></b><b style=""><span style="" lang="FR"><o:p></o:p></span></b></span></p> <p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR"><span style=""> </span>roadmap par Jean-Baptiste Onofré</span></b><b style=""><span style="" lang="FR"> </span></b><b style=""><span lang="FR">; ServiceMix Commiter<o:p></o:p></span></b></span></p> <p class="NoSpacing" style="margin: 0pt 0pt 0pt 36pt; text-indent: -18pt;font-family:times new roman;"><span lang="FR" style="font-size:100%;">-<span style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><span lang="FR" style="font-size:100%;">“</span><span lang="FR" style="font-size:100%;">Présentation des différentes versions de ServiceMix</span><span lang="FR" style="font-size:100%;">. </span><span lang="FR" style="font-size:100%;">Modularité au sein de ServiceMix4 (kernel </span><span lang="FR" style="font-size:100%;"><o:p></o:p></span></p> <p class="NoSpacing" style="margin: 0pt 0pt 0pt 36pt;font-family:times new roman;"><span lang="FR" style="font-size:100%;"><span style=""> </span>Karaf, NMR, composants). Publication de WSDL pour facilité l'utilisation des composants</span><span lang="FR" style="font-size:100%;">.“<span style=""> </span><o:p></o:p></span></p> <p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR"><br /></span></b></span></p><p class="NoSpacing" style="margin: 0pt;font-family:times new roman;"><span style="font-size:100%;"><b style=""><span lang="FR">16:00</span></b><b style=""><span style="" lang="FR"> </span></b><b style=""><span lang="FR">- Introduction à</span></b><b style=""><span style="" lang="FR"> </span></b><b style=""><span lang="FR">FUSE Integration Designer par James Strachan et Rob Davies <o:p></o:p></span></b></span></p> <p class="MsoPlainText" style="margin: 0pt 0pt 0pt 36pt; text-indent: -18pt;font-family:times new roman;"><span style="font-size:100%;">-<span style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><span style="font-size:100%;">“</span><span style="font-size:100%;">FUSE Integration Designer is an Eclipse tool design to help you create, debug and deploy your integration solutions for Apache Camel, ServiceMix and ActiveMQ.</span><span style="font-size:100%;">“</span><span style="font-size:100%;"><o:p></o:p></span></p> <span style="font-size:100%;"><b style="font-family:times new roman;"><span lang="FR"><br /><span style="font-size:100%;">16:30</span></span></b><span style="font-size:100%;"><b style="font-family:times new roman;"><span style="" lang="FR"> - </span></b></span></span><span style=";font-family:Calibri;font-size:130%;" ><b style=""><span lang="FR">Fermeture de la conférence</span></b></span><br /><span style="font-weight: bold;"><br /></span>cmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com2tag:blogger.com,1999:blog-6232813386336615723.post-82043206725558736172009-06-26T10:10:00.000+02:002009-06-26T10:10:26.674+02:00Don't Use System.out.println! but Log4jHere is the bible when you want/need to configure Log4J. Thanks to Vipan Singla<br /><br /><a href="http://www.vipan.com/htdocs/log4jhelp.html">Don't Use System.out.println!</a>cmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com0tag:blogger.com,1999:blog-6232813386336615723.post-60365062832409931962009-06-24T12:25:00.002+02:002009-06-24T12:33:40.925+02:00OSGi Blueprint ServicesIn this very nice presentation of Guillaume Nodet, you will discovered what is magic behind OSGi Blueprint Services. This implementation who will be part of the next OSGI specification 4.2 will help the Java developer/architect to better design their solutions. The blueprint services are largely inspired from Spring Dynamic Module project but now it becomes a standard like EJB, ... in the past.<br /><br /><br /><div style="width: 425px; text-align: left;" id="__ss_1622424"><a style="margin: 12px 0pt 3px; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; display: block; text-decoration: underline;" href="http://www.slideshare.net/gnodet/osgi-blueprint-services-1622424?type=powerpoint" title="OSGi Blueprint Services">OSGi Blueprint Services</a><object style="margin: 0px;" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=blueprintservices-090622184559-phpapp01&stripped_title=osgi-blueprint-services-1622424"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=blueprintservices-090622184559-phpapp01&stripped_title=osgi-blueprint-services-1622424" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object><div style="font-size: 11px; font-family: tahoma,arial; height: 26px; padding-top: 2px;">View more <a style="text-decoration: underline;" href="http://www.slideshare.net/">Microsoft Word documents</a> from <a style="text-decoration: underline;" href="http://www.slideshare.net/gnodet">gnodet</a>.</div></div>cmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com0tag:blogger.com,1999:blog-6232813386336615723.post-43030461514728546062009-05-05T13:44:00.004+02:002009-05-05T13:48:41.035+02:00Apache Camel / OSGI / Wicket (real example - tutorial part2)I have finalized a first draft of the second part of my tutorial about Camel 2.0 / ServiceMix-Karaf / CXF / OSGI / Apache Wicket<br /><br />The purpose of the second part was to explain how to design a simple project where different concepts like :<br /><ul><li>persistence (Hibernate/spring),</li><li>routing (Apache Camel 2.0),</li><li>mapping between CSV file and objects (using camel-bindy),</li><li> webservices (Apache CXF - OSGI),</li><li> osgi stuffs,</li><li> packaging and deployment on Apache Karaf/ServiceMix OSGI server (features, PAX url),</li><li> web application integration (Apache Wicket, PAX Web)</li></ul>have been addressed.<br /><br />The tutorial has been designed in 4 parts :<br /><br /><ul><li> Part 2a : real example, architecture, project setup, database creation</li><li> Part 2b : transform projects in bundles</li><li> Part 2c : add infrastructure and routing</li><li> Part 2d : web and deployment</li></ul><br />and is available here : <a href="http://cwiki.apache.org/CAMEL/tutorial-osgi-camel-part2.html">http://cwiki.apache.org/CAMEL/tutorial-osgi-camel-part2.html</a><br /><br />Don't hesitate to provide me your remarks/comments to improve it.cmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com6tag:blogger.com,1999:blog-6232813386336615723.post-10973942230060833592009-05-05T13:26:00.005+02:002009-05-05T13:38:03.660+02:00Trick to pass an uri declared in a property file to a Camel routeDefining Camel uris in a file is not so easy. Until now, the only possibility was to create a camel endpoint where the uri was declared in the XML file.<br /><br />Here is a trick who will simplify your life to declare/define the uri in a property file. Spring injection is used to replaced the variable declared in your XML file with the value discovered in the property file.<br /><br />By example, to work with the following uri : file://d:/temp/data/?move=d:/temp/done/${file.name}<br /><br />Remark : as you can see, the uri contains a variable to a Camel variable and in consequence is not a Spring bean. So we have to inform Spring that the variable to be searched in the XML file use another syntax delimiter (#{} instead of ${}).<br /><br />Here is what you have to do<br /><br /><span style="font-weight: bold;">Step 1 : Create org.springframework.beans.factory.config.PropertyPlaceholderConfigurer bean</span><br /><br />Define a PropertyPlaceHolder (using another prefix/suffix delimiter) to avoid conflict between your camel variable and Spring property<br /><br /><pre name="code" class="xml"><br /> <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"><br /> <property name="placeholderPrefix" value="#{"> (1)<br /> <property name="placeholderSuffix" value="}"> (2)<br /> <property name="location" value="classpath:META-INF/spring/org.apache.camel.example.reportincident.routing.properties"> (2)<br /> </property><br /></pre><br />(1) : Define a different prefix instead of ${ which is the value by default and used as variable<br />(2) : Define the value of the suffix. In this case, this is the same as the default value<br /><br /><span style="font-weight:bold;">Step 2 : Create org.apache.camel.example.reportincident.routing.properties</span><br /><br />Create the following file : org.apache.camel.example.reportincident.routing.properties and put it in your classpath. If you plan to deploy your camel route under Apache ServiceMix Kernel --> Apache Karaf, add this file in the META-INF/spring directory by example<br />Add the following property :<br /><br />uriFile=file://d:/temp/data/?move=d:/temp/done/${file.name}<br /><br /><span style="font-weight:bold;">Step 3 : Create an endpoint in your Camel Spring DSL file</span><br /><br />Create a camel endpoint for the uri that you would like to use<br /><br /><br /><pre name="code" class="xml"><br /><camel:endpoint id="fileEndpoint" uri="#{uriFile}"> (1)<br /></pre><br />(1) As you can see, we use as a Spring variable reference the syntax #{} so spring will retrieve the value from the variable declared in the file<br /><br /><span style="font-weight:bold;">Step 4 : Adapt your route</span><br /><br />Define the uri of your route like this :<br /><br /><pre name="code" class="xml"><br /><camel:from ref="fileEndpoint"><br /></pre><br />Cool isn't !!<br /><br /></camel:from></camel:endpoint></property></property></bean>cmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com1tag:blogger.com,1999:blog-6232813386336615723.post-17541478014000921722009-04-22T10:21:00.004+02:002009-04-22T16:48:05.262+02:00Camel Tutorial - OSGI part 1 (UPDATED)I'm currently working on the part of the camel - OSGI tutorial part 2 but I have found the time to update the first part. This was required because I would like to use the maven PAX plugin instead of spring maven plugin and test it against SMX 1.1.0 and Camel 1.6.0.<br /><br />The PAX maven plugin offers a lot of advantages regarding to the one of Spring (which is currently becoming a new tool called - bundlor)<br />- pom.xml file generated only include dependencies, plugin required,<br />- project can be designed with several modules,<br />- project can be tested with <a href="http://wiki.ops4j.org/display/paxexam/Pax+Exam">PAX Exam</a> and launched using <a href="http://wiki.ops4j.org/display/paxrunner/Pax+Runner">PAX runner</a><br />- ...<br /><br />Here is the link to <a href="http://camel.apache.org/tutorial-osgi-camel-part1.html">tutorial</a>cmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com0tag:blogger.com,1999:blog-6232813386336615723.post-74399899650743515142009-04-21T14:42:00.002+02:002009-11-02T12:43:05.516+01:00Distributed OSGi – A Simple ExampleHere is a very interesting article explaining what Distributed OSGI will looks like using implementation done by CXF project. <br /><br /><a href="http://coderthoughts.blogspot.com/2009/02/distributed-osgi-simple-example.html"><coderthoughts />: Distributed OSGi – A Simple Example</a>cmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com0tag:blogger.com,1999:blog-6232813386336615723.post-28583485351088330902009-04-20T12:54:00.003+02:002009-04-20T12:59:17.580+02:00ServiceMix 4 et son kernel OSGi (Xebia France)L' excellente revue Xebia parle de <a href="http://blog.xebia.fr/2009/04/14/revue-de-presse-xebia-104/#ServiceMixetsonkernelOSGi">ServiceMix et Service Mix Kernel</a>. <br /><br />Il est toujours intéressant de constater que des acteurs importants dans la vulgarisation des technologies clés dans les développements Java, ESB s'intéressent à ce projet inovateur, construit sur des fondations solides : Apache Felix, Spring DM et PAX et continue à séduire.cmoulliardhttp://www.blogger.com/profile/06574597725926921707noreply@blogger.com0