<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-9305883</id><updated>2012-01-28T14:06:05.424-08:00</updated><title type='text'>Templth's blog</title><subtitle type='html'>Spring, Web2, OSGi and modeling technologies</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://templth.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://templth.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Thierry Templier</name><uri>http://www.blogger.com/profile/03004192228796764530</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>17</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9305883.post-303330987625002297</id><published>2010-07-01T00:36:00.000-07:00</published><updated>2010-07-01T00:43:40.962-07:00</updated><title type='text'>Spring Batch in action went in MEAP</title><content type='html'>I'm pleased to announce that the book "Spring Batch in action" went in MEAP yesterday. You can read it at the following address: &lt;a href="http://www.manning.com/templier/"&gt;http://www.manning.com/templier/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9305883-303330987625002297?l=templth.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://templth.blogspot.com/feeds/303330987625002297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9305883&amp;postID=303330987625002297' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/303330987625002297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/303330987625002297'/><link rel='alternate' type='text/html' href='http://templth.blogspot.com/2010/07/spring-batch-in-action-goes-in-meap.html' title='Spring Batch in action went in MEAP'/><author><name>Thierry Templier</name><uri>http://www.blogger.com/profile/03004192228796764530</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9305883.post-1156809637934811836</id><published>2009-03-19T03:15:00.000-07:00</published><updated>2009-03-19T03:17:45.645-07:00</updated><title type='text'>Salon Linux in Paris</title><content type='html'>I'll be present at the Salon Linux 2009 in Paris on April, the 1st and 2nd with my company Argia-Engineering in order to describe and show our service platform Faascape.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9305883-1156809637934811836?l=templth.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://templth.blogspot.com/feeds/1156809637934811836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9305883&amp;postID=1156809637934811836' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/1156809637934811836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/1156809637934811836'/><link rel='alternate' type='text/html' href='http://templth.blogspot.com/2009/03/salon-linux-in-paris.html' title='Salon Linux in Paris'/><author><name>Thierry Templier</name><uri>http://www.blogger.com/profile/03004192228796764530</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9305883.post-7694735604657478767</id><published>2009-03-11T02:33:00.000-07:00</published><updated>2009-03-19T03:18:27.920-07:00</updated><title type='text'>Blogging again!</title><content type='html'>After a long time without blogging, I decided to start over. In the meantime, I renamed the blog in order to better describe the subjects of articles. These subjects will be now a bit more extensive and will cover the following:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Spring technologies and projects,&lt;/li&gt;&lt;li&gt;OSGi related technologies and projects,&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Web2 and JavaScript technlogies,&lt;/li&gt;&lt;li&gt;Modeling and model driven technologies.&lt;/li&gt;&lt;/ul&gt;With this blog, I will do my utmost to point out interesting aspects of these technologies!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9305883-7694735604657478767?l=templth.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://templth.blogspot.com/feeds/7694735604657478767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9305883&amp;postID=7694735604657478767' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/7694735604657478767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/7694735604657478767'/><link rel='alternate' type='text/html' href='http://templth.blogspot.com/2009/03/after-long-time-without-blogging-i.html' title='Blogging again!'/><author><name>Thierry Templier</name><uri>http://www.blogger.com/profile/03004192228796764530</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9305883.post-112470015528937982</id><published>2005-08-22T01:42:00.000-07:00</published><updated>2005-08-22T01:42:35.290-07:00</updated><title type='text'>Access CICS with Spring</title><content type='html'>Here is an article I have made to explain and show how to access CICS transactions and programs with the Spring JCA support.&lt;br /&gt;&lt;br /&gt;This article is published by JavaWorld at the following url:&lt;br /&gt;&lt;a href="http://www.javaworld.com/javaworld/jw-08-2005/jw-0822-cics.html"&gt;Access CICS applications with Spring&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9305883-112470015528937982?l=templth.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://templth.blogspot.com/feeds/112470015528937982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9305883&amp;postID=112470015528937982' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/112470015528937982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/112470015528937982'/><link rel='alternate' type='text/html' href='http://templth.blogspot.com/2005/08/access-cics-with-spring.html' title='Access CICS with Spring'/><author><name>Thierry Templier</name><uri>http://www.blogger.com/profile/03004192228796764530</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9305883.post-112419101589812577</id><published>2005-08-16T04:05:00.000-07:00</published><updated>2005-08-16T04:42:59.706-07:00</updated><title type='text'>Use Groovy with Spring</title><content type='html'>Groovy is an interesting script engine on the JVM. The main is to provide an embedded component of a Java/J2EE application, to help write and customize business rules, or other moving parts of your application [cf G. Laforge].&lt;br /&gt;&lt;br /&gt;&lt;b&gt;I. Support in Spring&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Spring offers a support for script tools in the sandbox. This support provides a generic component that can be extended in order to plug an implementation for a dedicated tool. This framework is localized in the org.springframework.beans.factory.script package and the groovy support in the org.springframework.beans.factory.script.groovy package.&lt;br /&gt;This support is based on the facility of Spring to configure beans based on factory. Thus, the configuration of a Groovy object is divided into two steps:&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Configuration of the Spring factory for Groovy&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Configuration of the bean representing a Groovy object&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;The factory is simply configured as following:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;bean id="groovyScriptFactory"&lt;br /&gt;   class="org.springframework.beans.factory.script.groovy.GroovyScriptFactory"&amp;gt;&lt;br /&gt;    &amp;lt;property name="expirySeconds"&amp;gt;&lt;br /&gt;        &amp;lt;value&amp;gt;1&amp;lt;/value&amp;gt;&lt;br /&gt;    &amp;lt;/property&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Then you can configure your script with its location and inject all the properties used by it:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;bean id="testGroovy" singleton="true"&lt;br /&gt;         factory-bean="groovyScriptFactory"&lt;br /&gt;         factory-method="create"&amp;gt;&lt;br /&gt;    &amp;lt;constructor-arg&amp;gt;&lt;br /&gt;        &amp;lt;value&amp;gt;classpath:/groovy/simple.groovy&amp;lt;/value&amp;gt;&lt;br /&gt;    &amp;lt;/constructor-arg&amp;gt;&lt;br /&gt;    &amp;lt;property name="message"&amp;gt;&lt;br /&gt;        &amp;lt;value&amp;gt;the value of my propertylt;/value&amp;gt;&lt;br /&gt;    &amp;lt;/property&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The Groovy script used will be the following. You can see that the value of the "message" property has been injected using Spring...&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;package groovy;&lt;br /&gt;&lt;br /&gt;public class TestImpl implements Test {&lt;br /&gt;    @Property test;&lt;br /&gt;    @Property message;&lt;br /&gt;    @Property method;&lt;br /&gt;    @Property list = {&lt;br /&gt;        param -&gt;&lt;br /&gt;        println "list - param : ${param} - "+param;&lt;br /&gt;    };&lt;br /&gt;&lt;br /&gt;    @Property Closure list1  = {&lt;br /&gt;        param -&gt;&lt;br /&gt;        println "hoho! list1 - param : ${param} - "+param;&lt;br /&gt;    };&lt;br /&gt;&lt;br /&gt;    public TestImpl() {&lt;br /&gt;        method = { |name| println "Hello, ${name}" }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    void test() {&lt;br /&gt;        println message;&lt;br /&gt;        method(message);&lt;br /&gt;        list("test");&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In our case, we expose the bean on Groovy thanks to the Test interface, so the application see it and doesn't know that the implementation is a Groovy script!&lt;br /&gt;&lt;br /&gt;However, this use isn't mandatory and you can see the Groovy script as a GroovyObject directly and nevertheless inject properties with Spring!!&lt;br /&gt;&lt;br /&gt;In the next part of "Use Groovy with Spring", we will show and explain how Steven Devijver load and construct a J2EE based on Groovy scripts and its closure feature, in the Grails project.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9305883-112419101589812577?l=templth.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://templth.blogspot.com/feeds/112419101589812577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9305883&amp;postID=112419101589812577' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/112419101589812577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/112419101589812577'/><link rel='alternate' type='text/html' href='http://templth.blogspot.com/2005/08/use-groovy-with-spring.html' title='Use Groovy with Spring'/><author><name>Thierry Templier</name><uri>http://www.blogger.com/profile/03004192228796764530</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9305883.post-112107322389923223</id><published>2005-07-11T02:07:00.000-07:00</published><updated>2005-07-11T02:13:43.903-07:00</updated><title type='text'>JCA documentation in Spring</title><content type='html'>The chapter of the JCA support in Spring has been added in the reference documentation with the version 1.2.2 of Spring.&lt;br /&gt;See the following url to read it!!&lt;br /&gt;&lt;a href="http://static.springframework.org/spring/docs/1.2.x/reference/cci.html"&gt;JCA CCI&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9305883-112107322389923223?l=templth.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://templth.blogspot.com/feeds/112107322389923223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9305883&amp;postID=112107322389923223' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/112107322389923223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/112107322389923223'/><link rel='alternate' type='text/html' href='http://templth.blogspot.com/2005/07/jca-documentation-in-spring.html' title='JCA documentation in Spring'/><author><name>Thierry Templier</name><uri>http://www.blogger.com/profile/03004192228796764530</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9305883.post-112012134851962902</id><published>2005-06-30T01:34:00.000-07:00</published><updated>2005-06-30T02:30:52.543-07:00</updated><title type='text'>"Is EJB3 a Spring killer?"</title><content type='html'>This is one of the most asked question at this time. The EJB3 specification has incopored interesting concepts and ideas from leading open source projects to make easier to use, remove lines of code and improve the time of application development.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Spring and EJB3 together&lt;/b&gt;&lt;br /&gt;I think that these two technologies don't make exactly the same things and it's a great things to use them together.&lt;br /&gt;There are two parts:&lt;br /&gt;- Access EJB with Spring.&lt;br /&gt;- Use Spring in EJB (transaction, components).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Spring philosophy&lt;/b&gt;&lt;br /&gt;Spring permit to build well-defined applications both in an application server and outside/without an application server. This framework underlines that you need to use the appropriated technology for your application: do you really need ejb / jta technologies? Is a servlet container enough? Local or global transactions?&lt;br /&gt;It focuses too on best pratices and design patterns to have a flexible, modular, reusable applications.&lt;br /&gt;EJB3 will surely be easier to use but the technology needs too to have best pratices and design patterns...&lt;br /&gt;Finally, before asking using Spring or EJB3, you may wonder which kind of applications, you need to develop. Then you can choose the appropriate technology(ies)!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Spring, not a specification...&lt;/b&gt;&lt;br /&gt;Finally, I think the important thing against is that Spring isn't a specification but EJB3 is...&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Readings&lt;/b&gt;&lt;br /&gt;Made you your opinion with the following readings!!!&lt;br /&gt;&lt;br /&gt;Some threads in the Spring forum on this subject:&lt;br /&gt;&lt;a href="http://forum.springframework.org/viewtopic.php?t=1390"&gt;EJB3&lt;/a&gt;&lt;br /&gt;&lt;a href="http://forum.springframework.org/viewtopic.php?t=1246"&gt;EJB3.0 without Spring :-)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;An article on the onjava site on this subject:&lt;br /&gt;&lt;a href="http://www.onjava.com/pub/a/onjava/2005/06/29/spring-ejb3.html"&gt;POJO Application Frameworks: Spring Vs. EJB 3.0&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Some insteresting blog entries on that subject:&lt;br /&gt;&lt;a href="http://chris-richardson.blog-city.com/the_ejb_cult_part_3__integrating_spring_and_ejb_30_dependency_injection.htm"&gt; The EJB cult Part 3 - Integrating Spring and EJB 3.0 dependency injection&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.almaer.com/blog/archives/000846.html"&gt;Spring, EJB 3, and the future&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A interesting article of Rob Harrop and Jan Machacek on Spring / EJB integration:&lt;br /&gt;&lt;a href="http://www.javaworld.com/javaworld/jw-02-2005/jw-0214-springejb.html"&gt; Pro Spring: Spring and EJB&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The EJB section of the Spring 1.2.x reference documentation:&lt;br /&gt;&lt;a href="http://www.springframework.org/docs/reference/ejb.html"&gt;Accessing and implementing EJBs&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9305883-112012134851962902?l=templth.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://templth.blogspot.com/feeds/112012134851962902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9305883&amp;postID=112012134851962902' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/112012134851962902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/112012134851962902'/><link rel='alternate' type='text/html' href='http://templth.blogspot.com/2005/06/is-ejb3-spring-killer.html' title='&quot;Is EJB3 a Spring killer?&quot;'/><author><name>Thierry Templier</name><uri>http://www.blogger.com/profile/03004192228796764530</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9305883.post-112005868070144037</id><published>2005-06-29T08:21:00.000-07:00</published><updated>2005-06-29T08:24:40.703-07:00</updated><title type='text'>JCA articles on developerWorks</title><content type='html'>IBM puts an interesting serie of articles about JCA 1.5 on the developerWorks web site at the following urls:&lt;br /&gt;&lt;a href="http://www-106.ibm.com/developerworks/java/library/j-jca1/index.html"&gt;Part 1&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www-106.ibm.com/developerworks/java/library/j-jca2/index.html"&gt;Part 2&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www-106.ibm.com/developerworks/java/library/j-jca3/index.html"&gt;Part 3&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9305883-112005868070144037?l=templth.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://templth.blogspot.com/feeds/112005868070144037/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9305883&amp;postID=112005868070144037' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/112005868070144037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/112005868070144037'/><link rel='alternate' type='text/html' href='http://templth.blogspot.com/2005/06/jca-articles-on-developerworks.html' title='JCA articles on developerWorks'/><author><name>Thierry Templier</name><uri>http://www.blogger.com/profile/03004192228796764530</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9305883.post-112005843842315609</id><published>2005-06-29T08:19:00.000-07:00</published><updated>2005-06-29T08:20:38.426-07:00</updated><title type='text'>Geronimo documentations on developerWorks</title><content type='html'>IBM puts some interesting documentations about Geronimo on the developerWorks web site at the following url:&lt;br /&gt;&lt;a href="http://www-128.ibm.com/developerworks/opensource/top-projects/geronimo.html"&gt;http://www-128.ibm.com/developerworks/opensource/top-projects/geronimo.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9305883-112005843842315609?l=templth.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://templth.blogspot.com/feeds/112005843842315609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9305883&amp;postID=112005843842315609' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/112005843842315609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/112005843842315609'/><link rel='alternate' type='text/html' href='http://templth.blogspot.com/2005/06/geronimo-documentations-on.html' title='Geronimo documentations on developerWorks'/><author><name>Thierry Templier</name><uri>http://www.blogger.com/profile/03004192228796764530</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9305883.post-111744439135862953</id><published>2005-05-30T02:05:00.000-07:00</published><updated>2005-05-30T08:48:46.100-07:00</updated><title type='text'>Tranql and XAPool</title><content type='html'>Geronimo uses an interesting project to transform a jdbc driver into a resource adapter. This project is called Tranql. Its home page is http://tranql.codehaus.org/.&lt;br /&gt;&lt;br /&gt;This page doesn't show a lot of informations and it is preferable to go to look at directly in the cvs ;-). The cvs is hosted by codehaus (cvs.tranql.codehaus.org) and the cvs root is /home/projects/tranql/scm.&lt;br /&gt;&lt;br /&gt;The project only wrap JDBC driver and doesn't add support to convert a no-xa driver into an xa driver... An interested approach is to develop an integration between Tranql and XAPool. So you can easily create an XA DataSource from a simple DataSource and manage its connections with a JCA connection manager.&lt;br /&gt;&lt;br /&gt;For example, with Tranql, you can configure a pool of connections with JCA in this way (using the Spring JCA support of Spring):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;bean id="tranqlManagedConnectionFactory"&lt;br /&gt;      class="org.tranql.connector.jdbc.XADriverMCF"&amp;gt;&lt;br /&gt;  &amp;lt;property name="driverName"&amp;gt;&lt;br /&gt;    &amp;lt;value&amp;gt;org.hsqldb.jdbcDriver&amp;lt;/value&amp;gt;&lt;br /&gt;  &amp;lt;/property&amp;gt;&lt;br /&gt;  &amp;lt;property name="url"&amp;gt;&lt;br /&gt;    &amp;lt;value&amp;gt;jdbc:hsqldb:hsql://localhost:9002&amp;lt;/value&amp;gt;&lt;br /&gt;  &amp;lt;/property&amp;gt;&lt;br /&gt;  &amp;lt;property name="user"&amp;gt;&lt;br /&gt;    &amp;lt;value&amp;gt;sa&amp;lt;/value&amp;gt;&lt;br /&gt;  &amp;lt;/property&amp;gt;&lt;br /&gt;  &amp;lt;property name="password"&amp;gt;&lt;br /&gt;    &amp;lt;value&amp;gt;&amp;lt;/value&amp;gt;&lt;br /&gt;  &amp;lt;/property&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So, to transform this DataSource in a XA compliant one, you only need to change the implementation of the ManagedConnectionManager. This XAPoolDataSourceMCF one integrates XAPool and use its StandardXADataSource class.&lt;br /&gt;The configuration is now:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;bean id="tranqlManagedConnectionFactory"&lt;br /&gt;      class="org.tranql.connector.jdbc.XAPoolDataSourceMCF "&amp;gt;&lt;br /&gt;  &amp;lt;property name="driverName"&amp;gt;&lt;br /&gt;    &amp;lt;value&amp;gt;org.hsqldb.jdbcDriver&amp;lt;/value&amp;gt;&lt;br /&gt;  &amp;lt;/property&amp;gt;&lt;br /&gt;  &amp;lt;property name="url"&amp;gt;&lt;br /&gt;    &amp;lt;value&amp;gt;jdbc:hsqldb:hsql://localhost:9002&amp;lt;/value&amp;gt;&lt;br /&gt;  &amp;lt;/property&amp;gt;&lt;br /&gt;  &amp;lt;property name="user"&amp;gt;&lt;br /&gt;    &amp;lt;value&amp;gt;sa&amp;lt;/value&amp;gt;&lt;br /&gt;  &amp;lt;/property&amp;gt;&lt;br /&gt;  &amp;lt;property name="password"&amp;gt;&lt;br /&gt;    &amp;lt;value&amp;gt;&amp;lt;/value&amp;gt;&lt;br /&gt;  &amp;lt;/property&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Note&lt;/b&gt;: A big problem is that XAPool internally manages the enlistment/delistment of XAResource. So you need to patch this tool to remove the call of enlist and delist on the current transaction.&lt;br /&gt;&lt;br /&gt;Here is a sample implementation of XAPoolDataSourceMCF:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;package org.tranql.connector.jdbc;&lt;br /&gt;&lt;br /&gt;import java.sql.SQLException;&lt;br /&gt;&lt;br /&gt;import javax.sql.XAConnection;&lt;br /&gt;import javax.sql.XADataSource;&lt;br /&gt;&lt;br /&gt;import org.enhydra.jdbc.standard.StandardXADataSource;&lt;br /&gt;import org.tranql.connector.AllExceptionsAreFatalSorter;&lt;br /&gt;&lt;br /&gt;public class XAPoolDataSourceMCF extends AbstractXADataSourceMCF {&lt;br /&gt;&lt;br /&gt;  public XAPoolDataSourceMCF() {&lt;br /&gt;    super(new StandardXADataSource(),new AllExceptionsAreFatalSorter());&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public String getUserName() {&lt;br /&gt;    return ((StandardXADataSource)xaDataSource).getUser();&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public String getPassword() {&lt;br /&gt;    return ((StandardXADataSource)xaDataSource).getPassword();&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public void setDriverName(String driverName) {&lt;br /&gt;    try {&lt;br /&gt;      ((StandardXADataSource)xaDataSource).setDriverName(driverName);&lt;br /&gt;    } catch (SQLException ex) { ex.printStackTrace(); }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public void setUrl(String url) {&lt;br /&gt;    ((StandardXADataSource)xaDataSource).setUrl(url);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public void setUser(String user) {&lt;br /&gt;    ((StandardXADataSource)xaDataSource).setUser(user);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public void setPassword(String password) {&lt;br /&gt;    ((StandardXADataSource)xaDataSource).setPassword(password);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The latest ManagedConnectionFactory implementation supports XA transactions!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9305883-111744439135862953?l=templth.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://templth.blogspot.com/feeds/111744439135862953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9305883&amp;postID=111744439135862953' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/111744439135862953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/111744439135862953'/><link rel='alternate' type='text/html' href='http://templth.blogspot.com/2005/05/tranql-and-xapool.html' title='Tranql and XAPool'/><author><name>Thierry Templier</name><uri>http://www.blogger.com/profile/03004192228796764530</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9305883.post-111660266470138454</id><published>2005-05-20T08:19:00.000-07:00</published><updated>2005-05-20T08:26:40.920-07:00</updated><title type='text'>Spring JCA support is out</title><content type='html'>The JCA CCI support is now integrated in the Spring framework 1.2.&lt;br /&gt;You can view the corresponding org.springframework.jca package in the Spring CVS of at the following url:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://cvs.sourceforge.net/viewcvs.py/springframework/spring/src/org/springframework/jca/"&gt;http://cvs.sourceforge.net/viewcvs.py/springframework/spring/src/org/springframework/jca/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9305883-111660266470138454?l=templth.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://templth.blogspot.com/feeds/111660266470138454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9305883&amp;postID=111660266470138454' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/111660266470138454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/111660266470138454'/><link rel='alternate' type='text/html' href='http://templth.blogspot.com/2005/05/spring-jca-support-is-out.html' title='Spring JCA support is out'/><author><name>Thierry Templier</name><uri>http://www.blogger.com/profile/03004192228796764530</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9305883.post-110560768645709093</id><published>2005-01-13T01:01:00.000-08:00</published><updated>2005-01-13T01:14:46.456-08:00</updated><title type='text'>Using of Ant in Eclipse</title><content type='html'>In order to use the javac task of ant when you launch ant in Eclipse, you need to configure a system property to use the Eclipse compiler.&lt;br /&gt;To do this, you can use a system property for the ant process (-D).&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;-Dbuild.compiler=org.eclipse.jdt.core.JDTCompilerAdapter&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;or a task in ant to initialize it. This task you must be called before every other tasks.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;project name="spring-core" default="traduction" basedir="."&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;target name="eclipse" if="eclipse.running"&amp;gt;&lt;br /&gt;    &amp;lt;property name="build.compiler"&lt;br /&gt;              value="org.eclipse.jdt.core.JDTCompilerAdapter" /&amp;gt;&lt;br /&gt;  &amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;target name="page-preface" depends="eclipse" description="overview"&amp;gt;&lt;br /&gt;    ...&lt;br /&gt;  &amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;  ...&lt;br /&gt;&amp;lt;/project&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9305883-110560768645709093?l=templth.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://templth.blogspot.com/feeds/110560768645709093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9305883&amp;postID=110560768645709093' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/110560768645709093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/110560768645709093'/><link rel='alternate' type='text/html' href='http://templth.blogspot.com/2005/01/using-of-ant-in-eclipse.html' title='Using of Ant in Eclipse'/><author><name>Thierry Templier</name><uri>http://www.blogger.com/profile/03004192228796764530</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9305883.post-110365692864150104</id><published>2004-12-21T11:21:00.000-08:00</published><updated>2005-01-06T09:12:48.410-08:00</updated><title type='text'>Datasources selection with Spring</title><content type='html'>The aim is to permit to an application (and the user) to select a specific datasource to use, so a user can choose a specific database and datas to access. We can use the same mechanism than Acegi: a filter to get the datasource name and place it in known holder ( based on a thread local ) and a specific datasource ( proxy on datasources ) to get this name in order to select the datasource to use.&lt;br /&gt;&lt;br /&gt;- &lt;b&gt;Datasource name context&lt;/b&gt;: it's in fact a class to store the name of the DataSource et a class (a simple ThreadLocal) to hold it (the known place).&lt;br /&gt;Here is an example of these two classes and interfaces:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public class DataSourceContextHolder {&lt;br /&gt;    private static ThreadLocal contextHolder = new ThreadLocal();&lt;br /&gt;&lt;br /&gt;    public static void setContext(DataSourceContext context) {&lt;br /&gt;        contextHolder.set(context);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public static DataSourceContext getContext() {&lt;br /&gt;        return (DataSourceContext) contextHolder.get();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public interface DataSourceContext {&lt;br /&gt;    public void setId(String id);&lt;br /&gt;    public String getId();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public class DataSourceContextImpl implements DataSourceContext {&lt;br /&gt;    private String id;&lt;br /&gt;&lt;br /&gt;    public void setId(String id) {&lt;br /&gt;        this.id=id;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getId() {&lt;br /&gt;        return id;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;- &lt;b&gt;Filter to detect context&lt;/b&gt;: the filter look for an datasource id in the session and put it in the context holder. The filter might be enhanced to have the feature to select the id and block this change when a user is authenticated on a database.&lt;br /&gt;&lt;br /&gt;- &lt;b&gt;Datasource selector&lt;/b&gt;: thanks to Spring, there is a datasource abstraction so we can put a proxy between our datasource and application. Our datasource proxy could  select another datasource configure in Spring at runtime using the datasource context.&lt;br /&gt;Here is an example of this proxy:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public class DataSourceSelector extends AbstractDataSource&lt;br /&gt;                                implements BeanFactoryAware {&lt;br /&gt;    private BeanFactory beanFactory;&lt;br /&gt;&lt;br /&gt;    public void setBeanFactory(BeanFactory beanFactory)&lt;br /&gt;                                               throws BeansException {&lt;br /&gt;        this.beanFactory=beanFactory;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Connection getConnection() throws SQLException {&lt;br /&gt;        DataSourceContext context=DataSourceContextHolder.getContext();&lt;br /&gt;        DataSource datasource=(DataSource)beanFactory.getBean(&lt;br /&gt;                                                      context.getId());&lt;br /&gt;        return datasource.getConnection();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Connection getConnection(String login,String password)&lt;br /&gt;                                                  throws SQLException {&lt;br /&gt;        DataSourceContext context=DataSourceContextHolder.getContext();&lt;br /&gt;        DataSource datasource=(DataSource)beanFactory.getBean(&lt;br /&gt;                                                      context.getId());&lt;br /&gt;        return datasource.getConnection(arg0,arg1);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This mechanism is independant of the application (Spring offers this&lt;br /&gt;facility!) but we must be carefull to not permit to access a database&lt;br /&gt;without be authenticated. The order of filter (with use of security filter such Acegi's) could be dangerous... The solution is not to permit to switch from&lt;br /&gt;a datasource to another when a user is authenticated. &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9305883-110365692864150104?l=templth.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://templth.blogspot.com/feeds/110365692864150104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9305883&amp;postID=110365692864150104' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/110365692864150104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/110365692864150104'/><link rel='alternate' type='text/html' href='http://templth.blogspot.com/2004/12/datasources-selection-with-spring.html' title='Datasources selection with Spring'/><author><name>Thierry Templier</name><uri>http://www.blogger.com/profile/03004192228796764530</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9305883.post-110292625545331990</id><published>2004-12-13T01:05:00.000-08:00</published><updated>2004-12-13T00:31:58.590-08:00</updated><title type='text'>Spring and ORM</title><content type='html'>Spring integrates several ORM at this time:&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Hibernate&lt;/b&gt;&lt;br /&gt;See the following link for more informations:&lt;br /&gt;&lt;a href="http://www.springframework.org/docs/reference/orm.html#orm-hibernate"&gt;Spring reference documentation&lt;/a&gt;&lt;br /&gt;&lt;a href="http://hibernate.bluemars.net/110.html"&gt;Hibernate site&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;JDO&lt;/b&gt;&lt;br /&gt;See the following link for informations about Spring and JPox ( a free JDO implementation ):&lt;br /&gt;&lt;a href="http://www.jpox.org/docs/1_1/tutorials/springframework.html"&gt;JPox 1.1 documentation&lt;/a&gt;&lt;br /&gt;See the following link for informations about Spring and KODO ( another JDO implementation ):&lt;br /&gt;&lt;a href="http://opensource.atlassian.com/confluence/spring/display/DISC/Kodo+JDO+Usage+With+Spring"&gt;Confluence&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;OJB&lt;/b&gt;&lt;br /&gt;Javadocs:&lt;br /&gt;&lt;a href="http://www.springframework.org/docs/api/org/springframework/orm/ojb/package-summary.html"&gt;Spring javadocs&lt;/a&gt;&lt;br /&gt;Examples: see the PetClinic sample application in the Spring distribution!&lt;br /&gt;Threads on the subject:&lt;br /&gt;&lt;a href="http://www.jroller.com/page/raible/home/spring_adds_support_for_ojb"&gt;Spring adds support for ojb&lt;/a&gt;&lt;br /&gt;&lt;a href="https://list.unm.edu/cgi-bin/wa?A2=ind0407&amp;L=jasig-dev&amp;F=&amp;S=&amp;P=1507"&gt;Thread&lt;/a&gt;&lt;br /&gt;&lt;a href="http://thread.gmane.org/gmane.comp.java.springframework.devel/4949"&gt;Announce of support added&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;TopLink&lt;/b&gt;&lt;br /&gt;See the following link for informations about Spring and TopLink:&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/products/ias/toplink/preview/spring/SpringTopLink.html"&gt;Spring / TopLink on Oracle site&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Spring offers now a perfect integration of tools for J2EE architecture to access datas of relationnal databases.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9305883-110292625545331990?l=templth.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://templth.blogspot.com/feeds/110292625545331990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9305883&amp;postID=110292625545331990' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/110292625545331990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/110292625545331990'/><link rel='alternate' type='text/html' href='http://templth.blogspot.com/2004/12/spring-and-orm.html' title='Spring and ORM'/><author><name>Thierry Templier</name><uri>http://www.blogger.com/profile/03004192228796764530</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9305883.post-110286385639025152</id><published>2004-12-12T06:44:00.000-08:00</published><updated>2004-12-12T10:02:23.516-08:00</updated><title type='text'>JCA and Spring</title><content type='html'>At the moment, Spring doesn't offer support for JCA ( Java Connector Architecture ). A support of JCA can be helpful in order to hide the use of CCI ( Common Client Interface ) API, to integrate with the IoC container of Spring and to use the AOP framework. The aim is offer facilities to use it:&lt;br/&gt;&lt;br /&gt;&lt;li&gt;Configuration of ConnectionFactory in a managed ( get from JNDI ) and in a non-managed mode ( configure as a bean )&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Conversion from Record to Object / Object to Record&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Declarative of transaction configuration ( local and global transactions ) with interceptors&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Use of CCI with template and objects&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;The idea is then to extend the framework to different EIS to integrate them easier in J2EE applications. For example, with CICS, communications are based on a COMMAREA ( table of bytes ), so it could provide classes to work on table of bytes instead of Record and a data mapper to transform object to COMMAREA / COMMAREA to object.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9305883-110286385639025152?l=templth.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://templth.blogspot.com/feeds/110286385639025152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9305883&amp;postID=110286385639025152' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/110286385639025152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/110286385639025152'/><link rel='alternate' type='text/html' href='http://templth.blogspot.com/2004/12/jca-and-spring.html' title='JCA and Spring'/><author><name>Thierry Templier</name><uri>http://www.blogger.com/profile/03004192228796764530</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9305883.post-110137316652978393</id><published>2004-11-25T01:44:00.000-08:00</published><updated>2004-11-25T01:14:30.523-08:00</updated><title type='text'>Integrate JAMon with Spring</title><content type='html'>&lt;b&gt;JAMon&lt;/b&gt; is a tool to monitor performance of application components. It's&lt;br /&gt;very useful to determine bottlenecks on application and find the impacted component. It provides too statistics on calls ( between the start and the end of monitors ).&lt;br /&gt;&lt;br /&gt;This tool can be download at the following url:&lt;br /&gt;&lt;a href="http://sourceforge.net/project/showfiles.php?group_id=96550"&gt;http://sourceforge.net/project/showfiles.php?group_id=96550&lt;/a&gt;&lt;br /&gt;and you can find its documentations on these sites:&lt;br /&gt;&lt;a href="http://jamonapi.sourceforge.net/"&gt;http://jamonapi.sourceforge.net/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.javaperformancetuning.com/tools/jamon/index.shtml"&gt;http://www.javaperformancetuning.com/tools/jamon/index.shtml&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To install it in your application, only &lt;b&gt;JAMon.jar&lt;/b&gt; must be in your classpath.&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;Spring already has an aop interceptor to measure performance of application components based on commons-logging. The idea is to provide a simple JAMon interceptor to start monitor before the call and end it after the call.&lt;br/&gt;&lt;br /&gt;It provides too facilities to name the JAMon monitor with class and method names.&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;The method getMonitorName determines the monitor name:&lt;br/&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;    protected String getMonitorName(MethodInvocation invocation) {&lt;br /&gt;        StringBuffer monitorName=new StringBuffer();&lt;br /&gt;        monitorName.append(&lt;br /&gt;                invocation.getMethod().getDeclaringClass().getName());&lt;br /&gt;        monitorName.append(" ( ");&lt;br /&gt;        monitorName.append(invocation.getMethod().getName());&lt;br /&gt;        monitorName.append(" )");&lt;br /&gt;        return monitorName.toString();&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The Spring AOP interceptor is simple:&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;import org.aopalliance.intercept.MethodInterceptor;&lt;br /&gt;import org.aopalliance.intercept.MethodInvocation;&lt;br /&gt;&lt;br /&gt;import com.jamonapi.Monitor;&lt;br /&gt;import com.jamonapi.MonitorFactory;&lt;br /&gt;&lt;br /&gt;public class PerfIntercepteur implements MethodInterceptor {&lt;br /&gt;&lt;br /&gt;    protected String getMonitorName(MethodInvocation invocation) {&lt;br /&gt;        StringBuffer monitorName=new StringBuffer();&lt;br /&gt;        monitorName.append(&lt;br /&gt;                invocation.getMethod().getDeclaringClass().getName());&lt;br /&gt;        monitorName.append(" ( ");&lt;br /&gt;        monitorName.append(invocation.getMethod().getName());&lt;br /&gt;        monitorName.append(" )");&lt;br /&gt;        return monitorName.toString();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Object invoke(MethodInvocation invocation) throws Throwable {&lt;br /&gt;        Monitor mon=MonitorFactory.start(getMonitorName(invocation));&lt;br /&gt;        Object rval=invocation.proceed();&lt;br /&gt;        mon.stop();&lt;br /&gt;        return rval;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;and you can configure it in this way:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;!DOCTYPE beans PUBLIC &lt;br /&gt;                "-//SPRING//DTD BEAN//EN" &lt;br /&gt;                "http://www.springframework.org/dtd/spring-beans.dtd"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;beans&amp;gt;&lt;br /&gt;    ...&lt;br /&gt;    &amp;lt;bean id="perfInterceptor" class="aop.PerfIntercepteur"/&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;bean id="autoProxyCreator" class="org.springframework.aop.framework.&lt;br /&gt;                                       autoproxy.BeanNameAutoProxyCreator"&amp;gt;&lt;br /&gt;        &amp;lt;property name="interceptorNames"&amp;gt;&lt;br /&gt;            &amp;lt;list&amp;gt;&lt;br /&gt;                &amp;lt;idref local="perfInterceptor" /&amp;gt;&lt;br /&gt;            &amp;lt;/list&amp;gt;&lt;br /&gt;        &amp;lt;/property&amp;gt;&lt;br /&gt;        &amp;lt;property name="beanNames"&amp;gt;&lt;br /&gt;            &amp;lt;list&amp;gt;&lt;br /&gt;                &amp;lt;idref local="service" /&amp;gt;&lt;br /&gt;            &amp;lt;/list&amp;gt;&lt;br /&gt;        &amp;lt;/property&amp;gt;&lt;br /&gt;    &amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;lt;/beans&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The aim is to plug the JAMon interceptor on the component of the application layer to identifity the component that has performance problem ( from presentation layer to dao layer ).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9305883-110137316652978393?l=templth.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://templth.blogspot.com/feeds/110137316652978393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9305883&amp;postID=110137316652978393' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/110137316652978393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/110137316652978393'/><link rel='alternate' type='text/html' href='http://templth.blogspot.com/2004/11/integrate-jamon-with-spring.html' title='Integrate JAMon with Spring'/><author><name>Thierry Templier</name><uri>http://www.blogger.com/profile/03004192228796764530</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9305883.post-110130313008302798</id><published>2004-11-24T05:29:00.000-08:00</published><updated>2004-11-25T01:11:37.390-08:00</updated><title type='text'>Integrate P6Spy with Spring</title><content type='html'>P6Spy is a tool to &lt;b&gt;debug JDBC&lt;/b&gt; interaction with a database. It's a &lt;b&gt;wrapper&lt;/b&gt;&lt;br /&gt;of all JDBC elements ( Connection, PreparedStatement, ResultSet... ) and&lt;br /&gt;it has a powerful feature in order to log all informations about those&lt;br /&gt;interactions.&lt;br /&gt;&lt;br /&gt;JDBC wrapper is described in the &lt;a href="http://www.oreilly.com/catalog/javapt2/"&gt;"Java Performance Tuning"&lt;/a&gt; book of Jack Shirazi ( O'Reilly) in the chapter 16.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;All elements wrappers have a constructor with the element to wrap. We can use it but&lt;br /&gt;there is another mode for datasource. This last mode must be used to wrap a datasource&lt;br /&gt;defined in an application server for example.&lt;br /&gt;&lt;br /&gt;However since we can manage our objects ( &lt;b&gt;beans&lt;/b&gt; ) in Spring ( and datasources&lt;br /&gt;too ), it's possible to add a P6Spy datasource and link it with the real datasource&lt;br /&gt;with constructor injection.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="ISO-8859-1"?&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"&lt;br /&gt;               "http://www.springframework.org/dtd/spring-beans.dtd"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;beans&amp;gt;&lt;br /&gt;&amp;lt;bean id="myDataSourceTarget"&lt;br /&gt;      class="org.apache.commons.dbcp.BasicDataSource"&lt;br /&gt;      destroy-method="close"&amp;gt;&lt;br /&gt;    &amp;lt;property name="driverClassName"&amp;gt;&lt;br /&gt;        &amp;lt;value&amp;gt;org.hsqldb.jdbcDriver&amp;lt;/value&amp;gt;&lt;br /&gt;    &amp;lt;/property&amp;gt;&lt;br /&gt;    &amp;lt;property name="url"&amp;gt;&lt;br /&gt;        &amp;lt;value&amp;gt;jdbc:hsqldb:hsql://localhost:9001&amp;lt;/value&amp;gt;&lt;br /&gt;    &amp;lt;/property&amp;gt;&lt;br /&gt;    &amp;lt;property name="username"&amp;gt;&amp;lt;value&amp;gt;sa&amp;lt;/value&amp;gt;&amp;lt;/property&amp;gt;&lt;br /&gt;    &amp;lt;property name="password"&amp;gt;&amp;lt;value&amp;gt;&amp;lt;/value&amp;gt;&amp;lt;/property&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;bean id="myDataSource" class="com.p6spy.engine.spy.P6DataSource"&lt;br /&gt;                                             destroy-method="close"&amp;gt;&lt;br /&gt;    &amp;lt;constructor-arg&amp;gt;&lt;br /&gt;        &amp;lt;ref local="myDataSourceTarget"/&amp;gt;&lt;br /&gt;    &amp;lt;/constructor-arg&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/beans&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Moreover a p6spy.log file must be add to the classpath of the application&lt;br /&gt;to specify the location of the log file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;module.log=com.p6spy.engine.logging.P6LogFactory&lt;br /&gt;&lt;br /&gt;executionthreshold=&lt;br /&gt;outagedetection=false&lt;br /&gt;outagedetectioninterval=&lt;br /&gt;filter=false&lt;br /&gt;include     =&lt;br /&gt;exclude     =&lt;br /&gt;sqlexpression =&lt;br /&gt;autoflush   = true&lt;br /&gt;dateformat=&lt;br /&gt;includecategories=&lt;br /&gt;excludecategories=info,debug,result,batch&lt;br /&gt;&lt;br /&gt;stringmatcher=&lt;br /&gt;stacktraceclass=&lt;br /&gt;&lt;br /&gt;reloadproperties=false&lt;br /&gt;reloadpropertiesinterval=60&lt;br /&gt;&lt;br /&gt;useprefix=false&lt;br /&gt;&lt;br /&gt;appender=com.p6spy.engine.logging.appender.FileLogger&lt;br /&gt;logfile     = c:/spy.log&lt;br /&gt;&lt;br /&gt;append=true&lt;br /&gt;&lt;br /&gt;log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender&lt;br /&gt;log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout&lt;br /&gt;log4j.appender.STDOUT.layout.ConversionPattern=p6spy - %m%n&lt;br /&gt;&lt;br /&gt;log4j.logger.p6spy=INFO,STDOUT&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The output can be graphically view with a tool like &lt;a href="http://www.irongrid.com/documentation/irontracksql/indexIronTrackSQL.html"&gt;Iron Track SQL&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Advantages of this solution are the following:&lt;br /&gt;&lt;br /&gt;&lt;li&gt;It isn't necessary to modify the configuration of the application&lt;br /&gt;server datasource in order to integrate P6Spy.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The use of P6Spy is much easier. No deep knowledge of the format&lt;br /&gt;of the P6Spy configuration file is required ( only specify the location&lt;br /&gt;of log file ).&lt;/li&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9305883-110130313008302798?l=templth.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://templth.blogspot.com/feeds/110130313008302798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9305883&amp;postID=110130313008302798' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/110130313008302798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9305883/posts/default/110130313008302798'/><link rel='alternate' type='text/html' href='http://templth.blogspot.com/2004/11/integrate-p6spy-with-spring.html' title='Integrate P6Spy with Spring'/><author><name>Thierry Templier</name><uri>http://www.blogger.com/profile/03004192228796764530</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
