<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">

<channel>
	<title>Planet ObjectWeb</title>
	<link>http://planet.objectweb.org/</link>
	<language>en</language>
	<description>Planet ObjectWeb - http://planet.objectweb.org/</description>

<item>
	<title>Orbeon: Keeping your session alive</title>
	<guid>http://www.orbeon.com/blog/2008/01/29/keeping-your-session-alive/</guid>
	<link>http://feeds.feedburner.com/~r/xml-web-apps/~3/225586322/</link>
	<description>&lt;p&gt;
&lt;img width=&quot;240&quot; height=&quot;190&quot; align=&quot;right&quot; alt=&quot;Rotor&quot; src=&quot;http://www.orbeon.com/download/blog/rotor.png&quot; /&gt;
&lt;/p&gt;
	&lt;p&gt;
A couple of weeks ago I attempted to order prints from &lt;a href=&quot;http://www.flickr.com/&quot;&gt;Flickr&lt;/a&gt;. I added a few photos to my cart and was redirected to a service called &lt;a href=&quot;http://www.qoop.com/&quot;&gt;QOOP&lt;/a&gt;. This has a neat interface that allows you organize photos for printing in a book format. I played a bit with the interface and then was caught by other tasks. When I came back to my browser window and attempted to preview the photo album, I got a wonderful error message about a &lt;a href=&quot;http://en.wikipedia.org/wiki/Session_(computer_science)&quot;&gt;session&lt;/a&gt; having expired. The result: my album was lost. I gave up.
&lt;/p&gt;
	&lt;p&gt;
My adventure with expired sessions is quite common and I can bet you have had this kind of issues in the past. The least that can be said about this is that it is not user-friendly!
&lt;/p&gt;
	&lt;p&gt;
To address this kind of issues, we recently introduced a new feature in &lt;a href=&quot;http://www.orbeon.com/&quot;&gt;Orbeon Forms&lt;/a&gt; called the &amp;#8220;session heartbeat&amp;#8221;. The idea is that if you happen to leave a browser window open on your computer, chances are that you will get back to that window and keep using the application. The last thing you want to happen when you come back is lose your session and therefore your data, as happened to me.
&lt;/p&gt;
	&lt;p&gt;
This is not always a correct guess of course: you may just happen to leave a window or tab open without planning to use it again. Conversely you may have a page which is not actually visible, for example in your browser history, yet you will come back to it. This approach wouldn&amp;#8217;t be good for banking applications either. Still, in many situations, such as filling-out large forms, it sounds like a good idea to keep your session alive for open pages.
&lt;/p&gt;
	&lt;p&gt;
To achieve this goal you could make all server sessions longer. However this is harder to configure for the application developer, and this won&amp;#8217;t discriminate between pages that are actually open on a client and the ones that are not. And while it may be ideal to have infinitely long sessions, unfortunately many applications are not ready for this kind of approach.
&lt;/p&gt;
	&lt;p&gt;
So we turned to the idea of implementing a &amp;#8220;session heartbeat&amp;#8221;. Here is how this works:
&lt;/p&gt;
	&lt;ul&gt;
	&lt;li&gt;
	&lt;p&gt;
When this feature is enabled, an open XForms page regularly pings the server through Ajax to keep the current session alive.
&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;
The ping delay is automatically computed based on the server&amp;#8217;s session timeout. The client pings the server at 80% of the session expiration time after the last interaction with the server.
&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;
We are careful not to hit the XForms engine too much, in fact we do a very limited amount of work on the server for each ping, so they should run fast.
&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;
XForms state information for pages hit with the heartbeat just migrates to the &lt;a href=&quot;http://www.orbeon.com/blog/2007/10/29/a-disk-based-xforms-state-store-for-orbeon-forms/&quot;&gt;disk store&lt;/a&gt; over time if RAM is used by other pages, so keeping even large numbers of pages open should not have any negative impact on server RAM.
&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;
When a user gets back to using the page, state information migrates back from disk to RAM, and the page will be live again.
&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;
Sessions do eventually expire as nobody keeps a browser open forever.
&lt;/p&gt;
	&lt;/li&gt;
	&lt;/ul&gt;
	&lt;p&gt;
Note that whenever an application keeps sessions alive for a long time, it is a good idea to keep as little data as possible in the session. The Orbeon Forms XForms engine itself uses a &lt;a href=&quot;http://www.orbeon.com/blog/2007/10/29/a-disk-based-xforms-state-store-for-orbeon-forms/&quot;&gt;global state store&lt;/a&gt; and does not use session objects for storage, but do remember to keep your sessions small!
&lt;/p&gt;
	&lt;p&gt;
Hopefully, this will help prevent many occurrences of the infamous &amp;#8220;session expired&amp;#8221; error message. The beauty of it is that as an Orbeon Forms application developer you don&amp;#8217;t have to worry about anything: the session heartbeat is enabled by default (but it can be turned off globally in &lt;code&gt;properties.xml&lt;/code&gt; or individually for each page).
&lt;/p&gt;
&lt;img src=&quot;http://feeds.feedburner.com/~r/xml-web-apps/~4/225586322&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Tue, 29 Jan 2008 15:36:46 +0000</pubDate>
</item>
<item>
	<title>Christophe Hamerling: Too many open files IOException with large number of Axis2 Servic</title>
	<guid>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=too_many_open_files_ioexception</guid>
	<link>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=too_many_open_files_ioexception</link>
	<description>This is a problem we met in the PEtALS SOAP Binding Component with large number of Axis2 Service Clients.&lt;br /&gt;In this case, this error happens when too many sockets are open ant are waiting to be closed. Even if I have found some JIRAs about this problem and possible solutions, the only one which work for us is to cleanup the connection after each service call.&lt;br /&gt;It is done like this :&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;table id=&quot;zxl6&quot; border=&quot;0&quot; cellpadding=&quot;3&quot; cellspacing=&quot;0&quot; width=&quot;90%&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width=&quot;100%&quot;&gt;   	 	 	 	 	 	 	  &lt;p align=&quot;left&quot;&gt;    &lt;font color=&quot;#000000&quot;&gt;&lt;font&gt;&lt;font size=&quot;2&quot;&gt;...&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align=&quot;left&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;    &lt;font&gt;&lt;font size=&quot;2&quot;&gt;ServiceClient client = &lt;/font&gt;&lt;font color=&quot;#7f0055&quot;&gt;&lt;b&gt;new&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#000000&quot;&gt; ServiceClient(&lt;/font&gt;&lt;font color=&quot;#7f0055&quot;&gt;&lt;b&gt;null&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#000000&quot;&gt;, service);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align=&quot;left&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;    &lt;font&gt;&lt;font size=&quot;2&quot;&gt;Options options = &lt;/font&gt;&lt;font color=&quot;#7f0055&quot;&gt;&lt;b&gt;new&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#000000&quot;&gt; Options();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align=&quot;left&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;    &lt;font&gt;&lt;font size=&quot;2&quot;&gt;...&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align=&quot;left&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;    &lt;font&gt;&lt;font size=&quot;2&quot;&gt;options.setCallTransportCleanup(&lt;/font&gt;&lt;font color=&quot;#7f0055&quot;&gt;&lt;b&gt;true&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#000000&quot;&gt;);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align=&quot;left&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;    &lt;font&gt;&lt;font size=&quot;2&quot;&gt;client.setOptions(options);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align=&quot;left&quot;&gt;&lt;br /&gt; &lt;/p&gt; &lt;p align=&quot;left&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;    &lt;font&gt;&lt;font size=&quot;2&quot;&gt;OMElement outBodyElement = &lt;/font&gt;&lt;font color=&quot;#7f0055&quot;&gt;&lt;b&gt;null&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#000000&quot;&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align=&quot;left&quot;&gt;    &lt;font&gt;&lt;font size=&quot;2&quot;&gt;&lt;font color=&quot;#7f0055&quot;&gt;&lt;b&gt;try&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#000000&quot;&gt; {&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align=&quot;left&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;      &lt;font&gt;&lt;font size=&quot;2&quot;&gt;outBodyElement = serviceClient.sendReceive(soapAction, inBodyElement);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align=&quot;left&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;    &lt;font&gt;&lt;font size=&quot;2&quot;&gt;} &lt;/font&gt;&lt;font color=&quot;#7f0055&quot;&gt;&lt;b&gt;catch&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#000000&quot;&gt; (AxisFault e) {&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align=&quot;left&quot;&gt;      &lt;font&gt;&lt;font size=&quot;2&quot;&gt;&lt;font color=&quot;#7f0055&quot;&gt;&lt;b&gt;throw&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#000000&quot;&gt; e;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align=&quot;left&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;    &lt;font&gt;&lt;font size=&quot;2&quot;&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt; 	 	 	 	 	 	&lt;br /&gt;After 10 minutes test with 200 threads creating 'one shot ' ServiceClient and almost 275000 service calls, all worked fine.&lt;br /&gt;</description>
	<pubDate>Sun, 27 Jan 2008 23:50:23 +0000</pubDate>
</item>
<item>
	<title>Christophe Hamerling: Going to JavaPolis 07</title>
	<guid>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=going_to_javapolis_07</guid>
	<link>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=going_to_javapolis_07</link>
	<description>See you next week JavaPolis '07 on the &lt;a title=&quot;OW2 Consortium&quot; target=&quot;_blank&quot; href=&quot;http://www.ow2.org&quot; id=&quot;gzhr&quot;&gt;OW2 Consortium&lt;/a&gt; booth to talk about and make some 'demos' of the &lt;a title=&quot;PEtALS Enterprise Service Bus&quot; target=&quot;_blank&quot; href=&quot;http://petals.ow2.org&quot; id=&quot;dqui&quot;&gt;PEtALS Enterprise Service Bus&lt;/a&gt; project.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description>
	<pubDate>Sun, 27 Jan 2008 23:50:23 +0000</pubDate>
</item>
<item>
	<title>Christophe Hamerling: PEtALS Standalone 1.4.3</title>
	<guid>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=petals_standalone_1_4_3</guid>
	<link>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=petals_standalone_1_4_3</link>
	<description>PEtALS Standalone platform 1.4.3 is out. This is a maintenance release.&lt;br /&gt;&lt;a name=&quot;041207&quot;&gt;Look at the &lt;/a&gt;&lt;a title=&quot;release notes&quot; target=&quot;_blank&quot; href=&quot;http://petals.objectweb.org/releasenotes.html#1.4.3&quot; id=&quot;r2fr&quot;&gt;release notes&lt;/a&gt; for more details.&lt;br /&gt;&lt;br /&gt;</description>
	<pubDate>Sun, 27 Jan 2008 23:50:23 +0000</pubDate>
</item>
<item>
	<title>Christophe Hamerling: CIMERO2 Editor for PEtALS ESB</title>
	<guid>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=cimero2_editor_for_petals_esb</guid>
	<link>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=cimero2_editor_for_petals_esb</link>
	<description>The &lt;a href=&quot;http://wiki.eclipse.org/Cimero_2&quot; id=&quot;l8f9&quot; target=&quot;_blank&quot; title=&quot;CIMERO2&quot;&gt;CIMERO2&lt;/a&gt; editor is an Eclipse plugin originally developed by &lt;a href=&quot;http://www.bull.com/fr/index.php&quot; id=&quot;eb_p&quot; target=&quot;_blank&quot; title=&quot;Bull&quot;&gt;Bull&lt;/a&gt;. This plugin provides features to create a visual representation of your Enterprise Service Bus based architecture. After the design step, the plugin offers the possibility to generate the JBI artifacts (Service Assemblies), and the Ant deployment scripts which will be used to deploy the configuration on the ESB. &lt;div&gt;   We, at &lt;a href=&quot;http://www.ebmwebsourcing.com&quot; id=&quot;ua3f&quot; target=&quot;_blank&quot; title=&quot;eBM WebSourcing&quot;&gt;eBM WebSourcing&lt;/a&gt;, are currently working on better integration of the PEtALS JBI components. You can find a Flash demonstration on how we you can use this plugin on the PEtALS project website &lt;a href=&quot;http://petals.objectweb.org/demonstrations.html&quot; id=&quot;vl4g&quot; target=&quot;_blank&quot; title=&quot;demonstration page&quot;&gt;demonstration page&lt;/a&gt;. &lt;/div&gt; &lt;div&gt;   &lt;br class=&quot;webkit-block-placeholder&quot; /&gt; &lt;/div&gt; &lt;div&gt;   Finally, it is good to notice that this plugin is currently under integration into the Eclipse SOA Tools Platform project (&lt;a href=&quot;http://www.eclipse.org/stp/&quot; id=&quot;vt6k&quot; target=&quot;_blank&quot; title=&quot;Eclipse STP&quot;&gt;Eclipse STP&lt;/a&gt;). &lt;/div&gt; &lt;div&gt;   &lt;br class=&quot;webkit-block-placeholder&quot; /&gt; &lt;/div&gt; &lt;div&gt;   &lt;div id=&quot;d:5w&quot;&gt;     &lt;img src=&quot;http://docs.google.com/File?id=dcrqrprg_151cswjf2g5&quot; /&gt;   &lt;/div&gt; &lt;/div&gt; &lt;br /&gt; &lt;br /&gt;</description>
	<pubDate>Sun, 27 Jan 2008 23:50:23 +0000</pubDate>
</item>
<item>
	<title>Christophe Hamerling: Installing SVN Client on Mac OSX</title>
	<guid>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=installing_svn_client_on_mac</guid>
	<link>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=installing_svn_client_on_mac</link>
	<description>&lt;div&gt;   I am happy to see that Fink (&lt;a href=&quot;http://finkproject.org/&quot; target=&quot;_blank&quot; title=&quot;&quot;&gt;http://finkproject.org/&lt;/a&gt;) is no more needed to easily install a Subversion client on Mac OSX. A client has been packaged by this guy Martin Ott (&lt;a href=&quot;http://homepage.mac.com/martinott/&quot; target=&quot;_blank&quot; title=&quot;&quot;&gt;http://homepage.mac.com/martinott/&lt;/a&gt;). &lt;/div&gt; &lt;div&gt;   Installation done by clicking on the package... &lt;/div&gt; &lt;div&gt;   &lt;br class=&quot;webkit-block-placeholder&quot; /&gt; &lt;/div&gt; &lt;div&gt;   I am also happy to see that there is a Subversion GUI client for OSX. Working with terminal is cool but sometimes clicking on the mouse is not so bad... &lt;/div&gt; &lt;div&gt;   You can found this client on 'La chose interactive' website (&lt;a href=&quot;http://www.lachoseinteractive.net/fr/communaute/subversion/&quot; target=&quot;_blank&quot; title=&quot;&quot;&gt;http://www.lachoseinteractive.net/fr/communaute/subversion/&lt;/a&gt;). &lt;/div&gt; &lt;div&gt;   &lt;br class=&quot;webkit-block-placeholder&quot; /&gt; &lt;/div&gt; Configuration seems very intuitive... Going to test it for PEtALS project...&lt;br /&gt; &lt;div id=&quot;wdxn&quot;&gt;   &lt;a href=&quot;http://www.ebmwebsourcing.com/blog/rss/File?id=dcrqrprg_147h96n3pmf&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://docs.google.com/File?id=dcrqrprg_147h96n3pmf&quot; /&gt;&lt;/a&gt; &lt;/div&gt; &lt;br /&gt;</description>
	<pubDate>Sun, 27 Jan 2008 23:50:23 +0000</pubDate>
</item>
<item>
	<title>Christophe Hamerling: PEtALS PACK 2.0</title>
	<guid>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=petals_pack_2_0</guid>
	<link>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=petals_pack_2_0</link>
	<description>&lt;span&gt;Friday (evening) September 28th 2007&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;img align=&quot;bottom&quot; alt=&quot;&quot; border=&quot;0&quot; hspace=&quot;0&quot; src=&quot;http://writer.zoho.com:80/ImageDisplay.im?name=petals20.png&amp;amp;accId=85091000000002007&quot; vspace=&quot;0&quot; /&gt;&lt;br /&gt; &lt;/div&gt; &lt;br /&gt;&lt;span&gt;PEtALS ESB 2.0 is finally out!&lt;/span&gt;&lt;br /&gt;&lt;span&gt;It is released at the same time as a 'pack' including all new/compatible modules which have been developed since months.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;These modules are :&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The PEtALS kernel 2.0&lt;/li&gt;&lt;li&gt;A new Web Console for monitoring and administration&lt;/li&gt;&lt;li&gt;The Component Development Kit 3.0 : Library and tools for easily and rapidly create JBI compliant components.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;A collection of JBI compliant components (including new ones like XMPP, HTTP binding components, EIP, RMI Service Engines)&lt;/li&gt;&lt;li&gt;An Eclipse plugin for JBI artifacts development and administration&lt;/li&gt;&lt;li&gt;Docbook based documentation&lt;/li&gt;&lt;li&gt;Brand new website &amp;amp; logo&lt;/li&gt;&lt;/ul&gt;&lt;span&gt;Complete release note will be available on the &lt;/span&gt;&lt;a href=&quot;http://petals.objectweb.org&quot;&gt;PEtALS Website&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description>
	<pubDate>Sun, 27 Jan 2008 23:50:23 +0000</pubDate>
</item>
<item>
	<title>Christophe Hamerling: PEtALS last week releases</title>
	<guid>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=petals_last_week_releases</guid>
	<link>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=petals_last_week_releases</link>
	<description>We have done some releases last week :&lt;br /&gt;    &lt;br /&gt;    1. petals-standalone 1.4 :&lt;br /&gt;    &amp;nbsp;&amp;nbsp;&amp;nbsp; - Integration of a faster message transporter (Dream based)&lt;br /&gt;    &amp;nbsp;&amp;nbsp;&amp;nbsp; - Load balancing&lt;br /&gt;    &amp;nbsp;&amp;nbsp;&amp;nbsp; - Robustness&lt;br /&gt;    &amp;nbsp;&amp;nbsp;&amp;nbsp; - and of course several bug fixes and code optimization&lt;br /&gt;    &lt;br /&gt;    2. petals-component-framework 2.0 :&lt;br /&gt;    &amp;nbsp;&amp;nbsp;&amp;nbsp; - This framework replaces the Component Development Kit (also known  as CDK). It allows developers to quickly create powerful JBI components.&lt;br /&gt;    &lt;br /&gt;    3. petals-bc-soap 2.0 :&lt;br /&gt;    &amp;nbsp;&amp;nbsp;&amp;nbsp; - Based on the petals-component-framework.&lt;br /&gt;    &amp;nbsp;&amp;nbsp;&amp;nbsp; - WS security&lt;br /&gt;    &amp;nbsp;&amp;nbsp;&amp;nbsp; - WS notification&lt;br /&gt;    &lt;br /&gt;    Zip archives and documentation are available for download on the &lt;a href=&quot;http://forge.objectweb.org/project/showfiles.php?group_id=213&quot;&gt;PEtALS  downloads page&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href=&quot;http://petals.objectweb.org&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://writer.zoho.com:80/ImageDisplay.im?name=logo-petals-small.png&amp;amp;accId=85091000000002007&quot; align=&quot;bottom&quot; border=&quot;0&quot; hspace=&quot;0&quot; vspace=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;</description>
	<pubDate>Sun, 27 Jan 2008 23:50:23 +0000</pubDate>
</item>
<item>
	<title>Christophe Hamerling: Road to PEtALS 2.0</title>
	<guid>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=road_to_petals_2_0</guid>
	<link>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=road_to_petals_2_0</link>
	<description>&lt;a href=&quot;http://petals.objectweb.org&quot;&gt;PEtALS&lt;/a&gt; 2.0 is on the way. The beta version will be out in few weeks with cool features :&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Eclipse plugin for development, test and integration&lt;/li&gt;&lt;li&gt;Multi-transporter with Dream for synchronous communication and Joram for asynchronous communication&lt;/li&gt;&lt;li&gt;RMI client for direct access to the bus API&lt;/li&gt;&lt;li&gt;UDDI registry Service Engine&lt;/li&gt;&lt;li&gt;EIP Service Engine&lt;/li&gt;&lt;li&gt;Enhanced SOAP Binding Component&lt;/li&gt;&lt;li&gt;Component Development Kit 2.0&lt;/li&gt;&lt;li&gt;JBOSS integration&lt;/li&gt;&lt;li&gt;Failure management / load balancing&lt;/li&gt;&lt;li&gt;Large deployment with Fractal Deployment Framework&lt;/li&gt;&lt;li&gt;Performance optimisations&lt;/li&gt;&lt;li&gt;Enhancements in monitoring tool&lt;/li&gt;&lt;li&gt;New docbook documentation&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description>
	<pubDate>Sun, 27 Jan 2008 23:50:23 +0000</pubDate>
</item>
<item>
	<title>Christophe Hamerling: PEtALS Azalee Pack</title>
	<guid>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=petals_azalee_pack</guid>
	<link>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=petals_azalee_pack</link>
	<description>The &lt;font size=&quot;4&quot;&gt;&lt;span&gt;PE&lt;span&gt;t&lt;/span&gt;ALS&lt;/span&gt;&lt;/font&gt; Azalée Pack is finally out. It includes all the latest stable versions of project artefacts.&lt;br /&gt;You can download it &lt;a href=&quot;http://forge.objectweb.org/project/download.php?group_id=213&amp;amp;file_id=8403&quot;&gt;here&lt;/a&gt; and get release note &lt;a href=&quot;http://petals.objectweb.org&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt; Technorati Tags &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://technorati.com/tag/open&quot; rel=&quot;tag&quot;&gt;open&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tag/source&quot; rel=&quot;tag&quot;&gt;source&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tag/petals&quot; rel=&quot;tag&quot;&gt;petals&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tag/jbi&quot; rel=&quot;tag&quot;&gt;jbi&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tag/soa&quot; rel=&quot;tag&quot;&gt;soa&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tag/esb&quot; rel=&quot;tag&quot;&gt;esb&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tag/webservices&quot; rel=&quot;tag&quot;&gt;webservices&lt;/a&gt;</description>
	<pubDate>Sun, 27 Jan 2008 23:50:23 +0000</pubDate>
</item>
<item>
	<title>Christophe Hamerling: PEtALS community news - May</title>
	<guid>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=petals_community_news_may</guid>
	<link>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=petals_community_news_may</link>
	<description>&lt;p&gt;&lt;font size=&quot;2&quot;&gt;PEtALS news #1, 2007 May 16th&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;The PEtALS community is growing. Thanks to everyone for the interest you give to the project. Here is the first newsletter dedicated to this great project... &lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;Releases and more&lt;/font&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;Core release 1.3 has been delayed and is now planned by the end of the month. Finally, we will release what we call a PEtALS Pack. This pack includes all the latest stable versions of PEtALS modules.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;We have especially worked on :&lt;/font&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;New fractal (A component framework) architecture&lt;/font&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;Add static JNDI configuration : You can now define you PEtALS network topology&lt;/font&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;Lot of refactoring&lt;/font&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;Stability and bug fixes&lt;/font&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;A new component is available on the objectweb forge : The &lt;a href=&quot;http://wiki.petals.objectweb.org/xwiki/bin/view/Components.Binding/FTP&quot;&gt;FTP&lt;/a&gt; binding component.&lt;/font&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;CDK 1.3 has been released on April the 25th 2007. It includes new configuration features through JMX during component installation.&lt;/font&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;More information on the future release note...&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;Main developments&lt;/font&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;Marie Sauvage (&lt;/font&gt;&lt;font size=&quot;2&quot;&gt;eBM WebSourcing&lt;/font&gt;&lt;font size=&quot;2&quot;&gt;) is working on the next version of the web administration tool. It will include lot of features to manage and administrate all the platform through a nice interface.&lt;/font&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;Nicolas Salatge &lt;/font&gt;&lt;font size=&quot;2&quot;&gt;(&lt;/font&gt;&lt;font size=&quot;2&quot;&gt;eBM WebSourcing&lt;/font&gt;&lt;font size=&quot;2&quot;&gt;)&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; who has joined the developers team since a couple of months, has just completed the new PEtALS 'Fractalization'. Most of PEtALS modules are now Fractal components.&lt;/font&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;Dong Zhao has developped an OSGI version of PEtALS. This will allow to run PEtALS on any OSGI implementation (JOnAS5 and &lt;a href=&quot;http://wiki.petals.objectweb.org/xwiki/bin/view/Contribution/OSGI&quot;&gt;more&lt;/a&gt;...)&lt;/font&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;An eclipse plugin is under validation process. It will be available soon.&lt;/font&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;We are improving the CDK features again and again&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;font size=&quot;2&quot;&gt;Guillaume Decarnin (Openwide) is working on csv, xquare and forward components. These components will be soon based on the new CDK.&lt;br /&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;Documentation&lt;/font&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;Each module will soon have its own mini site (maven generated) in replacement of the wiki pages which are a little boring...&lt;/font&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;We are also working on a new user guide based on DocBook tools.&lt;/font&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;Others&lt;/font&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;A flash version of the travel agency demo of available &lt;a href=&quot;http://wiki.petals.objectweb.org/xwiki/bin/download/Documentation/Article/travel_agency_demo_en.swf&quot;&gt;here&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;Artefacts are now available to the maven community on the objectweb maven repository http://maven.objectweb.org&lt;/font&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;&lt;br /&gt;Please do not hesitate to send your comments, ideas, and more...&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt; Technorati Tags &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://technorati.com/tag/news&quot; rel=&quot;tag&quot;&gt;news&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tag/petals&quot; rel=&quot;tag&quot;&gt;petals&lt;/a&gt;</description>
	<pubDate>Sun, 27 Jan 2008 23:50:23 +0000</pubDate>
</item>
<item>
	<title>Christophe Hamerling: Creating fully compatible JBI components</title>
	<guid>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=creating_fully_compatible_jbi_components</guid>
	<link>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=creating_fully_compatible_jbi_components</link>
	<description>As JBI container developers (&lt;a href=&quot;http://petals.objectweb.org&quot;&gt;PEtALS&lt;/a&gt;), we have created a framework which allows developers to easily create JBI components.&lt;br /&gt;&lt;br /&gt;This &lt;span&gt;C&lt;/span&gt;omponent &lt;span&gt;D&lt;/span&gt;evelopment &lt;span&gt;K&lt;/span&gt;it (also called PEtALS CDK) is based on the JBI specification and allows to create components which are 100% compatible with the JBI specification. In other words, you can use the CDK to create components that can be installed on &lt;span&gt;all&lt;/span&gt; JBI implementations.&lt;br /&gt;&lt;br /&gt;Note that most of the PEtALS components (Service Engines and Binding Components) are based on this CDK.&lt;br /&gt;An online documentation is available on the projet wiki &lt;a href=&quot;http://wiki.petals.objectweb.org/xwiki/bin/view/Components.CommonLibrairies/&quot;&gt;here&lt;/a&gt; and you can download the CDK &lt;a href=&quot;http://forge.objectweb.org/project/showfiles.php?group_id=213&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt; Technorati Tags &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://technorati.com/tag/petals&quot; rel=&quot;tag&quot;&gt;petals&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tag/jbi&quot; rel=&quot;tag&quot;&gt;jbi&lt;/a&gt;</description>
	<pubDate>Sun, 27 Jan 2008 23:50:23 +0000</pubDate>
</item>
<item>
	<title>Christophe Hamerling: Implementing the DynamicMBean interface</title>
	<guid>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=implementing_the_dynamicmbean_interface</guid>
	<link>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=implementing_the_dynamicmbean_interface</link>
	<description>&lt;h1&gt;    Implementing DynamicMBean interface&lt;br /&gt;  &lt;/h1&gt;  &lt;h2&gt;    Introduction  &lt;/h2&gt;    Using JMX (Java Management eXtensions) to manage part of your  application is a great java feature. The standard Mbeans mechanisms  which consist of creating a class which implements an MBean interface  is quite simple and already allows to manage most of your application.&lt;br /&gt;  In this article, I will describe how can we implements the DynamicMBean  interface to do more 'complex' things. Especially, we will look on how  we can we expose and modify a set of properties, and how can we expose  methods by specifiing their names (The java code will be more clear  than my poor english).&lt;br /&gt;  &lt;br /&gt;  The following examples are taken from the work I have done on the &lt;a href=&quot;http://petals.objectweb.org/&quot;&gt;PEtALS&lt;/a&gt; CDK (Component Development Kit) in order to expose a set of JBI extensions and bootstrap methods for management.&lt;br /&gt;  &lt;h2&gt;    How to expose a set of properties?  &lt;/h2&gt;  The standards MBeans automatically expose the setters and getters  methods as MBean attributes. Imagine that you have a set of properties  (a HashMap/Properties...). How can you manage this object, how can you  change a value in the set? Simply by creating an implementation of the  DynamicMBean interface.&lt;br /&gt;  &lt;br /&gt;  The following code snippet shows how we can do such a thing.&lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;  &lt;table summary=&quot;&quot; border=&quot;1&quot; cellpadding=&quot;7&quot; cellspacing=&quot;&quot; frame=&quot;box&quot; rules=&quot;all&quot;&gt;    &lt;tbody&gt;    &lt;tr&gt;      &lt;td valign=&quot;top&quot;&gt;        &lt;pre&gt;    &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;/*&lt;br /&gt;     * (non-Javadoc)&lt;br /&gt;     * &lt;br /&gt;     * @see javax.management.DynamicMBean#getAttribute(java.lang.String)&lt;br /&gt;     */&lt;/font&gt;&lt;/i&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;public&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;synchronized&lt;/font&gt;&lt;/b&gt; Object getAttribute(String attribute)&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;throws&lt;/font&gt;&lt;/b&gt; AttributeNotFoundException, MBeanException, ReflectionException {&lt;br /&gt;&lt;br /&gt;        String value = managedBootstrap.getComponentPropertiesManager()&lt;br /&gt;            .getProperties().getProperty(attribute);&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;if&lt;/font&gt;&lt;/b&gt; (value != &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;            &amp;amp;&amp;amp; !value&lt;br /&gt;                .startsWith(ComponentPropertiesManager.MANAGED_METHOD_PREFIX)) {&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;return&lt;/font&gt;&lt;/b&gt; value;&lt;br /&gt;        } &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;else&lt;/font&gt;&lt;/b&gt; {&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;throw&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; AttributeNotFoundException(&lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot;Attribute '&quot;&lt;/b&gt;&lt;/font&gt; + attribute&lt;br /&gt;                + &lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot;' does not exists&quot;&lt;/b&gt;&lt;/font&gt;);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;/*&lt;br /&gt;     * (non-Javadoc)&lt;br /&gt;     * &lt;br /&gt;     * @see javax.management.DynamicMBean#getAttributes(java.lang.String[])&lt;br /&gt;     */&lt;/font&gt;&lt;/i&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;public&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;synchronized&lt;/font&gt;&lt;/b&gt; AttributeList getAttributes(String[] attributes) {&lt;br /&gt;        AttributeList list = &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; AttributeList();&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;for&lt;/font&gt;&lt;/b&gt; (String name : attributes) {&lt;br /&gt;            String value = managedBootstrap.getComponentPropertiesManager()&lt;br /&gt;                .getProperties().getProperty(name);&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;if&lt;/font&gt;&lt;/b&gt; (value != &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;                &amp;amp;&amp;amp; !value&lt;br /&gt;                    .startsWith(ComponentPropertiesManager.MANAGED_METHOD_PREFIX))&lt;br /&gt;                list.add(&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; Attribute(name, value));&lt;br /&gt;        }&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;return&lt;/font&gt;&lt;/b&gt; list;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;/*&lt;br /&gt;     * (non-Javadoc)&lt;br /&gt;     * &lt;br /&gt;     * @see javax.management.DynamicMBean#setAttribute(javax.management.Attribute)&lt;br /&gt;     */&lt;/font&gt;&lt;/i&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;public&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;synchronized&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;void&lt;/font&gt;&lt;/b&gt; setAttribute(Attribute attribute)&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;throws&lt;/font&gt;&lt;/b&gt; AttributeNotFoundException, InvalidAttributeValueException,&lt;br /&gt;        MBeanException, ReflectionException {&lt;br /&gt;        String name = attribute.getName();&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;if&lt;/font&gt;&lt;/b&gt; (managedBootstrap.getComponentPropertiesManager().getProperties()&lt;br /&gt;            .getProperty(name) == &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;) {&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;throw&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; AttributeNotFoundException(name);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        Object value = attribute.getValue();&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;if&lt;/font&gt;&lt;/b&gt; (!(value &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;instanceof&lt;/font&gt;&lt;/b&gt; String)) {&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;throw&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; InvalidAttributeValueException(&lt;br /&gt;                &lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot;Attribute value not a string: &quot;&lt;/b&gt;&lt;/font&gt; + value);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;// set the property and save the properties file&lt;br /&gt;&lt;/font&gt;&lt;/i&gt;        managedBootstrap.getComponentPropertiesManager().getProperties()&lt;br /&gt;            .setProperty(name, (String) value);&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;try&lt;/font&gt;&lt;/b&gt; {&lt;br /&gt;            save();&lt;br /&gt;        } &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;catch&lt;/font&gt;&lt;/b&gt; (IOException e) {&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;throw&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; MBeanException(e);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;/*&lt;br /&gt;     * (non-Javadoc)&lt;br /&gt;     * &lt;br /&gt;     * @see javax.management.DynamicMBean#setAttributes(javax.management.AttributeList)&lt;br /&gt;     */&lt;/font&gt;&lt;/i&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;public&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;synchronized&lt;/font&gt;&lt;/b&gt; AttributeList setAttributes(AttributeList list) {&lt;br /&gt;        AttributeList result = &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; AttributeList();&lt;br /&gt;&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;for&lt;/font&gt;&lt;/b&gt; (Object object : list) {&lt;br /&gt;            Attribute attr = (Attribute) object;&lt;br /&gt;            String name = attr.getName();&lt;br /&gt;            Object value = attr.getValue();&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;if&lt;/font&gt;&lt;/b&gt; (managedBootstrap.getComponentPropertiesManager()&lt;br /&gt;                .getProperties().getProperty(name) != &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;                &amp;amp;&amp;amp; value &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;instanceof&lt;/font&gt;&lt;/b&gt; String) {&lt;br /&gt;                managedBootstrap.getComponentPropertiesManager()&lt;br /&gt;                    .getProperties().setProperty(name, (String) value);&lt;br /&gt;                result.add(&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; Attribute(name, value));&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;try&lt;/font&gt;&lt;/b&gt; {&lt;br /&gt;            save();&lt;br /&gt;        } &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;catch&lt;/font&gt;&lt;/b&gt; (IOException e) {&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;return&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; AttributeList();&lt;br /&gt;        }&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;return&lt;/font&gt;&lt;/b&gt; result;&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;      &lt;/td&gt;    &lt;/tr&gt;    &lt;/tbody&gt;  &lt;/table&gt;  &lt;br /&gt;  The previous methods are the ones which are called by the JMX  implementation for management. In our case it is quite simple since a  property entry is directly mapped into an attribute...&lt;br /&gt;  &lt;br /&gt;  Note 1 : The managedBootstrap attribute is a class which contains a Properties object.&lt;br /&gt;  Note 2 : We persist the properties in a file each time a property is modified.&lt;br /&gt;  &lt;br /&gt;  In order to expose these attributes, we will see later that we need to  create a set of MBeanAttributeInfo that will be used by the  getMBeanInfo method to create the information object used by JMX to  expose all of this.&lt;br /&gt;  &lt;br /&gt;  &lt;table summary=&quot;&quot; border=&quot;1&quot; cellpadding=&quot;7&quot; cellspacing=&quot;&quot; frame=&quot;box&quot; rules=&quot;all&quot;&gt;    &lt;tbody&gt;    &lt;tr&gt;      &lt;td valign=&quot;top&quot;&gt;        &lt;pre&gt;    &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;/**&lt;br /&gt;     * Dynamically get attributes for the MBean. The attributes are the ones&lt;br /&gt;     * from the properties file.&lt;br /&gt;     * &lt;br /&gt;     * @return&lt;br /&gt;     */&lt;/font&gt;&lt;/i&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;protected&lt;/font&gt;&lt;/b&gt; MBeanAttributeInfo[] getAttributesInfos() {&lt;br /&gt;        &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;// get the attributes names as sorted strings&lt;br /&gt;&lt;/font&gt;&lt;/i&gt;        Set&amp;lt;String&amp;gt; attributeKeys = managedBootstrap&lt;br /&gt;            .getComponentPropertiesManager().getExposedAttributeKeys();&lt;br /&gt;&lt;br /&gt;        &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;// build the MBeanAttributeInfo&lt;br /&gt;&lt;/font&gt;&lt;/i&gt;        MBeanAttributeInfo[] attrs = &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; MBeanAttributeInfo[attributeKeys&lt;br /&gt;            .size()];&lt;br /&gt;        Iterator&amp;lt;String&amp;gt; it = attributeKeys.iterator();&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;for&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;int&lt;/font&gt;&lt;/b&gt; i = 0; i &amp;lt; attrs.length; i++) {&lt;br /&gt;            String name = it.next();&lt;br /&gt;            attrs[i] = &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; MBeanAttributeInfo(name, &lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot;java.lang.String&quot;&lt;/b&gt;&lt;/font&gt;,&lt;br /&gt;                &lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot;Property &quot;&lt;/b&gt;&lt;/font&gt; + name, &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;true&lt;/font&gt;&lt;/b&gt;, &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;true&lt;/font&gt;&lt;/b&gt;, &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;false&lt;/font&gt;&lt;/b&gt;);&lt;br /&gt;        }&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;return&lt;/font&gt;&lt;/b&gt; attrs;&lt;br /&gt;    }&lt;/pre&gt;      &lt;/td&gt;    &lt;/tr&gt;    &lt;/tbody&gt;  &lt;/table&gt;  &lt;br /&gt;  &lt;code&gt;&lt;/code&gt;&lt;h2&gt;How to expose a set of methods?&lt;/h2&gt;&lt;h3&gt;Building the MBeanInfo&lt;/h3&gt;In  the previous chapter, I have introduced how we can dynamically expose  properties. Now we will focus on how we can choose the methods to  expose through JMX. There are several methods to do this. Here I have  choosen to expose only the public methods that are programatically  defined in a list. I have choosen this simple way to allow the  component developer to simply define the methods he wants to expose by  returning a list of methods names... Simple and efficient!&lt;br /&gt;&lt;br /&gt;  &lt;table summary=&quot;&quot; border=&quot;1&quot; cellpadding=&quot;7&quot; cellspacing=&quot;&quot; frame=&quot;box&quot; rules=&quot;all&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;        &lt;pre&gt;    &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;/**&lt;br /&gt;     * Dynamically get the operations for the MBean. The operations are defined&lt;br /&gt;     * in the properties manager with a special prefix.&lt;br /&gt;     * &lt;br /&gt;     * @return&lt;br /&gt;     */&lt;/font&gt;&lt;/i&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;protected&lt;/font&gt;&lt;/b&gt; MBeanOperationInfo[] getOperationsInfos() {&lt;br /&gt;        List&amp;lt;String&amp;gt; methods = managedBootstrap.getComponentPropertiesManager()&lt;br /&gt;            .getExposedMethodNames();&lt;br /&gt;        MBeanOperationInfo[] result = &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;;&lt;br /&gt;&lt;br /&gt;        List&amp;lt;MBeanOperationInfo&amp;gt; operations = &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; ArrayList&amp;lt;MBeanOperationInfo&amp;gt;();&lt;br /&gt;        Method methodList[] = managedBootstrap.getClass().getMethods();&lt;br /&gt;&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;for&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;int&lt;/font&gt;&lt;/b&gt; i = 0; i &amp;lt; methodList.length; i++) {&lt;br /&gt;            Method method = methodList[i];&lt;br /&gt;            String name = method.getName();&lt;br /&gt;&lt;br /&gt;            &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;// add method if it has been defined by the user&lt;br /&gt;&lt;/font&gt;&lt;/i&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;if&lt;/font&gt;&lt;/b&gt; (methods.contains(name)) {&lt;br /&gt;                MBeanOperationInfo oper = &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; MBeanOperationInfo(&lt;br /&gt;                    &lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot;Operation description&quot;&lt;/b&gt;&lt;/font&gt;, method);&lt;br /&gt;                operations.add(oper);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        result = &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; MBeanOperationInfo[operations.size()];&lt;br /&gt;        operations.toArray(result);&lt;br /&gt;&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;return&lt;/font&gt;&lt;/b&gt; result;&lt;br /&gt;    }&lt;/pre&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;This time again, we are are creating a  set of MBeanOperationInfo from a list methods names. We retrieve the  methods from the class we want to manage from the managedBootstrap  class by reflection.&lt;br /&gt;  &lt;br /&gt;  This method will be then used to create the MBeanInfo that is returned by the method getMBeanInfo:&lt;br /&gt;  &lt;br /&gt;  &lt;table summary=&quot;&quot; border=&quot;1&quot; cellpadding=&quot;7&quot; cellspacing=&quot;&quot; frame=&quot;box&quot; rules=&quot;all&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;        &lt;pre&gt;    &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;/*&lt;br /&gt;     * (non-Javadoc)&lt;br /&gt;     * &lt;br /&gt;     * @see javax.management.DynamicMBean#getMBeanInfo()&lt;br /&gt;     */&lt;/font&gt;&lt;/i&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;public&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;synchronized&lt;/font&gt;&lt;/b&gt; MBeanInfo getMBeanInfo() {&lt;br /&gt;        &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;// get the attributes&lt;br /&gt;&lt;/font&gt;&lt;/i&gt;        MBeanAttributeInfo[] attrs = getAttributesInfos();&lt;br /&gt;        &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;// get the operations&lt;br /&gt;&lt;/font&gt;&lt;/i&gt;        MBeanOperationInfo[] opps = getOperationsInfos();&lt;br /&gt;&lt;br /&gt;        &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;// create MBeanInfo with no constructors and no notifications&lt;br /&gt;&lt;/font&gt;&lt;/i&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;return&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; MBeanInfo(&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;this&lt;/font&gt;&lt;/b&gt;.getClass().getName(),&lt;br /&gt;            &lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot;Property Manager MBean&quot;&lt;/b&gt;&lt;/font&gt;, attrs, &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;, opps, &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;);&lt;br /&gt;    }&lt;/pre&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3&gt;Invoking a method&lt;/h3&gt;Doing java reflection is out of this article scope. Have a look on the implementation to see how it is done.&lt;br /&gt;  &lt;h2&gt;Complete implementation&lt;/h2&gt;&lt;br /&gt;&lt;table summary=&quot;&quot; border=&quot;1&quot; cellpadding=&quot;7&quot; cellspacing=&quot;&quot; frame=&quot;box&quot; rules=&quot;all&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;&lt;pre&gt;&lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;/**&lt;br /&gt; * PETALS - PETALS Services Platform.&lt;br /&gt; * Copyright (c) 2007 EBM Websourcing, http://www.ebmwebsourcing.com/&lt;br /&gt; *&lt;br /&gt; * This library is free software; you can redistribute it and/or&lt;br /&gt; * modify it under the terms of the GNU Lesser General Public&lt;br /&gt; * License as published by the Free Software Foundation; either&lt;br /&gt; * version 2.1 of the License, or (at your option) any later version.&lt;br /&gt; * This library is distributed in the hope that it will be useful,&lt;br /&gt; * but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU&lt;br /&gt; * Lesser General Public License for more details.&lt;br /&gt; *&lt;br /&gt; * You should have received a copy of the GNU Lesser General Public&lt;br /&gt; * License along with this library; if not, write to the Free Software&lt;br /&gt; * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA&lt;br /&gt; *&lt;br /&gt; * -------------------------------------------------------------------------&lt;br /&gt; * $Id$&lt;br /&gt; * -------------------------------------------------------------------------&lt;br /&gt; */&lt;/font&gt;&lt;/i&gt;&lt;br /&gt;&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;package&lt;/font&gt;&lt;/b&gt; org.objectweb.petals.component.common;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;import&lt;/font&gt;&lt;/b&gt; java.io.IOException;&lt;br /&gt;&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;import&lt;/font&gt;&lt;/b&gt; java.lang.reflect.InvocationTargetException;&lt;br /&gt;&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;import&lt;/font&gt;&lt;/b&gt; java.lang.reflect.Method;&lt;br /&gt;&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;import&lt;/font&gt;&lt;/b&gt; java.util.ArrayList;&lt;br /&gt;&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;import&lt;/font&gt;&lt;/b&gt; java.util.Hashtable;&lt;br /&gt;&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;import&lt;/font&gt;&lt;/b&gt; java.util.Iterator;&lt;br /&gt;&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;import&lt;/font&gt;&lt;/b&gt; java.util.List;&lt;br /&gt;&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;import&lt;/font&gt;&lt;/b&gt; java.util.Set;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;import&lt;/font&gt;&lt;/b&gt; javax.management.Attribute;&lt;br /&gt;&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;import&lt;/font&gt;&lt;/b&gt; javax.management.AttributeList;&lt;br /&gt;&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;import&lt;/font&gt;&lt;/b&gt; javax.management.AttributeNotFoundException;&lt;br /&gt;&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;import&lt;/font&gt;&lt;/b&gt; javax.management.DynamicMBean;&lt;br /&gt;&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;import&lt;/font&gt;&lt;/b&gt; javax.management.InvalidAttributeValueException;&lt;br /&gt;&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;import&lt;/font&gt;&lt;/b&gt; javax.management.MBeanAttributeInfo;&lt;br /&gt;&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;import&lt;/font&gt;&lt;/b&gt; javax.management.MBeanException;&lt;br /&gt;&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;import&lt;/font&gt;&lt;/b&gt; javax.management.MBeanInfo;&lt;br /&gt;&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;import&lt;/font&gt;&lt;/b&gt; javax.management.MBeanOperationInfo;&lt;br /&gt;&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;import&lt;/font&gt;&lt;/b&gt; javax.management.ReflectionException;&lt;br /&gt;&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;import&lt;/font&gt;&lt;/b&gt; javax.management.RuntimeOperationsException;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;/**&lt;br /&gt; * The MBean used to expose component attributes and operations via JMX.&lt;br /&gt; * &lt;br /&gt; * @author Christophe HAMERLING - eBMWebSourcing&lt;br /&gt; * &lt;br /&gt; */&lt;/font&gt;&lt;/i&gt;&lt;br /&gt;&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;public&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;class&lt;/font&gt;&lt;/b&gt; ExtensionMBean &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;implements&lt;/font&gt;&lt;/b&gt; DynamicMBean {&lt;br /&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;private&lt;/font&gt;&lt;/b&gt; ManagedBootstrap managedBootstrap;&lt;br /&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;private&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;final&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;static&lt;/font&gt;&lt;/b&gt; Hashtable&amp;lt;String, Class&amp;lt;?&amp;gt;&amp;gt; primitiveClasses = &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; Hashtable&amp;lt;String, Class&amp;lt;?&amp;gt;&amp;gt;(&lt;br /&gt;        8);&lt;br /&gt;    {&lt;br /&gt;        primitiveClasses.put(Boolean.TYPE.toString(), Boolean.TYPE);&lt;br /&gt;        primitiveClasses.put(Character.TYPE.toString(), Character.TYPE);&lt;br /&gt;        primitiveClasses.put(Byte.TYPE.toString(), Byte.TYPE);&lt;br /&gt;        primitiveClasses.put(Short.TYPE.toString(), Short.TYPE);&lt;br /&gt;        primitiveClasses.put(Integer.TYPE.toString(), Integer.TYPE);&lt;br /&gt;        primitiveClasses.put(Long.TYPE.toString(), Long.TYPE);&lt;br /&gt;        primitiveClasses.put(Float.TYPE.toString(), Float.TYPE);&lt;br /&gt;        primitiveClasses.put(Double.TYPE.toString(), Double.TYPE);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;/**&lt;br /&gt;     * Creates a new instance of {@link ExtensionMBean}&lt;br /&gt;     * &lt;br /&gt;     * @param bootstrap&lt;br /&gt;     */&lt;/font&gt;&lt;/i&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;public&lt;/font&gt;&lt;/b&gt; ExtensionMBean(ManagedBootstrap bootstrap) {&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;this&lt;/font&gt;&lt;/b&gt;.managedBootstrap = bootstrap;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;/*&lt;br /&gt;     * (non-Javadoc)&lt;br /&gt;     * &lt;br /&gt;     * @see javax.management.DynamicMBean#getAttribute(java.lang.String)&lt;br /&gt;     */&lt;/font&gt;&lt;/i&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;public&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;synchronized&lt;/font&gt;&lt;/b&gt; Object getAttribute(String attribute)&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;throws&lt;/font&gt;&lt;/b&gt; AttributeNotFoundException, MBeanException, ReflectionException {&lt;br /&gt;&lt;br /&gt;        String value = managedBootstrap.getComponentPropertiesManager()&lt;br /&gt;            .getProperties().getProperty(attribute);&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;if&lt;/font&gt;&lt;/b&gt; (value != &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;            &amp;amp;&amp;amp; !value&lt;br /&gt;                .startsWith(ComponentPropertiesManager.MANAGED_METHOD_PREFIX)) {&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;return&lt;/font&gt;&lt;/b&gt; value;&lt;br /&gt;        } &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;else&lt;/font&gt;&lt;/b&gt; {&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;throw&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; AttributeNotFoundException(&lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot;Attribute '&quot;&lt;/b&gt;&lt;/font&gt; + attribute&lt;br /&gt;                + &lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot;' does not exists&quot;&lt;/b&gt;&lt;/font&gt;);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;/*&lt;br /&gt;     * (non-Javadoc)&lt;br /&gt;     * &lt;br /&gt;     * @see javax.management.DynamicMBean#getAttributes(java.lang.String[])&lt;br /&gt;     */&lt;/font&gt;&lt;/i&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;public&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;synchronized&lt;/font&gt;&lt;/b&gt; AttributeList getAttributes(String[] attributes) {&lt;br /&gt;        AttributeList list = &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; AttributeList();&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;for&lt;/font&gt;&lt;/b&gt; (String name : attributes) {&lt;br /&gt;            String value = managedBootstrap.getComponentPropertiesManager()&lt;br /&gt;                .getProperties().getProperty(name);&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;if&lt;/font&gt;&lt;/b&gt; (value != &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;                &amp;amp;&amp;amp; !value&lt;br /&gt;                    .startsWith(ComponentPropertiesManager.MANAGED_METHOD_PREFIX))&lt;br /&gt;                list.add(&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; Attribute(name, value));&lt;br /&gt;        }&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;return&lt;/font&gt;&lt;/b&gt; list;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;/*&lt;br /&gt;     * (non-Javadoc)&lt;br /&gt;     * &lt;br /&gt;     * @see javax.management.DynamicMBean#setAttribute(javax.management.Attribute)&lt;br /&gt;     */&lt;/font&gt;&lt;/i&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;public&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;synchronized&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;void&lt;/font&gt;&lt;/b&gt; setAttribute(Attribute attribute)&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;throws&lt;/font&gt;&lt;/b&gt; AttributeNotFoundException, InvalidAttributeValueException,&lt;br /&gt;        MBeanException, ReflectionException {&lt;br /&gt;        String name = attribute.getName();&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;if&lt;/font&gt;&lt;/b&gt; (managedBootstrap.getComponentPropertiesManager().getProperties()&lt;br /&gt;            .getProperty(name) == &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;) {&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;throw&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; AttributeNotFoundException(name);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        Object value = attribute.getValue();&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;if&lt;/font&gt;&lt;/b&gt; (!(value &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;instanceof&lt;/font&gt;&lt;/b&gt; String)) {&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;throw&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; InvalidAttributeValueException(&lt;br /&gt;                &lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot;Attribute value not a string: &quot;&lt;/b&gt;&lt;/font&gt; + value);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;// set the property and save the properties file&lt;br /&gt;&lt;/font&gt;&lt;/i&gt;        managedBootstrap.getComponentPropertiesManager().getProperties()&lt;br /&gt;            .setProperty(name, (String) value);&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;try&lt;/font&gt;&lt;/b&gt; {&lt;br /&gt;            save();&lt;br /&gt;        } &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;catch&lt;/font&gt;&lt;/b&gt; (IOException e) {&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;throw&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; MBeanException(e);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;/*&lt;br /&gt;     * (non-Javadoc)&lt;br /&gt;     * &lt;br /&gt;     * @see javax.management.DynamicMBean#setAttributes(javax.management.AttributeList)&lt;br /&gt;     */&lt;/font&gt;&lt;/i&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;public&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;synchronized&lt;/font&gt;&lt;/b&gt; AttributeList setAttributes(AttributeList list) {&lt;br /&gt;        AttributeList result = &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; AttributeList();&lt;br /&gt;&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;for&lt;/font&gt;&lt;/b&gt; (Object object : list) {&lt;br /&gt;            Attribute attr = (Attribute) object;&lt;br /&gt;            String name = attr.getName();&lt;br /&gt;            Object value = attr.getValue();&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;if&lt;/font&gt;&lt;/b&gt; (managedBootstrap.getComponentPropertiesManager()&lt;br /&gt;                .getProperties().getProperty(name) != &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;                &amp;amp;&amp;amp; value &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;instanceof&lt;/font&gt;&lt;/b&gt; String) {&lt;br /&gt;                managedBootstrap.getComponentPropertiesManager()&lt;br /&gt;                    .getProperties().setProperty(name, (String) value);&lt;br /&gt;                result.add(&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; Attribute(name, value));&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;try&lt;/font&gt;&lt;/b&gt; {&lt;br /&gt;            save();&lt;br /&gt;        } &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;catch&lt;/font&gt;&lt;/b&gt; (IOException e) {&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;return&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; AttributeList();&lt;br /&gt;        }&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;return&lt;/font&gt;&lt;/b&gt; result;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;/*&lt;br /&gt;     * (non-Javadoc)&lt;br /&gt;     * &lt;br /&gt;     * @see javax.management.DynamicMBean#getMBeanInfo()&lt;br /&gt;     */&lt;/font&gt;&lt;/i&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;public&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;synchronized&lt;/font&gt;&lt;/b&gt; MBeanInfo getMBeanInfo() {&lt;br /&gt;        &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;// get the attributes&lt;br /&gt;&lt;/font&gt;&lt;/i&gt;        MBeanAttributeInfo[] attrs = getAttributesInfos();&lt;br /&gt;        &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;// get the operations&lt;br /&gt;&lt;/font&gt;&lt;/i&gt;        MBeanOperationInfo[] opps = getOperationsInfos();&lt;br /&gt;&lt;br /&gt;        &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;// create MBeanInfo with no constructors and no notifications&lt;br /&gt;&lt;/font&gt;&lt;/i&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;return&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; MBeanInfo(&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;this&lt;/font&gt;&lt;/b&gt;.getClass().getName(),&lt;br /&gt;            &lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot;Property Manager MBean&quot;&lt;/b&gt;&lt;/font&gt;, attrs, &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;, opps, &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;/**&lt;br /&gt;     * Dynamically get the operations for the MBean. The operations are defined&lt;br /&gt;     * in the properties manager with a special prefix.&lt;br /&gt;     * &lt;br /&gt;     * @return&lt;br /&gt;     */&lt;/font&gt;&lt;/i&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;protected&lt;/font&gt;&lt;/b&gt; MBeanOperationInfo[] getOperationsInfos() {&lt;br /&gt;        List&amp;lt;String&amp;gt; methods = managedBootstrap.getComponentPropertiesManager()&lt;br /&gt;            .getExposedMethodNames();&lt;br /&gt;        MBeanOperationInfo[] result = &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;;&lt;br /&gt;&lt;br /&gt;        List&amp;lt;MBeanOperationInfo&amp;gt; operations = &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; ArrayList&amp;lt;MBeanOperationInfo&amp;gt;();&lt;br /&gt;        Method methodList[] = managedBootstrap.getClass().getMethods();&lt;br /&gt;&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;for&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;int&lt;/font&gt;&lt;/b&gt; i = 0; i &amp;lt; methodList.length; i++) {&lt;br /&gt;            Method method = methodList[i];&lt;br /&gt;            String name = method.getName();&lt;br /&gt;&lt;br /&gt;            &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;// add method if it has been defined by the user&lt;br /&gt;&lt;/font&gt;&lt;/i&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;if&lt;/font&gt;&lt;/b&gt; (methods.contains(name)) {&lt;br /&gt;                MBeanOperationInfo oper = &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; MBeanOperationInfo(&lt;br /&gt;                    &lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot;Operation description&quot;&lt;/b&gt;&lt;/font&gt;, method);&lt;br /&gt;                operations.add(oper);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        result = &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; MBeanOperationInfo[operations.size()];&lt;br /&gt;        operations.toArray(result);&lt;br /&gt;&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;return&lt;/font&gt;&lt;/b&gt; result;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;/**&lt;br /&gt;     * Dynamically get attributes for the MBean. The attributes are the ones&lt;br /&gt;     * from the properties file.&lt;br /&gt;     * &lt;br /&gt;     * @return&lt;br /&gt;     */&lt;/font&gt;&lt;/i&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;protected&lt;/font&gt;&lt;/b&gt; MBeanAttributeInfo[] getAttributesInfos() {&lt;br /&gt;        &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;// get the attributes names as sorted strings&lt;br /&gt;&lt;/font&gt;&lt;/i&gt;        Set&amp;lt;String&amp;gt; attributeKeys = managedBootstrap&lt;br /&gt;            .getComponentPropertiesManager().getExposedAttributeKeys();&lt;br /&gt;&lt;br /&gt;        &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;// build the MBeanAttributeInfo&lt;br /&gt;&lt;/font&gt;&lt;/i&gt;        MBeanAttributeInfo[] attrs = &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; MBeanAttributeInfo[attributeKeys&lt;br /&gt;            .size()];&lt;br /&gt;        Iterator&amp;lt;String&amp;gt; it = attributeKeys.iterator();&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;for&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;int&lt;/font&gt;&lt;/b&gt; i = 0; i &amp;lt; attrs.length; i++) {&lt;br /&gt;            String name = it.next();&lt;br /&gt;            attrs[i] = &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; MBeanAttributeInfo(name, &lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot;java.lang.String&quot;&lt;/b&gt;&lt;/font&gt;,&lt;br /&gt;                &lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot;Property &quot;&lt;/b&gt;&lt;/font&gt; + name, &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;true&lt;/font&gt;&lt;/b&gt;, &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;true&lt;/font&gt;&lt;/b&gt;, &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;false&lt;/font&gt;&lt;/b&gt;);&lt;br /&gt;        }&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;return&lt;/font&gt;&lt;/b&gt; attrs;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;/*&lt;br /&gt;     * (non-Javadoc)&lt;br /&gt;     * &lt;br /&gt;     * @see javax.management.DynamicMBean#invoke(java.lang.String,&lt;br /&gt;     *      java.lang.Object[], java.lang.String[])&lt;br /&gt;     */&lt;/font&gt;&lt;/i&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;public&lt;/font&gt;&lt;/b&gt; Object invoke(String actionName, Object[] params, String[] signature)&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;throws&lt;/font&gt;&lt;/b&gt; MBeanException, ReflectionException {&lt;br /&gt;        Object result = &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;;&lt;br /&gt;&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;final&lt;/font&gt;&lt;/b&gt; Class objClass = managedBootstrap.getClass();&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;final&lt;/font&gt;&lt;/b&gt; ClassLoader loader = objClass.getClassLoader();&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;final&lt;/font&gt;&lt;/b&gt; Class[] parameters = ((signature == &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;) ? &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;            : findSignatureClasses(signature, loader));&lt;br /&gt;&lt;br /&gt;        &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;// Query the metadata service to get the right method&lt;br /&gt;&lt;/font&gt;&lt;/i&gt;        &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;//&lt;br /&gt;&lt;/font&gt;&lt;/i&gt;        Method method = &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;;&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;try&lt;/font&gt;&lt;/b&gt; {&lt;br /&gt;            method = objClass.getMethod(actionName, parameters);&lt;br /&gt;        } &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;catch&lt;/font&gt;&lt;/b&gt; (Exception e) {&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;if&lt;/font&gt;&lt;/b&gt; (method == &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;) {&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;throw&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; ReflectionException(&lt;br /&gt;                &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; NoSuchMethodException(actionName),&lt;br /&gt;                &lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot;The operation with name &quot;&lt;/b&gt;&lt;/font&gt; + actionName + &lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot; could not be found&quot;&lt;/b&gt;&lt;/font&gt;);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;try&lt;/font&gt;&lt;/b&gt; {&lt;br /&gt;            &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;// invoke method&lt;br /&gt;&lt;/font&gt;&lt;/i&gt;            result = method.invoke(managedBootstrap, params);&lt;br /&gt;        } &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;catch&lt;/font&gt;&lt;/b&gt; (IllegalAccessException e) {&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;throw&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; ReflectionException(e, &lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot;IllegalAccessException&quot;&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;                + &lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot; occured trying to invoke operation &quot;&lt;/b&gt;&lt;/font&gt; + actionName);&lt;br /&gt;        } &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;catch&lt;/font&gt;&lt;/b&gt; (RuntimeException e) {&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;throw&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; RuntimeOperationsException(e, &lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot;RuntimeException&quot;&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;                + &lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot; occured trying to invoke operation &quot;&lt;/b&gt;&lt;/font&gt; + actionName);&lt;br /&gt;        } &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;catch&lt;/font&gt;&lt;/b&gt; (InvocationTargetException e) {&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;throw&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; MBeanException(e, &lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot;Exception thrown in operation &quot;&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;                + actionName);&lt;br /&gt;        }&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;return&lt;/font&gt;&lt;/b&gt; result;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;/**&lt;br /&gt;     * Find the classes of the signature&lt;br /&gt;     * &lt;br /&gt;     * @param signature&lt;br /&gt;     * @param loader&lt;br /&gt;     * @return&lt;br /&gt;     * @throws ReflectionException&lt;br /&gt;     */&lt;/font&gt;&lt;/i&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;private&lt;/font&gt;&lt;/b&gt; Class[] findSignatureClasses(String signature[], ClassLoader loader)&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;throws&lt;/font&gt;&lt;/b&gt; ReflectionException {&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;if&lt;/font&gt;&lt;/b&gt; (signature == &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;)&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;return&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;;&lt;br /&gt;&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;final&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;int&lt;/font&gt;&lt;/b&gt; length = signature.length;&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;final&lt;/font&gt;&lt;/b&gt; Class tab[] = &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; Class[length];&lt;br /&gt;&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;if&lt;/font&gt;&lt;/b&gt; (length == 0)&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;return&lt;/font&gt;&lt;/b&gt; tab;&lt;br /&gt;&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;try&lt;/font&gt;&lt;/b&gt; {&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;for&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;int&lt;/font&gt;&lt;/b&gt; i = 0; i &amp;lt; length; i++) {&lt;br /&gt;&lt;br /&gt;                &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;// try to get the primitive class&lt;br /&gt;&lt;/font&gt;&lt;/i&gt;                &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;final&lt;/font&gt;&lt;/b&gt; Class primCla = (Class) primitiveClasses&lt;br /&gt;                    .get(signature[i]);&lt;br /&gt;                &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;if&lt;/font&gt;&lt;/b&gt; (primCla != &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;null&lt;/font&gt;&lt;/b&gt;) {&lt;br /&gt;                    tab[i] = primCla;&lt;br /&gt;                } &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;else&lt;/font&gt;&lt;/b&gt; {&lt;br /&gt;                    &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;// try to get the class if not primitive one&lt;br /&gt;&lt;/font&gt;&lt;/i&gt;                    tab[i] = Class.forName(signature[i], &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;false&lt;/font&gt;&lt;/b&gt;, loader);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        } &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;catch&lt;/font&gt;&lt;/b&gt; (ClassNotFoundException e) {&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;throw&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;new&lt;/font&gt;&lt;/b&gt; ReflectionException(e,&lt;br /&gt;                &lt;font color=&quot;#bc8f8f&quot;&gt;&lt;b&gt;&quot;The parameter class could not be found&quot;&lt;/b&gt;&lt;/font&gt;);&lt;br /&gt;        } &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;catch&lt;/font&gt;&lt;/b&gt; (RuntimeException e) {&lt;br /&gt;            &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;throw&lt;/font&gt;&lt;/b&gt; e;&lt;br /&gt;        }&lt;br /&gt;        &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;return&lt;/font&gt;&lt;/b&gt; tab;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;i&gt;&lt;font color=&quot;#b22222&quot;&gt;/**&lt;br /&gt;     * Save the properties to a file&lt;br /&gt;     * &lt;br /&gt;     * @throws IOException&lt;br /&gt;     */&lt;/font&gt;&lt;/i&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;private&lt;/font&gt;&lt;/b&gt; &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;void&lt;/font&gt;&lt;/b&gt; save() &lt;b&gt;&lt;font color=&quot;#a020f0&quot;&gt;throws&lt;/font&gt;&lt;/b&gt; IOException {&lt;br /&gt;        managedBootstrap.getComponentPropertiesManager().save();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;h2&gt;About&lt;/h2&gt;I am a software engineer and community manager on the open source PEtALS ESB project at &lt;a href=&quot;http://www.ebmwebsourcing.com&quot;&gt;eBM WebSourcing&lt;/a&gt;.&lt;br /&gt;You can get this article as PDF file on my &lt;a href=&quot;http://www.scribd.com/people/view/8704&quot;&gt;scribd&lt;/a&gt; space or on my work &lt;a title=&quot;&quot; target=&quot;_blank&quot; href=&quot;http://www.ebmwebsourcing.com/chamerling&quot;&gt;blog&lt;/a&gt;.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</description>
	<pubDate>Sun, 27 Jan 2008 23:50:23 +0000</pubDate>
</item>
<item>
	<title>Christophe Hamerling: PEtALS 1.2 and Axis2BC new features</title>
	<guid>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=petals_1_2_and_axis2bc</guid>
	<link>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=petals_1_2_and_axis2bc</link>
	<description>&lt;span&gt;PEtALS&lt;/span&gt; 1.2 is finally out (&lt;a title=&quot;http://petals.objectweb.org&quot; target=&quot;blank_&quot; href=&quot;http://petals.objectweb.org/&quot;&gt;http://petals.objectweb.org&lt;/a&gt; ).&lt;br /&gt;This new release introduces lot of new features and improvements like:&lt;br /&gt;&lt;ul class=&quot;star&quot;&gt;&lt;li&gt;The MessageExchanges delivering mode has been improved and corrects a fault in the persistance of pending messages.&lt;/li&gt;&lt;li&gt;The NormalizedMessageRouter features new routing rules : a message  is firstly addressed to local a ServiceEndpoint, secondly to a distant  ServiceEndpoint, and finally to a ServiceEndpoint hosted on a stopped  container.&lt;/li&gt;&lt;li&gt;The path of the repository where components and service assemblies are stored can be set.&lt;/li&gt;&lt;li&gt;The PEtALS platform is also available as a Web Application and can be deployed on standard WebServer or J2EE Server.&lt;/li&gt;&lt;li&gt;The petals-webadmin monitoring console features graphics that show instant message-traffic in a container.&lt;/li&gt;&lt;li&gt;Bugs in Ant tasks have been corrected.&lt;/li&gt;&lt;li&gt;...&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;As I have worked again on the Axis2 binding component (Axis2BC), here are some new improvements on this component:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;List of available services available on URL/axis2/services&lt;/li&gt;&lt;li&gt;SOAP attachments support&lt;/li&gt;&lt;li&gt;and some bug fixes...&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span&gt;How does SOAP attachment works?&lt;/span&gt;&lt;br /&gt;As simple as:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;For incoming messages, all the SOAP attachments are placed as JBI ones&lt;/li&gt;&lt;li&gt;For outgoing messages, all the JBI attachments are placed as SOAP ones&lt;/li&gt;&lt;/ol&gt;With  Axis2, two types of attachments are possible, MTOM(Message Transmission  Optimization Mechanism) and SWA (SOAP With Attachments).&lt;br /&gt;Both of them allows to handle large amounts of binary data. More explanations are available on the Web...&lt;br /&gt;In the Axis2BC we use the MTOM approach.&lt;br /&gt;&lt;br /&gt;Adding SOAP attachments is as simple as (code snippet from org.objectweb.petals.binding.axis2.listener.jbi.JBIListener class):&lt;br /&gt;&lt;div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;3&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width=&quot;100%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span&gt;protected OMElement createSOAPMessage(NormalizedMessage nm,&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServiceClient client) throws XMLStreamException,&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FactoryConfigurationError, PEtALSComponentSDKException {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // create the root element&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OMFactory fac = OMAbstractFactory.getOMFactory();&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Source body = nm.getContent();&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String content = SourceHelper.createString(body);&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XMLStreamReader parser = XMLInputFactory.newInstance()&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .createXMLStreamReader(new StringReader(content));&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StAXOMBuilder builder = new StAXOMBuilder(parser);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OMElement document = builder.getDocumentElement();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // add attachments if any&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (nm.getAttachmentNames().size() &amp;gt; 0) {&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // enable MTOM&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; client.getOptions().setProperty(&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Add JBI attachments to the document element&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set names = nm.getAttachmentNames();&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (Object key : names) {&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String name = (String) key;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataHandler attachment = nm.getAttachment(name);&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OMText attach = fac.createOMText(attachment, true);&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.addChild(attach);&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return document;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;And  getting SOAP attachments from SOAP message (code snippet from  org.objectweb.petals.binding.axis2.listener.soap.PetalsReceiver class) :&lt;br /&gt;&lt;div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;3&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width=&quot;100%&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void copySOAPAttachmentsToJBI(MessageContext messageContext,&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NormalizedMessage nm) throws MessagingException {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (nm != null &amp;amp;&amp;amp; messageContext != null) {&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Attachments attachments = messageContext.getAttachmentMap();&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (attachments != null) {&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set set = attachments.getContentIDSet();&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (Object object : set) {&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String id = (String) object;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataHandler dh = attachments.getDataHandler(id);&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nm.addAttachment(id, dh);&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;&lt;span&gt;A simple test scenario&lt;/span&gt;&lt;br /&gt;A  simple scenario to test the SOAP attachments with PEtALS is described  below. We use the PEtALS sample client to send data to a service that  will write it into a directory. In order to use the Axis2 binding  component, it is placed between the client and the targeted endpoint.  The 'workflow' is:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Send data and attachments to Axis2BC provided endpoint. This endpoint provides access to an external web service.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The Axis2BC takes all the data from the incoming JBI message and put it into the SOAP message&lt;/li&gt;&lt;li&gt;The Axis2BC sends the SOAP message to the external web service&lt;/li&gt;&lt;li&gt;Axis2BC  is also configured to handle external on the address previously  invoked. It consumes an endpoint provided by the File Transfer binding  component (FTBC)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Axis2BC handle the incoming SOAP message and put all the data (and attachments) into a new JBI message&lt;/li&gt;&lt;li&gt;The JBI message is sent to the FTBC endpoint&lt;/li&gt;&lt;li&gt;The FTBC endpoint receives the JBI message and write all the data to files&lt;/li&gt;&lt;li&gt;Response is sent to client...&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;All the needed service units are available on the PEtALS use cases section &lt;a title=&quot;here&quot; target=&quot;blank_&quot; href=&quot;http://wiki.petals.objectweb.org/xwiki/bin/view/Demostrator/UseCasesSOAPAttachments&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This blog entry is also available at &lt;a title=&quot;http://docs.google.com/Doc?id=dcrqrprg_27hnpbfk&quot; target=&quot;blank_&quot; href=&quot;http://docs.google.com/Doc?id=dcrqrprg_27hnpbfk&quot;&gt;http://docs.google.com/Doc?id=dcrqrprg_27hnpbfk&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description>
	<pubDate>Sun, 27 Jan 2008 23:50:23 +0000</pubDate>
</item>
<item>
	<title>Christophe Hamerling: Install configure and use a corporate maven repository and a maven proxy</title>
	<guid>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=install_configure_and_use_a</guid>
	<link>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=install_configure_and_use_a</link>
	<description>Maven proxy is a nice tool but documentation available on the web is not...&lt;br /&gt;  This blog entry describes how to install, configure and use the  maven-proxy. It also defines how to create a corporate maven repository.&lt;br /&gt; &lt;h2&gt;   Maven2 installation &lt;/h2&gt; &lt;h3&gt;   Binary installation &lt;/h3&gt; Download the latest binary version of maven (&lt;a href=&quot;http://maven.apache.org/&quot; target=&quot;blank_&quot; title=&quot;http://maven.apache.org&quot;&gt;http://maven.apache.org&lt;/a&gt; ) and as root:&lt;br /&gt; &lt;span&gt;cd /usr/share&lt;/span&gt;&lt;br /&gt; &lt;span&gt;tar zxvf maven-x.y.z-bin.tar.gz&lt;/span&gt;&lt;br /&gt; &lt;span&gt;ln -s maven-x.y.z maven2&lt;/span&gt;&lt;br /&gt; &lt;h3&gt;   Configuration &lt;/h3&gt; Add environment variables to the &lt;span&gt;/etc/profile&lt;/span&gt; file (or in your .bashrc if you want)&lt;br /&gt; &lt;span&gt;M2_HOME=/usr/share/maven2&lt;/span&gt;&lt;br /&gt; &lt;span&gt;MAVEN_OPTS=-Xmx256M&lt;/span&gt;&lt;br /&gt; &lt;span&gt;PATH=$PATH:$M2_HOME/bin&lt;/span&gt;&lt;br /&gt; &lt;span&gt;export M2_HOME&lt;/span&gt;&lt;br /&gt; &lt;span&gt;export MAVEN_OPTS&lt;/span&gt;&lt;br /&gt; &lt;span&gt;export PATH&lt;/span&gt;&lt;br /&gt; &lt;h3&gt;   Create a deployer user &lt;/h3&gt; This user will be used to deploy new artifacts in maven repositories.&lt;br /&gt; &lt;span&gt;mkdir /home/maven&lt;/span&gt;&lt;br /&gt; &lt;span&gt;useradd -g buildauto -d /home/maven maven&lt;/span&gt;&lt;br /&gt; &lt;span&gt;passwd maven&lt;/span&gt;&lt;br /&gt; &lt;span&gt;chown -R maven:buildauto /home/maven&lt;/span&gt;&lt;br /&gt; &lt;h2&gt;   Create Maven2 corporate repositories &lt;/h2&gt;  We create two repositories, one for the the artifacts that can not be  installed for licence reasons and the other for the artifacts snapshots  that will only be accessible directly. You have to install apache  first(out of scope of this blog entry, tell your system admin to  install it or ask google how to do it if you don't know how).&lt;br /&gt; &lt;h3&gt;   Directories &lt;/h3&gt; As root:&lt;br /&gt; &lt;span&gt;mkdir /var/lib/m2-repo&lt;/span&gt;&lt;br /&gt; &lt;span&gt;mkdir /var/lib/m2-repo-snapshots&lt;/span&gt;&lt;br /&gt; &lt;span&gt;chown -R maven:buildauto /var/lib/m2-repo /var/lib/m2-repo-snapshots&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; Create symbolic links to be abble to access these repositories with http. If apache handle directories in &lt;span&gt;/var/www&lt;/span&gt;, simply create the links:&lt;br /&gt; &lt;span&gt;ln -s /var/lib/m2-repo /var/www/maven2&lt;/span&gt;&lt;br /&gt; &lt;span&gt;ln -s /var/lib/m2-repo-snapshots /var/www/maven2-snapshots&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; Repositories are now accessible at addresses &lt;span&gt;http://repo_host/maven2&lt;/span&gt; and &lt;span&gt;http://repo_host/maven2_snapshots&lt;/span&gt;.&lt;br /&gt; &lt;h3&gt;   How to install artifacts &lt;/h3&gt; To install an artifact in the repository, use maven2 command:&lt;br /&gt; &lt;span&gt;mvn deploy:deploy-file&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -Durl=scp://repo_host:/var/lib/m2-repo&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -DrepositoryId=corpo-maven-repository&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -Dpackaging=&amp;lt;packaging&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -DgroupId=&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -DartifactId=&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -Dversion=&amp;lt;version&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -Dfile=&amp;lt;file&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; or this one if you already have the pom of the artifact:&lt;br /&gt; &lt;span&gt;mvn deploy:deploy-file&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; -Durl=scp://repo_host:/var/lib/m2-repo&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; -DrepositoryId=corpo-maven-repository&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; -DpomFile=&amp;lt;pomfile&amp;gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; -Dfile=&amp;lt;jarfile&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; You can specify the repositoryId in your maven2 configuration file to avoid entering user name and password each time (in &lt;span&gt;$M2_HOME/conf/settings.xml&lt;/span&gt;):&lt;br /&gt; &lt;span&gt;&amp;lt;server&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;lt;id&amp;gt;corpo-maven-repository&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;lt;username&amp;gt;maven&amp;lt;/username&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;lt;password&amp;gt;xxx&amp;lt;/password&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;lt;/server&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;h2&gt;   Maven proxy installation &lt;/h2&gt; Download the maven-proxy standalone : &lt;a href=&quot;http://maven-proxy.codehaus.org/&quot; target=&quot;blank_&quot; title=&quot;http://maven-proxy.codehaus.org&quot;&gt;http://maven-proxy.codehaus.org&lt;/a&gt;&lt;br /&gt; &lt;br /&gt; Connect your maven server as root and enter these commands:&lt;br /&gt; &lt;span&gt;cd /usr/share&lt;/span&gt;&lt;br /&gt; &lt;span&gt;tar zxvf maven-proxy-standalone-x.y.z.tar.gz&lt;/span&gt;&lt;br /&gt; &lt;span&gt;mkdir maven-proxy&lt;/span&gt;&lt;br /&gt; &lt;span&gt;cd maven-proxy&lt;/span&gt;&lt;br /&gt; &lt;span&gt;ln -s ../maven-proxy-x.y.z/maven-proxy-standalone-x.y.z-app.jar maven-proxy-standalone-app.jar&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; Next we need to create the cache directory (the proxy will download the required files here)&lt;br /&gt; &lt;span&gt;mkdir /var/cache/maven-proxy&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; Copy the maven properties file in &lt;span&gt;/etc/maven/maven-proxy.properties&lt;/span&gt;. You can download a sample of this file from the maven-proxy website.&lt;br /&gt; In this file, you are going to specify the repositories you want to access through the proxy. For example:&lt;br /&gt; &lt;br /&gt; &lt;span&gt;################ GLOBAL SETTINGS&lt;/span&gt;&lt;br /&gt; &lt;span&gt;# This is where maven-proxy stores files it has downloaded&lt;/span&gt;&lt;br /&gt; &lt;span&gt;repo.local.store=/var/cache/maven-proxy&lt;/span&gt;&lt;br /&gt; &lt;span&gt;...&lt;/span&gt;&lt;br /&gt; &lt;span&gt;################ SNAPSHOT HANDLING&lt;/span&gt;&lt;br /&gt; &lt;span&gt;#If you want the proxy to look for newer snapshots, set to true&lt;/span&gt;&lt;br /&gt; &lt;span&gt;snapshot.update=false&lt;/span&gt;&lt;br /&gt; &lt;span&gt;...&lt;/span&gt;&lt;br /&gt; &lt;span&gt;################# REPOSITORIES&lt;/span&gt;&lt;br /&gt; &lt;span&gt;#This is not just a hack, it specifies the order repositories should be checked&lt;/span&gt;&lt;br /&gt; &lt;span&gt;#Note that the proxy adds a &quot;/&quot; which is why the urls aren't suffixed with a &quot;/&quot;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;repo.list=local-repo,www-ibiblio-org&lt;/span&gt;&lt;br /&gt; &lt;span&gt;repo.local-repo.url=file:////var/lib/m2-repo&lt;/span&gt;&lt;br /&gt; &lt;span&gt;repo.local-repo.description=My corpo - Maven2 Repository&lt;/span&gt;&lt;br /&gt; &lt;span&gt;repo.local-repo.copy=false&lt;/span&gt;&lt;br /&gt; &lt;span&gt;repo.local-repo.hardfail=true&lt;/span&gt;&lt;br /&gt; &lt;span&gt;repo.local-repo.cache.period=0&lt;/span&gt;&lt;br /&gt; &lt;span&gt;#www.ibiblio.org&lt;/span&gt;&lt;br /&gt; &lt;span&gt;repo.www-ibiblio-org.url=http://www.ibiblio.org/maven2&lt;/span&gt;&lt;br /&gt; &lt;span&gt;repo.www-ibiblio-org.description=www.ibiblio.org&lt;/span&gt;&lt;br /&gt; &lt;span&gt;repo.www-ibiblio-org.hardfail=true&lt;/span&gt;&lt;br /&gt; &lt;span&gt;repo.www-ibiblio-org.cache.period=3600&lt;/span&gt;&lt;br /&gt; &lt;span&gt;repo.www-ibiblio-org.cache.failures=true&lt;br /&gt; #other repo&lt;br /&gt; ...&lt;br /&gt; &lt;/span&gt;&lt;br /&gt; If you want to add logs, you can modify the log4j properties file in the proxy jar file to add logs (extract and jar it again):&lt;br /&gt; &lt;span&gt;# Set root logger level to DEBUG&lt;/span&gt;&lt;br /&gt; &lt;span&gt;log4j.rootLogger=DEBUG,CONSOLE,R&lt;/span&gt;&lt;br /&gt; &lt;span&gt;# ConsoleAppender.&lt;/span&gt;&lt;br /&gt; &lt;span&gt;log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender&lt;/span&gt;&lt;br /&gt; &lt;span&gt;# Console PatternLayout.&lt;/span&gt;&lt;br /&gt; &lt;span&gt;log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout&lt;/span&gt;&lt;br /&gt; &lt;span&gt;log4j.appender.CONSOLE.layout.ConversionPattern=%d [%-5p] %-20c{3} %x - %m%n&lt;/span&gt;&lt;br /&gt; &lt;span&gt;log4j.logger.org.mortbay=WARN&lt;/span&gt;&lt;br /&gt; &lt;span&gt;log4j.logger.httpclient.wire=INFO&lt;/span&gt;&lt;br /&gt; &lt;span&gt;log4j.logger.org.apache.commons.httpclient=INFO&lt;/span&gt;&lt;br /&gt; &lt;span&gt;log4j.logger.org.apache.jasper=INFO&lt;/span&gt;&lt;br /&gt; &lt;span&gt;# File appender&lt;/span&gt;&lt;br /&gt; &lt;span&gt;log4j.appender.R=org.apache.log4j.RollingFileAppender&lt;/span&gt;&lt;br /&gt; &lt;span&gt;log4j.appender.R.File=/var/log/maven-proxy.log&lt;/span&gt;&lt;br /&gt; &lt;span&gt;log4j.appender.R.MaxFileSize=100KB&lt;/span&gt;&lt;br /&gt; &lt;span&gt;# Keep one backup file&lt;/span&gt;&lt;br /&gt; &lt;span&gt;log4j.appender.R.MaxBackupIndex=1&lt;/span&gt;&lt;br /&gt; &lt;span&gt;log4j.appender.R.layout=org.apache.log4j.PatternLayout&lt;/span&gt;&lt;br /&gt; &lt;span&gt;log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n&lt;/span&gt;&lt;br /&gt; &lt;h3&gt;   Proxy daemon &lt;/h3&gt; Installing the proxy as daemon in &lt;span&gt;/etc/init.d/maven-proxy&lt;/span&gt;&lt;br /&gt; &lt;span&gt;#! /bin/sh&lt;/span&gt;&lt;br /&gt; &lt;span&gt;set -e&lt;/span&gt;&lt;br /&gt; &lt;span&gt;PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin&lt;/span&gt;&lt;br /&gt; &lt;span&gt;DESC=&quot;Maven Proxy&quot;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;NAME=maven-proxy&lt;/span&gt;&lt;br /&gt; &lt;span&gt;JAVA_HOME=/home/dev/bin/java&lt;/span&gt;&lt;br /&gt; &lt;span&gt;DAEMON=$JAVA_HOME/bin/java&lt;/span&gt;&lt;br /&gt; &lt;span&gt;PIDFILE=/var/run/$NAME.pid&lt;/span&gt;&lt;br /&gt; &lt;span&gt;SCRIPTNAME=/etc/init.d/$NAME&lt;/span&gt;&lt;br /&gt; &lt;span&gt;MAVENPROXY_HOME=/usr/share/$NAME&lt;/span&gt;&lt;br /&gt; &lt;span&gt;MAVENPROXY_JAR=$MAVENPROXY_HOME/maven-proxy-standalone-app.jar&lt;/span&gt;&lt;br /&gt; &lt;span&gt;# Gracefully exit if the package has been removed.&lt;/span&gt;&lt;br /&gt; &lt;span&gt;test -r $MAVENPROXY_JAR || exit 0&lt;/span&gt;&lt;br /&gt; &lt;span&gt;# Function that starts the daemon/service.&lt;/span&gt;&lt;br /&gt; &lt;span&gt;d_start() {&lt;/span&gt;&lt;br /&gt; &lt;span&gt;# We change dir to /var/log, because Velocimacro logfile is created in the current directory&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; start-stop-daemon --chdir /var/log --start --background --quiet \&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --pidfile $PIDFILE --make-pidfile --exec $DAEMON -- -jar $MAVENPROXY_JAR \&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /etc/maven-proxy/maven-proxy.properties&lt;/span&gt;&lt;br /&gt; &lt;span&gt;}&lt;/span&gt;&lt;br /&gt; &lt;span&gt;# Function that stops the daemon/service.&lt;/span&gt;&lt;br /&gt; &lt;span&gt;d_stop() {&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; start-stop-daemon --stop --quiet --pidfile $PIDFILE --signal TERM&lt;/span&gt;&lt;br /&gt; &lt;span&gt;}&lt;/span&gt;&lt;br /&gt; &lt;span&gt;# Function that sends a SIGHUP to the daemon/service.&lt;/span&gt;&lt;br /&gt; &lt;span&gt;d_reload() {&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; start-stop-daemon --stop --quiet --pidfile $PIDFILE --signal 1&lt;/span&gt;&lt;br /&gt; &lt;span&gt;}&lt;/span&gt;&lt;br /&gt; &lt;span&gt;case &quot;$1&quot; in&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp; start)&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; echo -n &quot;Starting $DESC: $NAME&quot;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; d_start&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; echo &quot;.&quot;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; ;;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp; stop)&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; echo -n &quot;Stopping $DESC: $NAME&quot;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; d_stop&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; echo &quot;.&quot;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; ;;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp; restart|force-reload)&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; #&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; # If the &quot;reload&quot; option is implemented, move the &quot;force-reload&quot;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; # option to the &quot;reload&quot; entry above. If not, &quot;force-reload&quot; is&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; # just the same as &quot;restart&quot;.&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; #&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; echo -n &quot;Restarting $DESC: $NAME&quot;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; d_stop&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; sleep 1&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; d_start&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; echo &quot;.&quot;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; ;;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp; *)&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; echo &quot;Usage: $SCRIPTNAME {start|stop|restart|force-reload}&quot; &amp;gt;&amp;amp;2&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; exit 1&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; ;;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;esac&lt;/span&gt;&lt;br /&gt; &lt;span&gt;exit 0&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; Create the links for host startup:&lt;br /&gt; &lt;span&gt;ln -s ../init.d/maven-proxy /etc/rc3.d/S22maven-proxy&lt;/span&gt;&lt;br /&gt; &lt;span&gt;ln -s ../init.d/maven-proxy /etc/rc4.d/S22maven-proxy&lt;/span&gt;&lt;br /&gt; &lt;span&gt;ln -s ../init.d/maven-proxy /etc/rc5.d/S22maven-proxy&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; And start the proxy as root like this&lt;br /&gt; &lt;span&gt;/etc/init.d/maven-proxy start&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;h2&gt;   Use the proxy &lt;/h2&gt; Now that the environment has been setted up, you can use it for your developments.&lt;br /&gt; &lt;h3&gt;   Configuration file &lt;/h3&gt;  You have to tell maven that you want it uses the proxy. To do this, you  must add the settings.xml file to your local repository (in &lt;span&gt;$HOME/.m2/&lt;/span&gt;).&lt;br /&gt; &lt;span&gt;&amp;lt;settings&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;profiles&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;profile&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;id&amp;gt;default-profile&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activation&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activeByDefault&amp;gt;TRUE&amp;lt;/activeByDefault&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/activation&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;repositories&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;repository&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;id&amp;gt;myproject-repository-repohost&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;name&amp;gt;repohost Repo&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;url&amp;gt;http://192.168.1.230:9999/repository/&amp;lt;/url&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;snapshots&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;enabled&amp;gt;TRUE&amp;lt;/enabled&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/snapshots&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;releases&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;enabled&amp;gt;TRUE&amp;lt;/enabled&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/releases&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/repository&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/repositories&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;pluginRepositories&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;pluginRepository&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;id&amp;gt;myproject-repository-repohost&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;name&amp;gt;repohost Repo&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;url&amp;gt;http://192.168.1.230:9999/repository/&amp;lt;/url&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;snapshots&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;enabled&amp;gt;TRUE&amp;lt;/enabled&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/snapshots&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;releases&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;enabled&amp;gt;TRUE&amp;lt;/enabled&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/releases&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/pluginRepository&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/pluginRepositories&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/profile&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/profiles&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;lt;/settings&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; Now you can remove all the repositories from your pom files and let maven get artifacts from the proxy.&lt;br /&gt;</description>
	<pubDate>Sun, 27 Jan 2008 23:50:23 +0000</pubDate>
</item>
<item>
	<title>Christophe Hamerling: The PEtALS v1.1 Axis2 binding component</title>
	<guid>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=the_petals_v1_1_axis2</guid>
	<link>http://www.ebmwebsourcing.net/blog/page/christophehamerling?entry=the_petals_v1_1_axis2</link>
	<description>&lt;a title=&quot;PEtALS&quot; target=&quot;blank_&quot; href=&quot;http://petals.objectweb.org&quot;&gt;PEtALS&lt;/a&gt; 1.1 is finally out with lot of new features and improvements.&lt;br /&gt;I have done many changes to the Axis2 binding component (Axis2BC) which is currently based on Axis2 v1.1.1.&lt;br /&gt; This binding component is used to handle incoming and outgoing SOAP requests from/to the JBI container. It uses the PEtALS Component Development Kit (CDK) and offers lot of new features in its current 1.1 version.&lt;br /&gt; &lt;br /&gt; The current article details the main features of the BC and also introduces the methodology used to offer these features.&lt;br /&gt;&lt;br /&gt; &lt;h3&gt;   How to embed a Jetty Server ? &lt;/h3&gt; As a binding component, the SOAP have to be able to handle incoming SOAP requests. The choice of using a &lt;a href=&quot;http://jetty.mortbay.org/&quot; target=&quot;blank_&quot; title=&quot;Jetty&quot;&gt;Jetty&lt;/a&gt; server to handle incoming SOAP requests comes from:&lt;br /&gt; &lt;ol&gt;   &lt;li&gt;     The simple server provided with Axis has poor performances. This server was used on the previous version of the BC. The performance study I have made shows that handling web service calls into a dedicated server is better.&lt;br /&gt;   &lt;/li&gt;   &lt;li&gt;     Jetty is easily embeddable (Tomcat is not as easy as Jetty)   &lt;/li&gt;   &lt;li&gt;     Servlets can be deployed easily on Jetty   &lt;/li&gt; &lt;/ol&gt; &lt;br /&gt; Like mentioned above, embedding a Jetty server is quite simple. You also have to create a new instance of the server like this (snippet from class &lt;span&gt;org.objectweb.petals.binding.axis2.listener.soap.AxisJettyServer&lt;/span&gt;):&lt;br /&gt; &lt;br /&gt;&lt;span&gt;public AxisJettyServer(ConfigurationContext configurationContext, int port) throws AxisFault {&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        this.port = port;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        this.configurationContext = configurationContext;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        this.server = new Server(this.port);&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span&gt;        // create context handlers&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        ContextHandlerCollection contexts = new ContextHandlerCollection();&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        server.setHandler(contexts);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;        // create the axis context&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        Context axis2 = new Context(contexts, &quot;/axis2&quot;, Context.SESSIONS);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;        // create servlet holders&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        ServletHolder axisServlet = new ServletHolder(new AxisJettyServlet(&lt;/span&gt;&lt;br /&gt;&lt;span&gt;            configurationContext));&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        axisServlet.setName(&quot;AxisServlet&quot;);&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        axisServlet.setInitOrder(1);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;        // do servlet mappings&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        axis2.addServlet(axisServlet, &quot;/services/*&quot;);&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        // axis2.addServlet(axisRESTServlet, &quot;/rest/*&quot;);&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        axis2.addServlet(axisServlet, &quot;/servlet/AxisServlet&quot;);&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        // axis2.addServlet(axisAdminServlet, &quot;/axis2-admin/*&quot;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;        // AXIS&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        ListenerManager listenerManager = configurationContext&lt;/span&gt;&lt;br /&gt;&lt;span&gt;            .getListenerManager();&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        TransportInDescription trsIn = new TransportInDescription(new QName(&lt;/span&gt;&lt;br /&gt;&lt;span&gt;            Constants.TRANSPORT_HTTP));&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        trsIn.setReceiver(this);&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        if (listenerManager == null) {&lt;/span&gt;&lt;br /&gt;&lt;span&gt;            listenerManager = new ListenerManager();&lt;/span&gt;&lt;br /&gt;&lt;span&gt;            listenerManager.init(configurationContext);&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        listenerManager.addListener(trsIn, true);&lt;/span&gt;&lt;br /&gt;&lt;span&gt;}&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;In the above code, we create the context and we register a the servlet &lt;span&gt;AxisJettyServlet&lt;/span&gt; that will be used to handle incoming SOAP requests.&lt;br /&gt;To start and stop the server you have simply to call the start and stop method like this:&lt;br /&gt;&lt;br /&gt;&lt;span&gt;public void start() throws AxisFault {&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        // start the jetty server in a separate thread&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        Runnable httpListenerRunnable = new Runnable() {&lt;/span&gt;&lt;br /&gt;&lt;span&gt;            public void run() {&lt;/span&gt;&lt;br /&gt;&lt;span&gt;                try {&lt;/span&gt;&lt;br /&gt;&lt;span&gt;                    server.start();&lt;/span&gt;&lt;br /&gt;&lt;span&gt;                } catch (Exception e) {&lt;/span&gt;&lt;br /&gt;&lt;span&gt;                    e.printStackTrace(System.err);&lt;/span&gt;&lt;br /&gt;&lt;span&gt;                }&lt;/span&gt;&lt;br /&gt;&lt;span&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        };&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        Thread httpThread = new Thread(httpListenerRunnable,&lt;/span&gt;&lt;br /&gt;&lt;span&gt;            &quot;Jetty started Thread&quot;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;        try {&lt;/span&gt;&lt;br /&gt;&lt;span&gt;            httpThread.start();&lt;/span&gt;&lt;br /&gt;&lt;span&gt;            httpThread.join();&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        } catch (InterruptedException e) {&lt;/span&gt;&lt;br /&gt;&lt;span&gt;            throw new AxisFault(e.getMessage());&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        } catch (Exception e) {&lt;/span&gt;&lt;br /&gt;&lt;span&gt;            throw new AxisFault(e.getMessage());&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span&gt; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; Even if embedding Jetty was quite simple, tuning Axis to work like we want it works in the JBI environment was not so simple. I will discuss about this later on this post.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Registering new services&lt;/h3&gt;To create and register the new service, follow the steps:&lt;br /&gt; &lt;ol&gt;&lt;li&gt;Create a new AxisService (&lt;span&gt;org.apache.axis2.description.AxisService&lt;/span&gt;)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Add parameters such as document definition for example (not used like this in the BC)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Register it into the axis configuration (&lt;span&gt;org.apache.axis2.engine.AxisConfiguration&lt;/span&gt;)&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt; &lt;br /&gt;The code snippet above is taken from the SUListener used in the Axis2BC:&lt;br /&gt;&lt;br /&gt;&lt;span&gt;AxisService axisService = new AxisService(endPointName);&lt;/span&gt;&lt;br /&gt;&lt;span&gt;axisService.setTargetNamespace(serviceQName.getNamespaceURI());&lt;/span&gt;&lt;br /&gt;&lt;span&gt;axisService.setEndpoint(consumedEndpoint);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;axisService.addParameter(new Parameter(Constants.SERVICE_CLASS, &quot;PetalsReceiver&quot;));&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;// add parameter to handle ?wsdl requests&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Parameter useOriginalwsdl = new Parameter(&quot;useOriginalwsdl&quot;, &quot;true&quot;);&lt;/span&gt;&lt;br /&gt;&lt;span&gt;axisService.addParameter(useOriginalwsdl);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;ServiceEndpoint endpoint = componentContext.getEndpoint(serviceQName, consumedEndpoint);&lt;/span&gt;&lt;br /&gt;&lt;span&gt;if (endpoint != null) {&lt;/span&gt;&lt;br /&gt;&lt;span&gt;    Definition def = null;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;    Document document = componentContext.getEndpointDescriptor(endpoint);&lt;/