<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.1" -->
<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/"
	>

<channel>
	<title>« overload</title>
	<link>http://blog.load-it.be</link>
	<description>behind the scenes, only the codes</description>
	<pubDate>Wed, 10 Jun 2009 19:37:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
	<language>en</language>
			<item>
		<title>Backup FTP OVH</title>
		<link>http://blog.load-it.be/2009/06/10/backup-ftp-ovh/</link>
		<comments>http://blog.load-it.be/2009/06/10/backup-ftp-ovh/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 19:37:46 +0000</pubDate>
		<dc:creator>Gilles</dc:creator>
		
		<category><![CDATA[Sys admin]]></category>

		<category><![CDATA[backup]]></category>

		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.load-it.be/2009/06/10/backup-ftp-ovh/</guid>
		<description><![CDATA[Excellent tutoriel proposé par DanSteph à http://www.dansteph.com/backupftp.php
Merci à lui.
]]></description>
			<content:encoded><![CDATA[<p>Excellent tutoriel proposé par DanSteph à<a href="http://www.dansteph.com/backupftp.php" title="ici"> http://www.dansteph.com/backupftp.php</a></p>
<p>Merci à lui.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.load-it.be/2009/06/10/backup-ftp-ovh/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Spring logging config</title>
		<link>http://blog.load-it.be/2009/06/04/spring-logging-config/</link>
		<comments>http://blog.load-it.be/2009/06/04/spring-logging-config/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 19:55:28 +0000</pubDate>
		<dc:creator>Gilles</dc:creator>
		
		<category><![CDATA[J2EE]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[Spring]]></category>

		<category><![CDATA[class]]></category>

		<category><![CDATA[log4j]]></category>

		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://blog.load-it.be/2009/06/04/spring-logging-config/</guid>
		<description><![CDATA[
Spring uses Apache commons-logging as a bridge between different logging implementations.
This way you can change from  a logging framework to any other supported loggin mechanism at any time.
The org.springframework.beans.factory.config.CommonsLogFactoryBean will create a "logger bean" and his type will depends on your configuration.
Example for the Log4j implementation:
In your application context,  add a CommonsLogFactoryBean and [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.load-it.be/wp-content/uploads/2009/02/spring25.thumbnail.png" alt="spring25.png" /></p>
<p>Spring uses Apache commons-logging as a bridge between different logging implementations.<br />
This way you can change from  a logging framework to any other supported loggin mechanism at any time.</p>
<p>The org.springframework.beans.factory.config.CommonsLogFactoryBean will create a "logger bean" and his type will depends on your configuration.</p>
<p>Example for the <a href="http://blog.load-it.be/tag/log4j/" class="internal_tag" rel="tag" title="Posts tagged with log4j">Log4j</a> implementation:</p>
<p>In your application context,  add a CommonsLogFactoryBean and give it a logName.</p>
<div class="igBar"><span id="lxml-6"><a href="#" onclick="javascript:showPlainTxt('xml-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-6">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;bean</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"logger"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"org.springframework.beans.factory.config.CommonsLogFactoryBean"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"logName"</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"log"</span><span style="font-weight: bold; color: black;">/&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/bean<span style="font-weight: bold; color: black;">&gt;</span></span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>In your web.<a href="http://blog.load-it.be/tag/xml/" class="internal_tag" rel="tag" title="Posts tagged with xml">xml</a>, add the <em>org.springframework.web.util.Log4jConfigListener</em> listener <strong>before</strong> the<br />
<em>org.springframework.web.context.ContextLoaderListener</em></p>
<div class="igBar"><span id="lxml-7"><a href="#" onclick="javascript:showPlainTxt('xml-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-7">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;context</span>-param<span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;param</span>-name<span style="font-weight: bold; color: black;">&gt;</span></span>log4jConfigLocation<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/param</span>-name<span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;param</span>-value<span style="font-weight: bold; color: black;">&gt;</span></span>WEB-INF/<a href="http://blog.load-it.be/tag/log4j/" class="internal_tag" rel="tag" title="Posts tagged with log4j">log4j</a>.properties<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/param</span>-value<span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/context</span>-param<span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;listener<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;listener</span>-<a href="http://blog.load-it.be/tag/class/" class="internal_tag" rel="tag" title="Posts tagged with class">class</a><span style="font-weight: bold; color: black;">&gt;</span></span>org.springframework.web.util.Log4jConfigListener<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/listener</span>-<a href="http://blog.load-it.be/tag/class/" class="internal_tag" rel="tag" title="Posts tagged with class">class</a><span style="font-weight: bold; color: black;">&gt;</span></span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/listener<span style="font-weight: bold; color: black;">&gt;</span></span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Here, my log4j config is locatedin the WEB-INF/<a href="http://blog.load-it.be/tag/log4j/" class="internal_tag" rel="tag" title="Posts tagged with log4j">log4j</a>.properties and here is its content:</p>
<div class="igBar"><span id="lxml-8"><a href="#" onclick="javascript:showPlainTxt('xml-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-8">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">log4j.rootCategory=DEBUG, CONSOLE# CONSOLE is set to be a ConsoleAppender using a PatternLayout.</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">log4j.appender.CONSOLE=org.apache.<a href="http://blog.load-it.be/tag/log4j/" class="internal_tag" rel="tag" title="Posts tagged with log4j">log4j</a>.ConsoleAppender</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">log4j.appender.CONSOLE.Threshold=DEBUG</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">log4j.appender.CONSOLE.layout=org.apache.<a href="http://blog.load-it.be/tag/log4j/" class="internal_tag" rel="tag" title="Posts tagged with log4j">log4j</a>.PatternLayout</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">log4j.category.net.sf.<a href="http://blog.load-it.be/tag/hibernate/" class="internal_tag" rel="tag" title="Posts tagged with Hibernate">hibernate</a>=DEBUG</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">log4j.category.org.springframework =DEBUG </div>
</li>
</ol>
</div>
</div>
</div>
<p>To make use of your logger in your other beans, add a member variable of type <em>org.apache.commons.logging.Log</em><br />
and configure <a href="http://blog.load-it.be/tag/spring/" class="internal_tag" rel="tag" title="Posts tagged with Spring">Spring</a> to inject the reference to the logger bean. For my part, I choose to do it through annotations because I don't want to have to make this reference in all my beans...<br />
So, in your application context, add the
<div class="igBar"><span id="lxml-9"><a href="#" onclick="javascript:showPlainTxt('xml-9'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-9">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;context</span>:annotation-config<span style="font-weight: bold; color: black;">/&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p> tag to enable the annotations config.In the targets beans, annotate the member variable as follow:</p>
<div class="igBar"><span id="ljava-10"><a href="#" onclick="javascript:showPlainTxt('java-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-10">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@Autowired @Qualifier<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"logger"</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">final</span> Log logger = <span style="color: #000000; font-weight: bold;">null</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.load-it.be/2009/06/04/spring-logging-config/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hibernate statistics on Tomcat with JMX</title>
		<link>http://blog.load-it.be/2009/04/26/hibernate-statistics-on-tomcat-with-jmx/</link>
		<comments>http://blog.load-it.be/2009/04/26/hibernate-statistics-on-tomcat-with-jmx/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 16:00:15 +0000</pubDate>
		<dc:creator>Gilles</dc:creator>
		
		<category><![CDATA[Hibernate]]></category>

		<category><![CDATA[J2EE]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[class]]></category>

		<category><![CDATA[Spring]]></category>

		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://blog.load-it.be/2009/04/26/hibernate-statistics-on-tomcat-with-jmx/</guid>
		<description><![CDATA[This little snippet will show you how to get Hibernate Statistics JMX MBean available.
Inside the tomcat startup script (bin/tomcatXw.exe), ensure that the following JAVA_OPTS are set:
JAVA_OPTS="
-Dcom.sun.management.jmxremote.port=9002
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.awt.headless=true"
In your Spring config, add:
PLAIN TEXT
XML:




&#60;bean id="jmxExporter" class="org.springframework.jmx.export.MBeanExporter"&#62;&#60;/bean&#62;


&#160;


&#60;property name="beans"&#62; 


&#60;map&#62; 


&#160; &#160; &#60;entry key="Hibernate:name=statistics"&#62;


&#160; &#160; &#160;&#60;ref local="statisticsBean"/&#62;


&#60;/entry&#62;


&#60;/map&#62; 


&#60;/property&#62; 


&#60;bean id="statisticsBean" class="org.hibernate.jmx.StatisticsService"/&#62;


&#60;property name="statisticsEnabled"&#62;&#60;value&#62;true&#60;/value&#62;&#60;/property&#62;


&#60;property name="sessionFactory"&#62;&#60;ref local="sessionFactory"&#62;&#60;/ref&#62;&#60;/property&#62; 






and then set the hibernate.generate_statistics property:
PLAIN [...]]]></description>
			<content:encoded><![CDATA[<p>This little snippet will show you how to get <a href="http://blog.load-it.be/tag/hibernate/" class="internal_tag" rel="tag" title="Posts tagged with Hibernate">Hibernate</a> Statistics <a href="http://blog.load-it.be/tag/jmx/" class="internal_tag" rel="tag" title="Posts tagged with JMX">JMX</a> MBean available.</p>
<p>Inside the tomcat startup script (bin/tomcatXw.exe), ensure that the following <a href="http://blog.load-it.be/tag/java/" class="internal_tag" rel="tag" title="Posts tagged with Java">JAVA</a>_OPTS are set:</p>
<p>JAVA_OPTS="<br />
-Dcom.sun.management.jmxremote.port=9002<br />
-Dcom.sun.management.jmxremote.authenticate=false<br />
-Dcom.sun.management.jmxremote.ssl=false<br />
-Djava.awt.headless=true"</p>
<p>In your <a href="http://blog.load-it.be/tag/spring/" class="internal_tag" rel="tag" title="Posts tagged with Spring">Spring</a> config, add:</p>
<div class="igBar"><span id="lxml-13"><a href="#" onclick="javascript:showPlainTxt('xml-13'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-13">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;bean</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"jmxExporter"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"org.springframework.<a href="http://blog.load-it.be/tag/jmx/" class="internal_tag" rel="tag" title="Posts tagged with JMX">jmx</a>.export.MBeanExporter"</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/bean<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"beans"</span><span style="font-weight: bold; color: black;">&gt;</span></span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;map<span style="font-weight: bold; color: black;">&gt;</span></span></span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;entry</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">"<a href="http://blog.load-it.be/tag/hibernate/" class="internal_tag" rel="tag" title="Posts tagged with Hibernate">Hibernate</a>:name=statistics"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ref</span> <span style="color: #000066;">local</span>=<span style="color: #ff0000;">"statisticsBean"</span><span style="font-weight: bold; color: black;">/&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/entry<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/map<span style="font-weight: bold; color: black;">&gt;</span></span></span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/property<span style="font-weight: bold; color: black;">&gt;</span></span></span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;bean</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"statisticsBean"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"org.<a href="http://blog.load-it.be/tag/hibernate/" class="internal_tag" rel="tag" title="Posts tagged with Hibernate">hibernate</a>.<a href="http://blog.load-it.be/tag/jmx/" class="internal_tag" rel="tag" title="Posts tagged with JMX">jmx</a>.StatisticsService"</span><span style="font-weight: bold; color: black;">/&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"statisticsEnabled"</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value<span style="font-weight: bold; color: black;">&gt;</span></span></span>true<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/property<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"sessionFactory"</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ref</span> <span style="color: #000066;">local</span>=<span style="color: #ff0000;">"sessionFactory"</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ref<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/property<span style="font-weight: bold; color: black;">&gt;</span></span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
and then set the <a href="http://blog.load-it.be/tag/hibernate/" class="internal_tag" rel="tag" title="Posts tagged with Hibernate">hibernate</a>.generate_statistics property:</p>
<div class="igBar"><span id="lxml-14"><a href="#" onclick="javascript:showPlainTxt('xml-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-14">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;prop</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">"<a href="http://blog.load-it.be/tag/hibernate/" class="internal_tag" rel="tag" title="Posts tagged with Hibernate">hibernate</a>.generate_statistics"</span><span style="font-weight: bold; color: black;">&gt;</span></span>true<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/prop<span style="font-weight: bold; color: black;">&gt;</span></span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>When you browse the MBeans (using JConsole.exe - which lives in the bin dir of your JDK 1.5 distribution), you should see <a href="http://blog.load-it.be/tag/hibernate/" class="internal_tag" rel="tag" title="Posts tagged with Hibernate">Hibernate</a>, if you double click on that node, you should see the Statistics Bean.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.load-it.be/2009/04/26/hibernate-statistics-on-tomcat-with-jmx/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Sending email with Spring and Velocity</title>
		<link>http://blog.load-it.be/2009/02/26/sending-email-with-spring-and-velocity/</link>
		<comments>http://blog.load-it.be/2009/02/26/sending-email-with-spring-and-velocity/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 20:20:59 +0000</pubDate>
		<dc:creator>Gilles</dc:creator>
		
		<category><![CDATA[J2EE]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Spring]]></category>

		<category><![CDATA[struts2]]></category>

		<category><![CDATA[Velocity]]></category>

		<guid isPermaLink="false">http://blog.load-it.be/?p=43</guid>
		<description><![CDATA[ 
I'll try to explain how it can be easy to create an email service class that uses Spring and Velocity to send mails.
First of all, what do you need in your classpath?

activation.jar
mail.jar
spring.jar
velocity.jar

I'm using Spring 2.5 and Velocity 1.5.
]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.load-it.be/wp-content/uploads/2009/02/spring25.thumbnail.png" alt="spring25.png" /> <img src="http://blog.load-it.be/wp-content/uploads/2009/02/velocity-logo.thumbnail.png" alt="velocity-logo.png" /></p>
<p>I'll try to explain how it can be easy to create an email service <a href="http://blog.load-it.be/tag/class/" class="internal_tag" rel="tag" title="Posts tagged with class">class</a> that uses <a href="http://blog.load-it.be/tag/spring/" class="internal_tag" rel="tag" title="Posts tagged with Spring">Spring</a> and <a href="http://blog.load-it.be/tag/velocity/" class="internal_tag" rel="tag" title="Posts tagged with Velocity">Velocity</a> to send mails.<br />
First of all, what do you need in your classpath?</p>
<ul>
<li>activation.jar</li>
<li>mail.jar</li>
<li>spring.jar</li>
<li>velocity.jar</li>
</ul>
<p>I'm using <a href="http://blog.load-it.be/tag/spring/" class="internal_tag" rel="tag" title="Posts tagged with Spring">Spring</a> 2.5 and <a href="http://blog.load-it.be/tag/velocity/" class="internal_tag" rel="tag" title="Posts tagged with Velocity">Velocity</a> 1.5.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.load-it.be/2009/02/26/sending-email-with-spring-and-velocity/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Accessing Spring application context in MDB&#8217;s</title>
		<link>http://blog.load-it.be/2009/02/17/accessing-spring-application-context-in-mdbs/</link>
		<comments>http://blog.load-it.be/2009/02/17/accessing-spring-application-context-in-mdbs/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 08:22:21 +0000</pubDate>
		<dc:creator>Gilles</dc:creator>
		
		<category><![CDATA[J2EE]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[Spring]]></category>

		<category><![CDATA[EJB]]></category>

		<category><![CDATA[jms]]></category>

		<category><![CDATA[mdb]]></category>

		<guid isPermaLink="false">http://blog.load-it.be/?p=42</guid>
		<description><![CDATA[
Let's say you have a message driven bean in which you want to inject spring beans.
Add an interceptor
Annotate your MDB with the @Interceptors and specify SpringBeanAutowiringInterceptor.class as interceptor. This is an EJB3-compliant interceptor class that injects Spring beans into fields and methods which are annotated with @Autowired. Performs injection after construction as well as after [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.load-it.be/wp-content/uploads/2009/02/spring25.thumbnail.png" alt="spring25.png" /><br />
Let's say you have a message driven bean in which you want to inject <a href="http://blog.load-it.be/tag/spring/" class="internal_tag" rel="tag" title="Posts tagged with Spring">spring</a> beans.</p>
<h2>Add an interceptor</h2>
<p>Annotate your <a href="http://blog.load-it.be/tag/mdb/" class="internal_tag" rel="tag" title="Posts tagged with mdb">MDB</a> with the @Interceptors and specify <strong>SpringBeanAutowiringInterceptor.<a href="http://blog.load-it.be/tag/class/" class="internal_tag" rel="tag" title="Posts tagged with class">class</a></strong> as interceptor. This is an <a href="http://blog.load-it.be/tag/ejb/" class="internal_tag" rel="tag" title="Posts tagged with EJB">EJB</a>3-compliant interceptor <a href="http://blog.load-it.be/tag/class/" class="internal_tag" rel="tag" title="Posts tagged with class">class</a> that injects <a href="http://blog.load-it.be/tag/spring/" class="internal_tag" rel="tag" title="Posts tagged with Spring">Spring</a> beans into fields and methods which are annotated with @Autowired. Performs injection after construction as well as after activation of a passivated bean.<br />
The actual BeanFactory to obtain <a href="http://blog.load-it.be/tag/spring/" class="internal_tag" rel="tag" title="Posts tagged with Spring">Spring</a> beans from is determined by the getBeanFactory(<a href="http://blog.load-it.be/tag/java/" class="internal_tag" rel="tag" title="Posts tagged with Java">java</a>.lang.Object) template method. The default implementation obtains the <a href="http://blog.load-it.be/tag/spring/" class="internal_tag" rel="tag" title="Posts tagged with Spring">Spring</a> ContextSingletonBeanFactoryLocator, initialized from the default resource location classpath*:beanRefContext.<a href="http://blog.load-it.be/tag/xml/" class="internal_tag" rel="tag" title="Posts tagged with xml">xml</a>, and obtains the single ApplicationContext defined there.<br />
(for more info, <a href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/ejb/interceptor/SpringBeanAutowiringInterceptor.html" rel="nofollow">see doc</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.load-it.be/2009/02/17/accessing-spring-application-context-in-mdbs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Spring annotations based config</title>
		<link>http://blog.load-it.be/2009/02/16/spring-annotations-based-config/</link>
		<comments>http://blog.load-it.be/2009/02/16/spring-annotations-based-config/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 20:41:07 +0000</pubDate>
		<dc:creator>Gilles</dc:creator>
		
		<category><![CDATA[J2EE]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[Spring]]></category>

		<category><![CDATA[soa]]></category>

		<guid isPermaLink="false">http://blog.load-it.be/?p=41</guid>
		<description><![CDATA[
It is now possible to configure Spring's dependency injection with annotations. This means that annotations can be used in Spring to mark fields, methods and classes that need dependency injection. Spring also supports auto-wiring of the bean dependencie. Annotations can also be used to indicate fields that are to be auto-wired. Furthermore, auto-detection of annotated [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.load-it.be/wp-content/uploads/2009/02/spring25.thumbnail.png" alt="spring25.png" /></p>
<p>It is now possible to configure Spring's dependency injection with annotations. This means that annotations can be used in Spring to mark fields, methods and classes that need dependency injection. Spring also supports auto-wiring of the bean dependencie. Annotations can also be used to indicate fields that are to be auto-wired. Furthermore, auto-detection of annotated components in the classpath is also supported now. When these capabilities are combined, the amount of configuration and dependency mapping in the <a href="http://blog.load-it.be/tag/spring/" class="internal_tag" rel="tag" title="Posts tagged with Spring">Spring</a> configuration files is reduced drastically.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.load-it.be/2009/02/16/spring-annotations-based-config/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Exposing MBeans with Spring</title>
		<link>http://blog.load-it.be/2009/02/16/exposing-mbeans-with-spring-2/</link>
		<comments>http://blog.load-it.be/2009/02/16/exposing-mbeans-with-spring-2/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 20:21:05 +0000</pubDate>
		<dc:creator>Gilles</dc:creator>
		
		<category><![CDATA[J2EE]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[Spring]]></category>

		<category><![CDATA[JMX]]></category>

		<category><![CDATA[soa]]></category>

		<guid isPermaLink="false">http://blog.load-it.be/?p=40</guid>
		<description><![CDATA[
Spring could be an alternative to expose Mbeans (see Spring doc).
The JMX support in Spring provides you with the features to easily and transparently integrate Spring application into a JMX infrastructure.
Specifically, Spring's JMX support provides four core features:

The automatic registration of any Spring bean as a JMX MBean
A flexible mechanism for controlling the management interface [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.load-it.be/wp-content/uploads/2009/02/spring25.thumbnail.png" alt="spring25.png" /><br />
Spring could be an alternative to expose Mbeans (see <a href="http://blog.load-it.be/tag/spring/" class="internal_tag" rel="tag" title="Posts tagged with Spring">Spring</a> doc).<br />
The <a href="http://blog.load-it.be/tag/jmx/" class="internal_tag" rel="tag" title="Posts tagged with JMX">JMX</a> support in Spring provides you with the features to easily and transparently integrate <a href="http://blog.load-it.be/tag/spring/" class="internal_tag" rel="tag" title="Posts tagged with Spring">Spring</a> application into a <a href="http://blog.load-it.be/tag/jmx/" class="internal_tag" rel="tag" title="Posts tagged with JMX">JMX</a> infrastructure.</p>
<p>Specifically, <a href="http://blog.load-it.be/tag/spring/" class="internal_tag" rel="tag" title="Posts tagged with Spring">Spring</a>'s <a href="http://blog.load-it.be/tag/jmx/" class="internal_tag" rel="tag" title="Posts tagged with JMX">JMX</a> support provides four core features:</p>
<ul>
<li>The automatic registration of any <a href="http://blog.load-it.be/tag/spring/" class="internal_tag" rel="tag" title="Posts tagged with Spring">Spring</a> bean as a <a href="http://blog.load-it.be/tag/jmx/" class="internal_tag" rel="tag" title="Posts tagged with JMX">JMX</a> MBean</li>
<li>A flexible mechanism for controlling the management interface of your beans</li>
<li>The declarative exposure of MBeans over remote, JSR-160 connectors</li>
<li>The simple proxying of both local and remote MBean resources</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.load-it.be/2009/02/16/exposing-mbeans-with-spring-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Saint-Sorlin2009</title>
		<link>http://blog.load-it.be/2009/01/24/saint-sorlin2009/</link>
		<comments>http://blog.load-it.be/2009/01/24/saint-sorlin2009/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 20:35:08 +0000</pubDate>
		<dc:creator>Gilles</dc:creator>
		
		<category><![CDATA[Snowboarding]]></category>

		<category><![CDATA[Travels]]></category>

		<guid isPermaLink="false">http://blog.load-it.be/?p=39</guid>
		<description><![CDATA[
[Show picture list]

The Flash Player and a browser with Javascript support are needed..

	
		var so2498 = new SWFObject("http://blog.load-it.be/wp-content/plugins/nextgen-gallery/imagerotator.swf", "ngg_slideshow2", "320", "240", "7", "#000000");
		so2498.addParam("wmode", "opaque");
		so2498.addVariable("file", "http://blog.load-it.be/wp-content/plugins/nextgen-gallery/nggextractXML.php?gid=2");
		so2498.addVariable("shownavigation", "false");
		so2498.addVariable("showicons", "false");
		so2498.addVariable("linkfromdisplay", "true");
		so2498.addVariable("overstretch", "true");
		so2498.addVariable("backcolor", "0x000000");
		so2498.addVariable("frontcolor", "0xFFFFFF");
		so2498.addVariable("lightcolor", "0xCC0000");
		so2498.addVariable("screencolor", "0x000000");
		so2498.addVariable("rotatetime", "10");
		so2498.addVariable("transition", "random");
		so2498.addVariable("width", "320");
		so2498.addVariable("height", "240");
		so2498.write("ngg_slideshow2");
	

]]></description>
			<content:encoded><![CDATA[<div class="ngg-galleryoverview">
<div class="slideshowlink"><a class="slideshowlink" href="/feed/?show=gallery">[Show picture list]</a></div>
<div class="slideshow" id="ngg_slideshow2">
<p>The <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> and <a href="http://www.mozilla.com/firefox/">a browser with Javascript support</a> are needed..</p>
</div>
<p>	<script type="text/javascript" defer="defer">
		var so2565 = new SWFObject("http://blog.load-it.be/wp-content/plugins/nextgen-gallery/imagerotator.swf", "ngg_slideshow2", "320", "240", "7", "#000000");
		so2565.addParam("wmode", "opaque");
		so2565.addVariable("file", "http://blog.load-it.be/wp-content/plugins/nextgen-gallery/nggextractXML.<a href="http://blog.load-it.be/tag/php/" class="internal_tag" rel="tag" title="Posts tagged with php">php</a>?gid=2");
		so2565.addVariable("shownavigation", "false");
		so2565.addVariable("showicons", "false");
		so2565.addVariable("linkfromdisplay", "true");
		so2565.addVariable("overstretch", "true");
		so2565.addVariable("backcolor", "0x000000");
		so2565.addVariable("frontcolor", "0xFFFFFF");
		so2565.addVariable("lightcolor", "0xCC0000");
		so2565.addVariable("screencolor", "0x000000");
		so2565.addVariable("rotatetime", "10");
		so2565.addVariable("transition", "random");
		so2565.addVariable("width", "320");
		so2565.addVariable("height", "240");
		so2565.write("ngg_slideshow2");
	</script></div>
<div class="ngg-clear"></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.load-it.be/2009/01/24/saint-sorlin2009/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Getting started with Apache tiles2 and struts2</title>
		<link>http://blog.load-it.be/2008/10/04/getting-started-with-apache-tiles2-and-struts2/</link>
		<comments>http://blog.load-it.be/2008/10/04/getting-started-with-apache-tiles2-and-struts2/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 10:09:08 +0000</pubDate>
		<dc:creator>Gilles</dc:creator>
		
		<category><![CDATA[Java]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Struts]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[struts2]]></category>

		<category><![CDATA[tiles]]></category>

		<guid isPermaLink="false">http://blog.load-it.be/?p=37</guid>
		<description><![CDATA[ 
Apache Tiles         is a templating framework built to simplify the development of web       application user interfaces.
Requirements
To use Tiles in your application you need:

a Java Runtime Environment following the Java SE 5.0 specifications;
a servlet container that supports Servlet 2.4 (or above) [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.load-it.be/wp-content/uploads/2008/10/logo.thumbnail.png" alt="tiles" /> <img src="http://blog.load-it.be/wp-content/uploads/2009/02/struts2.thumbnail.png" alt="struts2.png" /><br />
<strong><a href="http://tiles.apache.org/">Apache Tiles</a></strong>         is a templating framework built to simplify the development of web       application user interfaces.</p>
<h2>Requirements</h2>
<p>To use <a href="http://blog.load-it.be/tag/tiles/" class="internal_tag" rel="tag" title="Posts tagged with tiles">Tiles</a> in your application you need:</p>
<ul>
<li>a <a href="http://blog.load-it.be/tag/java/" class="internal_tag" rel="tag" title="Posts tagged with Java">Java</a> Runtime Environment following the <strong>Java SE 5.0</strong> specifications;</li>
<li>a servlet container that supports <strong>Servlet 2.4</strong> (or above) and <strong>JSP 2.0</strong> (or above).</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.load-it.be/2008/10/04/getting-started-with-apache-tiles2-and-struts2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Beware of the dog</title>
		<link>http://blog.load-it.be/2008/10/04/beware-of-the-dog/</link>
		<comments>http://blog.load-it.be/2008/10/04/beware-of-the-dog/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 09:33:54 +0000</pubDate>
		<dc:creator>Gilles</dc:creator>
		
		<category><![CDATA[Everyday life]]></category>

		<category><![CDATA[savate]]></category>

		<guid isPermaLink="false">http://blog.load-it.be/?p=36</guid>
		<description><![CDATA[


A few weeks ago, I started  french kickboxing 
]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.load-it.be/wp-content/uploads/2008/10/savate.jpg" title="savate"></p>
<p style="text-align: center"><img src="http://blog.load-it.be/wp-content/uploads/2008/10/savate.jpg" alt="savate" border="0" /></p>
<p></a></p>
<p>A few weeks ago, I started  french kickboxing <img src='http://blog.load-it.be/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.load-it.be/2008/10/04/beware-of-the-dog/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
