<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title># code.van.rohde</title>
	<atom:link href="http://codevanrohde.nl/wordpress/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://codevanrohde.nl/wordpress</link>
	<description></description>
	<lastBuildDate>Wed, 04 Apr 2012 14:26:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Lenovo T61 (Intel GMA965) screen replacement WXGA to WUXGA</title>
		<link>http://codevanrohde.nl/wordpress/?p=178</link>
		<comments>http://codevanrohde.nl/wordpress/?p=178#comments</comments>
		<pubDate>Fri, 16 Dec 2011 11:51:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://codevanrohde.nl/wordpress/?p=178</guid>
		<description><![CDATA[This blog entry is for anyone who wants to upgrade the screen of their old T61s and wonder if it&#8217;s possible. Mine is a 6466, which has an Intel GMA965 chipset inside of it. I wondered if it could be upgraded to a WUXGA panel. Note: This is not a replacement guide. For that, you [...]]]></description>
			<content:encoded><![CDATA[<p><strong>This blog entry is for anyone who wants to upgrade the screen of their old T61s and wonder if it&#8217;s possible. Mine is a 6466, which has an Intel GMA965 chipset inside of it. I wondered if it could be upgraded to a WUXGA panel.<br />
Note: This is not a replacement guide. For that, you should visit <a href="http://www.computer-adviser.com/ibm-t61-screen-replacement.html">this</a> website.<br />
</strong><br />
<span id="more-178"></span><br />
I love my T61, but I hate the screen. Not because it has a meager 1280&#215;720  display resolution (WXGA), but because it suffers from SEVERE backlight bleeding. It&#8217;s FRU is 42T0421, which happens to be a LG/Philips screen.</p>
<p>In the hardware maintenance manual from Lenovo for the T61, it says on page 166, that a WUXGA panel is a CTO part. Which means Configure To Order:</p>
<blockquote><p>
This provides the ability for a customer to configure an IBM® or a LenovoTM solution from an eSite, and have this configuration sent to fulfillment, where it is built and shipped directly to the customer.
</p></blockquote>
<p>I read on different sites on the internet that the Samsung panel had a lot of backlight bleeding too, so I opted for the LG panel (FRU 42T0361).</p>
<p>Unfortunately, because of the tsunami in Japan, these screen were hard to get. So I called IBM and asked them to send me an offer for the LG panel. Those were not in stock, but they had an alternative screen for the T61 (newer he said), with FRU 45N3310.<br />
It&#8217;s price was too high: More than 300 euros. My is T61 is too old for that (sorry T61).</p>
<p>So I decided to take the plunge and ordered a new screen on Ebay. I ended up <a href="http://myworld.ebay.nl/bumblesale">here</a>, and ordered a 42T0361.</p>
<p>After a week or so, I received a 42T0613. According to <a href="http://www.thinkpad-parts.com/42T0613-ThinkPad.html">this</a> site, it&#8217;s for the (T|W)500, not T61. The 42T0613 is a LG panel as well, just like the 42T0361.</p>
<p>I followed this online guide: <a href="http://www.computer-adviser.com/ibm-t61-screen-replacement.html">http://www.computer-adviser.com/ibm-t61-screen-replacement.html</a> to replace my screen.<br />
It took me 2 hours and a lot of sweat, especially for the bezel.</p>
<p>The screen is fitted, and I can say now that it is MUCH better (regarding to backlight bleeding) than my old screen.</p>
<p>So your options are for WUXGA (excluding the Samsung panel):</p>
<ul>
<li>42T0361 (according to the hw maintenance manual)</li>
<li>42T0613 (according to me)</li>
<li>45N3310 (according to IBM)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://codevanrohde.nl/wordpress/?feed=rss2&amp;p=178</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brightness indicator for Ubuntu Unity</title>
		<link>http://codevanrohde.nl/wordpress/?p=128</link>
		<comments>http://codevanrohde.nl/wordpress/?p=128#comments</comments>
		<pubDate>Sat, 20 Aug 2011 18:14:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[brightness]]></category>
		<category><![CDATA[indicator]]></category>
		<category><![CDATA[indicator-brightness]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Unity]]></category>

		<guid isPermaLink="false">http://codevanrohde.nl/wordpress/?p=128</guid>
		<description><![CDATA[With this indicator you can set your screen brightness in Ubuntu Unity. To my surprise there is no mention of such an indicator in the List of Application indicators at askubuntu.com, nor can I find it anywhere else. I used the original Gnome brightness applet a lot. This indicator borrows its icon Features: Clicking the [...]]]></description>
			<content:encoded><![CDATA[<p>With this indicator you can set your screen brightness in Ubuntu Unity.<br />
To my surprise there is no mention of such an indicator in the <a href="http://askubuntu.com/questions/30334/list-of-application-indicators">List of Application indicators</a> at askubuntu.com, nor can I find it anywhere else.<br />
I used the original Gnome brightness applet a lot. This indicator borrows its icon <img src='http://codevanrohde.nl/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
<span id="more-128"></span><br />
<strong>Features:</strong></p>
<ul>
<li>Clicking the icon shows you all the possible brightness values.</li>
<li>The current value is indicated with a dot.</li>
<li>Clicking a menu item sets the brightness to the desired value.</li>
<li>Scroll wheel event is enabled on the icon. Scrolling up means lower brightness, scrolling down higher.</li>
</ul>
<p><strong>Download (for 11.04):</strong> <a href="http://codevanrohde.nl/wordpress/wp-content/plugins/filedownload/download.php/?path=http://codevanrohde.nl/wordpress/wp-content/uploads/2011/08/indicator-brightness-0.0.2_all.deb&type=application/x-deb&referer=/wordpress/?feed=rss2"><span>indicator-brightness-0.0.2_all.deb</span></a><br />
<strong>Download (for 11.10):</strong> <a href="http://codevanrohde.nl/wordpress/wp-content/plugins/filedownload/download.php/?path=http://codevanrohde.nl/wordpress/wp-content/uploads/2011/10/indicator-brightness-0.0.2_all-oneiric.deb&type=application/x-deb&referer=/wordpress/?feed=rss2"><span>indicator-brightness-0.0.2_all-oneiric.deb</span></a><br />
Please let me know if the Oneiric version is OK or not. </p>
<hr/>
<font color="green"><strong>Download altered script as per request (for 11.10):</strong></font><br />
Changes:</p>
<ul>
<li>Max brightness steps: 15, for people who have more than 15 steps in their brightness settings. <em>(Suggested by Tom)</em></li>
<li>Min brightness step: 0. <em>(Suggested by Jeff)</em></li>
</ul>
<p>Download: <a href="http://codevanrohde.nl/wordpress/wp-content/plugins/filedownload/download.php/?path=http://codevanrohde.nl/wordpress/wp-content/uploads/2011/11/indicator-brightness-maxsteps.py&type=text/plain&referer=/wordpress/?feed=rss2"><span>indicator-brightness-maxsteps.py</span></a></p>
<p>
To test it, you can start it from the command line with:<br />
<code>python indicator-brightness-maxsteps.py</code><br />
Control-C will stop it.
</p>
<p><strong>Please let me know if this script works, so I can make a new deb file.</strong></p>
<hr/>
<br/><br />
<strong>Installation:</strong><br />
<code>sudo dpkg -i indicator-brightness-0.0.2_all.deb</code><br />
or<br />
<code>sudo dpkg -i indicator-brightness-0.0.2_all-oneiric.deb</code><br />
or double-click the file in Nautilus.</p>
<p>After installing the package, add the program to your startup programs:<br />
Run System Settings &#187; Startup Applications &#187; &#8216;Add&#8217;</p>
<hr />
Name: <code>indicator-brightness</code><br />
Command: <code>/opt/indicator-brightness/indicator-brightness.py</code><br />
Comment: optional</p>
<hr />
Click &#8216;Add&#8217;.</p>
<p><strong>You may need to run <code>chmod +x /opt/indicator-brightness/indicator-brightness.py</code> in a terminal to make the script executable if nothing happens.<br />
Sorry for the inconvenience, but still looking for a way to make a better deb file.</strong></p>
<p><strong>Screenshot:</strong><br />
<a href="http://codevanrohde.nl/wordpress/wp-content/uploads/2011/08/indicator-brightness.png"><img src="http://codevanrohde.nl/wordpress/wp-content/uploads/2011/08/indicator-brightness.png" alt="" title="indicator-brightness" width="275" height="337" class="aligncenter size-full wp-image-141" /></a></p>
<p><strong>Versions:</strong><br />
0.0.1 Initial (<span>downloads: 549</span></a>)<br />
0.0.2 Fixed bug when indicator is not able to detect max brightness (<span>downloads: 3314</span></a>)<br />
0.0.2-oneiric Ubuntu 11.10 replaced gnome-power-backlight-helper with gsd-backlight-helper  (<span>downloads: 3340</span></a>)</p>
<p><em>DEB created with <a href="http://www.hanovsolutions.com/easydeb">Easy DEB/RPM creator</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://codevanrohde.nl/wordpress/?feed=rss2&amp;p=128</wfw:commentRss>
		<slash:comments>42</slash:comments>
		</item>
		<item>
		<title>Nederlandse radio streams in Rhythmbox</title>
		<link>http://codevanrohde.nl/wordpress/?p=96</link>
		<comments>http://codevanrohde.nl/wordpress/?p=96#comments</comments>
		<pubDate>Sat, 12 Mar 2011 16:11:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://codevanrohde.nl/wordpress/?p=96</guid>
		<description><![CDATA[Om Nederlandse radiostreams in Rhythmbox te krijgen download je dit bestand (rechtsklikken en &#8220;Opslaan als&#8221;). De oorspronkelijke bron voor alle streams in dit bestand: http://linux.softpedia.com/progDownload/Dutch-Radios-Download-55355.html Sluit Rhythmbox af. In Ubuntu open je het bestand ~/.local/share/rhythmbox/rhythmdb.xml De lokatie van dit bestand kan verschillen per systeem. Voeg het gedownloade bestand toe aan rhythmdb.xml. Zorg dat het bestand [...]]]></description>
			<content:encoded><![CDATA[<p>Om Nederlandse radiostreams in Rhythmbox te krijgen <a href='http://codevanrohde.nl/wordpress/wp-content/uploads/2011/03/dutchradio.xml'>download je dit bestand</a> (rechtsklikken en &#8220;Opslaan als&#8221;).</p>
<p>De oorspronkelijke bron voor alle streams in dit bestand:<br />
<a href="http://linux.softpedia.com/progDownload/Dutch-Radios-Download-55355.html">http://linux.softpedia.com/progDownload/Dutch-Radios-Download-55355.html</a></p>
<ol>
<li>Sluit Rhythmbox af.
</li>
<li>In Ubuntu open je het bestand <code>~/.local/share/rhythmbox/rhythmdb.xml</code><br />
De lokatie van dit bestand kan verschillen per systeem.
</li>
<li>Voeg het gedownloade bestand toe aan <code>rhythmdb.xml</code>. Zorg dat het bestand onder een andere <code>&lt;entry&gt;</code> tag komt te staan (dus sibling).
</li>
<li>Start Rhythmbox. Klik op &#8220;Radio&#8221;.
</li>
</ol>
<p>Alle stations moeten nu verschijnen.</p>
]]></content:encoded>
			<wfw:commentRss>http://codevanrohde.nl/wordpress/?feed=rss2&amp;p=96</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hi belstatus/beltegoed app voor Android</title>
		<link>http://codevanrohde.nl/wordpress/?p=35</link>
		<comments>http://codevanrohde.nl/wordpress/?p=35#comments</comments>
		<pubDate>Thu, 20 Jan 2011 19:14:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apk]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[belstatus]]></category>
		<category><![CDATA[beltegoed]]></category>
		<category><![CDATA[Hi.nl]]></category>
		<category><![CDATA[LO]]></category>

		<guid isPermaLink="false">http://codevanrohde.nl/wordpress/?p=35</guid>
		<description><![CDATA[Al langere tijd heb ik onvoldoende tijd om de app verder te onderhouden. Aangezien Hi me recentelijk gevraagd heeft de naam en de kleuren van de app aan te passen, heb ik besloten de app offline te halen. Er is sinds kort een officiële Hi Belstatus app: https://market.android.com/details?id=com.momac.belstatus Hoewel deze app nog niet goed werkt, [...]]]></description>
			<content:encoded><![CDATA[<p><strong><br />
<font color="red"><br />
Al langere tijd heb ik onvoldoende tijd om de app verder te onderhouden. Aangezien Hi me recentelijk gevraagd heeft de naam en de kleuren van de app aan te passen, heb ik besloten de app offline te halen.</p>
<p>Er is sinds kort een officiële Hi Belstatus app:<br />
<a href="https://market.android.com/details?id=com.momac.belstatus">https://market.android.com/details?id=com.momac.belstatus</a><br />
Hoewel deze app nog niet goed werkt, kreeg ik van Hi te horen dat ze hard aan het werk zijn om hem te verbeteren.</p>
<p>Tot ziens &#8230; misschien bij de volgende app <img src='http://codevanrohde.nl/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
</font><br />
</strong><br />
<span id="more-35"></span><br />
Sinds december vorig jaar heb ik een Samsung Galaxy S met een abonnement bij Hi.<br />
Helaas bestond er voor Hi geen Android app om je belstatus te kunnen bekijken.<br />
Daarom heb ik er één geschreven, en ik hoop dat jullie er ook wat aan hebben.</p>
<p><strong>Graag hoor ik wat jullie er van vinden.<br />
Beter nog: Meldt in deze blog de fouten die je ongetwijfeld tegen gaat komen.<br />
Of eventuele toevoegingen aan de app die je graag zou willen zien.<br />
</strong></p>
<p><strong>Features</strong><br />
Versie 1.2.3:</p>
<ul>
<li>App werkt nu ook voor mensen met 1 abonnement</li>
<li>SDK version 9 bovenlimiet verwijderd</li>
</ul>
<p>Versie 1.2.2:</p>
<ul>
<li>Op verzoek Toast notificaties als update vanaf menu gedaan wordt</li>
<li>Interval wordt afgerond op dichtsbijzijnde kwartier/halfuur/uur</li>
</ul>
<p>Versie 1.2.1:</p>
<ul>
<li>Op verzoek belstatus ook in het applicatie scherm weergeven</li>
<li>Look-and-feel gewijzigd. Ja, ik heb uitgevonden hoe je afgeronde achtergronden kan maken, en dat zullen jullie weten ook <img src='http://codevanrohde.nl/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
</ul>
<p>Versie 1.2:</p>
<ul>
<li>Interface aangepast</li>
<li>Belstatus op widget is nu groter</li>
<li>Widget heeft nu volledige 4&#215;2 afmeting</li>
<li>Voorkeur om automatische updates &#8216;s nachts of altijd uit of altijd aan te zetten</li>
<li>Belbundel en internetbundel worden op widget weergegeven</li>
</ul>
<p>Versie 1.1.1:</p>
<ul>
<li>Fixed FC na het terugkeren uit het menu</li>
</ul>
<p>Versie 1.1:</p>
<ul>
<li>Ophalen updates werkt nu ook in slaapstand betrouwbaar.</li>
<li>Verwacht resterend beltegoed wordt weergegeven in de widget</li>
<li>Updaten status veranderd in interval</li>
<li>Notificaties weergeven ja/nee</li>
<li>Opgeven welke dag van de maad het beltegoed wordt opgewaardeerd. Dit om het verwachte resterende beltegoed te kunnen berekenen.</li>
</ul>
<p>Versie 1.0:</p>
<ul>
<li>Automatische updates naar eigen smaak aan te passen</li>
<li>Handmatig updaten van status.</li>
<li>Widget, met de volgende info:
<ul>
<li>Je resterende beltegoed</li>
<li>Verbruik boven bundel</li>
<li>Verbruik dat niet in de bundel zit</li>
<li>Welke belbundel je hebt</li>
<li>Welke internetbundel je hebt</li>
</ul>
</li>
</ul>
<p><strong>Screenshots</strong><br />
<a href="http://codevanrohde.nl/wordpress/wp-content/uploads/2011/01/app-1.2.1.png"><img src="http://codevanrohde.nl/wordpress/wp-content/uploads/2011/01/app-1.2.1-180x300.png" alt="" title="app-1.2.1" width="180" height="300" class="aligncenter size-medium wp-image-82" /></a><br />
<a href="http://codevanrohde.nl/wordpress/wp-content/uploads/2011/01/widget-1.2.1.png"><img src="http://codevanrohde.nl/wordpress/wp-content/uploads/2011/01/widget-1.2.1-180x300.png" alt="" title="widget-1.2.1" width="180" height="300" class="aligncenter size-medium wp-image-81" /></a><br />
<a href="http://codevanrohde.nl/wordpress/wp-content/uploads/2011/01/preferences-1.2.2.png"><img src="http://codevanrohde.nl/wordpress/wp-content/uploads/2011/01/preferences-1.2.2-180x300.png" alt="" title="preferences-1.2.2" width="180" height="300" class="aligncenter size-medium wp-image-91" /></a></p>
<p><strong>Versies</strong><br />
Hi beltegoed &#8211; 1.2.3<br />
Hi-belstatus &#8211; 1.2.2<br />
Hi belstatus &#8211; 1.2.1<br />
Hi belstatus &#8211; 1.2<br />
Hi belstatus &#8211; 1.1.1<br />
Hi belstatus &#8211; 1.1<br />
Hi belstatus &#8211; 1.0</p>
]]></content:encoded>
			<wfw:commentRss>http://codevanrohde.nl/wordpress/?feed=rss2&amp;p=35</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>MBean (Managed Bean) JBoss example</title>
		<link>http://codevanrohde.nl/wordpress/?p=30</link>
		<comments>http://codevanrohde.nl/wordpress/?p=30#comments</comments>
		<pubDate>Wed, 19 Nov 2008 20:31:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[JBoss]]></category>
		<category><![CDATA[jmx]]></category>
		<category><![CDATA[mbean]]></category>

		<guid isPermaLink="false">http://codevanrohde.nl/wordpress/?p=30</guid>
		<description><![CDATA[MBeans are managed beans. They can be used to configure a running application (the application uses the mbean to read the configuration), or perform certain operations or tests from the jmx-console. The can also be used to emit notifications to registered clients. Mbeans run inside a mbean server. A mbean server is a repository of [...]]]></description>
			<content:encoded><![CDATA[<p>MBeans are managed beans. They can be used to configure a running application (the application uses the mbean to read the configuration), or perform certain operations or tests from the jmx-console. The can also be used to emit notifications to registered clients. Mbeans run inside a mbean server. A mbean server is a repository of managed beans.<br />
<span id="more-30"></span><br />
The next example is a mbean that has one configuration item (attribute param) and one method that can be invoked from the jmx-console (look for a service=MyExampleMBean link)</p>
<p>First, define an interface:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">interface</span> MyExampleMBean <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">Integer</span> getParam<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> setParam<span style="color: #009900;">&#40;</span><span style="color: #003399;">Integer</span> param<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">String</span> doSomething<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Second, implement the interface in a concrete class:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">@Service<span style="color: #009900;">&#40;</span>objectName <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;example-mbean:service=MyExampleMBean&quot;</span>, 
	name <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;MyExampleMBean&quot;</span><span style="color: #009900;">&#41;</span>
@Management<span style="color: #009900;">&#40;</span>MyExampleMBean.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MyExample <span style="color: #000000; font-weight: bold;">implements</span> MyExampleMBean <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">Integer</span> param<span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">Integer</span> getParam<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">param</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> setParam<span style="color: #009900;">&#40;</span><span style="color: #003399;">Integer</span> param<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">param</span> <span style="color: #339933;">=</span> param<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">String</span> doSomething<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #0000ff;">&quot;Param=&quot;</span> <span style="color: #339933;">+</span> <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">param</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>@Service and @Management are JBoss extensions to EJB3.<br />
The bean should be in a jar file inside the ${serverconfig}/lib directory or your application will not find it.</p>
<p>Third, access the mbean from within your application:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">MyExampleMBean myExample<span style="color: #339933;">;</span>
MBeanServer server <span style="color: #339933;">=</span> MBeanServerLocator.<span style="color: #006633;">locate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
  myExample <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>MyExampleMBean<span style="color: #009900;">&#41;</span> MBeanProxyExt.<span style="color: #006633;">create</span><span style="color: #009900;">&#40;</span>MyExampleMBean.<span style="color: #000000; font-weight: bold;">class</span>,
      <span style="color: #0000ff;">&quot;example-mbean:service=MyExampleMBean&quot;</span>, server<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #666666; font-style: italic;">// Access attribute</span>
  <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Param=&quot;</span> <span style="color: #339933;">+</span> myExample.<span style="color: #006633;">getParam</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #666666; font-style: italic;">// Invoke method</span>
  <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>myExample.<span style="color: #006633;">doSomething</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span>MalformedObjectNameException e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Cannot get MBean&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Fourth, configure your mbean with a xml file in the deploy directory. The file must end with &#8220;-service.xml&#8221; because it is a service descriptor.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;server<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mbean</span> <span style="color: #000066;">code</span>=<span style="color: #ff0000;">&quot;MyExample&quot;</span></span>
<span style="color: #009900;">      <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;example-mbean:service=MyExampleMBean&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #808080; font-style: italic;">&lt;!-- Note the attribute name is 'Param', not 'param' --&gt;</span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attribute</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Param&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>10<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/attribute<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mbean<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/server<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://codevanrohde.nl/wordpress/?feed=rss2&amp;p=30</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solve ClassCastExceptions in JBoss</title>
		<link>http://codevanrohde.nl/wordpress/?p=31</link>
		<comments>http://codevanrohde.nl/wordpress/?p=31#comments</comments>
		<pubDate>Tue, 18 Nov 2008 07:25:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://codevanrohde.nl/wordpress/?p=31</guid>
		<description><![CDATA[See: http://community.jboss.org/wiki/ClassCastExceptions]]></description>
			<content:encoded><![CDATA[<p>See: <a href="http://community.jboss.org/wiki/ClassCastExceptions" >http://community.jboss.org/wiki/ClassCastExceptions</a></p>
]]></content:encoded>
			<wfw:commentRss>http://codevanrohde.nl/wordpress/?feed=rss2&amp;p=31</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to alter JBoss deployment order</title>
		<link>http://codevanrohde.nl/wordpress/?p=29</link>
		<comments>http://codevanrohde.nl/wordpress/?p=29#comments</comments>
		<pubDate>Thu, 13 Nov 2008 10:54:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[deployment order]]></category>
		<category><![CDATA[JBoss]]></category>

		<guid isPermaLink="false">http://codevanrohde.nl/wordpress/?p=29</guid>
		<description><![CDATA[If one application depends on another one you may want to alter the deployment order of JBoss. One way to accomplish this is to create a deploy.last directory inside the deploy directory and put the application that needs to be deployed after the other in the deploy.last directory. Another one is to modify ${serverconfig}/conf.xmdesc/org.jboss.deployment.MainDeployer-xmbean.xml and [...]]]></description>
			<content:encoded><![CDATA[<p>If one application depends on another one you may want to alter the deployment order of JBoss.<br />
<span id="more-29"></span><br />
One way to accomplish this is to create a deploy.last directory inside the deploy directory and put the application that needs to be deployed after the other in the deploy.last directory.</p>
<p>Another one is to modify ${serverconfig}/conf.xmdesc/org.jboss.deployment.MainDeployer-xmbean.xml<br />
and add your application before the othes in the EnhancedSuffixOrder list.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attribute</span> <span style="color: #000066;">access</span>=<span style="color: #ff0000;">'read-write'</span> <span style="color: #000066;">setMethod</span>=<span style="color: #ff0000;">'setEnhancedSuffixOrder'</span> <span style="color: #000066;">getMethod</span>=<span style="color: #ff0000;">'getEnhancedSuffixOrder'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Allows the override of the suffix order declared by subdeployers, using the syntax [order:]suffix
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>EnhancedSuffixOrder<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>[Ljava.lang.String;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;descriptors<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;value</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;250:.rar,300:-ds.xml,400:.jar,500:.war,550:.jse,600:myapp.ear,650:.ear,800:.bsh&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/descriptors<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/attribute<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Note myapp.ear is put before the .ear suffix.</p>
]]></content:encoded>
			<wfw:commentRss>http://codevanrohde.nl/wordpress/?feed=rss2&amp;p=29</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Object to HTML dumper for Java</title>
		<link>http://codevanrohde.nl/wordpress/?p=20</link>
		<comments>http://codevanrohde.nl/wordpress/?p=20#comments</comments>
		<pubDate>Fri, 05 Sep 2008 20:13:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Data::Dumper]]></category>
		<category><![CDATA[object dumper]]></category>
		<category><![CDATA[print_r]]></category>
		<category><![CDATA[var_dump]]></category>

		<guid isPermaLink="false">http://codevanrohde.nl/wordpress/?p=20</guid>
		<description><![CDATA[Ever had to debug an application that used some complex objects? Objects containing other objects containing other objects etc. Then you may know it is a tedious job to inspect these objects during your debug session. That&#8217;s why I wrote this easy to use Java equivalent of PHP&#8217;s var_dump aka print_r, or Perl&#8217;s Data::Dumper (sort [...]]]></description>
			<content:encoded><![CDATA[<p>Ever had to debug an application that used some complex objects? Objects containing other objects containing other objects etc. Then you may know it is a tedious job to inspect these objects during your debug session.</p>
<p>That&#8217;s why I wrote this easy to use Java equivalent of PHP&#8217;s var_dump aka print_r, or Perl&#8217;s Data::Dumper (sort of).<br />
<span id="more-20"></span><br />
<strong>What it does</strong><br />
It takes an object (any object, Collection, Map, null, primitive, array, enum, or any combination of previous objects) as its argument, and dumps the content of the object as a html page. Included in the package is a css file to style your page, so the output has easy to distinguish colors for text, numbers, null values, warnings, errors etc.</p>
<p><strong>Screenshot</strong><br />
<img src="http://codevanrohde.nl/wordpress/wp-content/uploads/2008/09/objectdump.png" alt="ObjectDumper screenshot" /></p>
<p><strong>What you need</strong></p>
<ul>
<li>A super complicated, mind blowing, look how smart I am, object.</li>
<li>Dependency: objectdumper.</li>
<li>Other dependencies: commons-beanutils, commons-lang, commons-logging. (You&#8217;ll probably already have them).</li>
<li>A web browser.</li>
<li>A stylesheet (optional, but highly recommended)</li>
</ul>
<p>Download<br />
<a href="http://codevanrohde.nl/wordpress/wp-content/uploads/2008/09/objectdumper-010.jar">objectdumper.jar</a><br />
<a href="http://codevanrohde.nl/wordpress/wp-content/uploads/2008/09/objectdumper.rar">Source files</a><br />
<a href="http://codevanrohde.nl/wordpress/wp-content/uploads/2008/09/dump.css">Stylesheet</a></p>
<p><strong>Configuration</strong><br />
The ObjectDumper class uses a default configuration that can be overridden by a .properties file.<br />
The defaults are:</p>
<pre>
# The maximum number of levels ObjectDumper follows member objects.
# This is to prevent running out of memory, and because of circular
# references.

maxRecursionLevel=5

# Comma seperated list of packages the ObjectDumper should dump.
# Yes, you need to add java.util if you want Collections and Maps
# to be dumped.

dumpPackages=java.util

# Max items of arrays, Collections and Maps that need to be dumped.
maxItems=10
# Path where the css file can be found. Absolute or relative to the
# output html page.

stylesheetHref=dump.css

# If you want to incorporate the dump inside your own html page
# (I wanted that) then set this property to true (no html, head
# and body  declaration).

onlyHtmlContent=false

# Output full package+class name or only class name.

simpleClassNames=false
</pre>
<p><strong>Usage</strong><br />
<em>Inside a JSP page</em></p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #339933;">&lt;%</span>
ObjectDumper dumper <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ObjectDumper<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">StringWriter</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
dumper.<span style="color: #006633;">loadConfig</span><span style="color: #009900;">&#40;</span>getServletContext<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getRealPath</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;WEB-INF&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #003399;">System</span>.<span style="color: #006633;">getProperty</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;file.separator&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;dump.properties&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #339933;">%&gt;</span>
<span style="color: #339933;">&lt;%=</span>dumper.<span style="color: #006633;">writeObjectDump</span><span style="color: #009900;">&#40;</span>anObject<span style="color: #009900;">&#41;</span><span style="color: #339933;">%&gt;</span></pre></div></div>

<p><em>In a non web based Java application</em></p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">ObjectDumper dumper <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ObjectDumper<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">FileWriter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/somedir/test.html&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
dumper.<span style="color: #006633;">loadConfig</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/some_dir/dump.properties&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
dumper.<span style="color: #006633;">writeObjectDump</span><span style="color: #009900;">&#40;</span>anObject<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Point your web browser to /somedir/test.html and happy debugging!</p>
]]></content:encoded>
			<wfw:commentRss>http://codevanrohde.nl/wordpress/?feed=rss2&amp;p=20</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Set up hot deployment for ears with Maven and Eclipse</title>
		<link>http://codevanrohde.nl/wordpress/?p=19</link>
		<comments>http://codevanrohde.nl/wordpress/?p=19#comments</comments>
		<pubDate>Fri, 05 Sep 2008 19:05:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[ear]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[filesync plugin]]></category>
		<category><![CDATA[hot deployable]]></category>
		<category><![CDATA[hot deployment]]></category>
		<category><![CDATA[jar]]></category>
		<category><![CDATA[JBoss]]></category>
		<category><![CDATA[war]]></category>

		<guid isPermaLink="false">http://codevanrohde.nl/wordpress/?p=19</guid>
		<description><![CDATA[Hot deployment for maven applications running inside an application server is not something that is supported by Eclipse by default. So we have to do some tricks to make it work. Once set up, it works like a charm. What you need: Eclipse An Eclipse ear project FileSync plugin for Eclipse Maven 2 An application [...]]]></description>
			<content:encoded><![CDATA[<p>Hot deployment for maven applications running inside an application server is not something that is supported by Eclipse by default. So we have to do some tricks to make it work. Once set up, it works like a charm.<br />
<span id="more-19"></span></p>
<p>What you need:</p>
<ul>
<li>Eclipse</li>
<li>An Eclipse ear project</li>
<li><a href="http://andrei.gmxhome.de/filesync/index.html" target="_blank">FileSync plugin</a> for Eclipse</i>
<li>Maven 2</li>
<li>An application server that supports exploded archives, i.e. JBoss</li>
</ul>
<p>Steps to take:</p>
<ol>
<li>Use the unpackTypes or unpack option of the maven-ear-plugin. By setting this options, wars and ejb will be exploded inside the enclosing ear in the target directory. However, the ear itself remains packed.</li>
<li>Use the maven-dependency-plugin to copy everything unpacked to the deploy directory of your application server.</li>
<li>Create profiles in your super pom: A default profile for use during development. This profile uses the options mentioned above. An other profile is for distributing your ear files. This profiles does not unpack your wars and ejbs and the enclosing ear.</li>
<li>Configure the FileSync plugin to sync your class, jsp, (x)html, WEB-INF, properties files, etc. files with the deploy directory of the application server.</li>
</ol>
<p><strong>Steps 1 and 2</strong><br />
Change the build section of the ear:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;finalName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${myear.finalename}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/finalName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;defaultGoal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>install<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/defaultGoal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-ear-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;displayName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>My EAR<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/displayName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;unpackTypes<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${unpack.types}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/unpackTypes<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;modules<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #808080; font-style: italic;">&lt;!-- A web module --&gt;</span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;webModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        ...
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/webModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #808080; font-style: italic;">&lt;!-- A ejb module --&gt;</span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ejbModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        ...
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ejbModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #808080; font-style: italic;">&lt;!-- Een jar module --&gt;</span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;jarModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        ...
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/jarModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/modules<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.apache.maven.plugins<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-dependency-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>unpack<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>package<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>unpack<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactItems<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactItem<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                    ${myear.artifact.id}
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${myear.group.id}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${myear.version}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ear<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;overWrite<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/overWrite<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;outputDirectory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                    ${jboss.home}/server/${server.config}/deploy/${project.build.finalName}.ear
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/outputDirectory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactItem<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactItems<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Most ${} items need to be filled in by you as pom properties, or just hard wire them in your pom, some are automagically filled in by maven.<br />
Most important here is the &lt;unpackTypes&gt; tag. If you want to unpack all ejbs and wars inside your ear (and why wouldn&#8217;t you during development? <img src='http://codevanrohde.nl/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) the value is &#8220;ejb,war&#8221;. See <a href="http://maven.apache.org/plugins/maven-ear-plugin/examples/unpacking-a-module.html" target="_blank">this</a> site for more info.</p>
<p>An other way to configure which archive will be unpacked, is to configure it per archive with the &lt;unpack&gt; option. For example:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-ear-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;displayName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>My EAR<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/displayName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;modules<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ejbModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                ...
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ejbModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;webModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                ...
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;unpack<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${unpack}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/unpack<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/webModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;jarModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                ...
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/jarModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/modules<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>${unpack} can be either &#8220;true&#8221; or &#8220;false&#8221;.<br />
The unpackTypes and unpack tag values are configured inside your profiles, that&#8217;s why their values are properties. Which leads to</p>
<p><strong>Step 3</strong><br />
Create profiles in your super pom.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;profiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;profile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>development<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;activation<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;activeByDefault<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/activeByDefault<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>unpack<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/activation<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;unpack.types<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ejb,war<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/unpack.types<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;unpack<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/unpack<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/profile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;profile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>release<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;activation<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>unpack<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/activation<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;unpack.types<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/unpack.types<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;unpack<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/unpack<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/profile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/profiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Notice the unpack.types and unpack properties and how they are mixed here (Mixing them should normally not be done). By default unpacking is activated, to distribute your ear without unpacking use:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mvn package <span style="color: #660033;">-Dunpack</span>=<span style="color: #c20cb9; font-weight: bold;">false</span></pre></div></div>

<p>Of course there are many more ways to configure this, and my example will certainly not fit inside your project. Google is your friend.</p>
<p><strong>Step 4</strong><br />
Configure the FileSync plugin.<br />
Run mvn package once, and cd to the deploy directory of your application server. Examine the eploded ear, and where the &#8216;variable&#8217; files reside. Click right on you Eclipse project -> Properties -> File synchronization -> Enable File Sync builder for this project, and map all files that you want to sync to the right directory.</p>
]]></content:encoded>
			<wfw:commentRss>http://codevanrohde.nl/wordpress/?feed=rss2&amp;p=19</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Via C3 Nehemiah Archlinux kernel 2.6.24.4-1 package</title>
		<link>http://codevanrohde.nl/wordpress/?p=18</link>
		<comments>http://codevanrohde.nl/wordpress/?p=18#comments</comments>
		<pubDate>Tue, 15 Apr 2008 20:21:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://codevanrohde.nl/wordpress/?p=18</guid>
		<description><![CDATA[Download the package here. Install with pacman -U kernel26-2.6.24.4-1-i686.pkg.tar.gz]]></description>
			<content:encoded><![CDATA[<p>
Download the package <a href="http://www.codevanrohde.nl/wordpress/wp-content/uploads/2008/04/kernel26-2.6.24.4-1-i686.pkg.tar.gz">here</a>.</p>
<p>Install with pacman -U kernel26-2.6.24.4-1-i686.pkg.tar.gz</p>
]]></content:encoded>
			<wfw:commentRss>http://codevanrohde.nl/wordpress/?feed=rss2&amp;p=18</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

