<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-4731899479048168607</atom:id><lastBuildDate>Fri, 30 Aug 2024 01:05:41 +0000</lastBuildDate><category>eclipse plugin</category><category>EditorAction</category><category>Hibernate Mapping Generator for Eclipse</category><category>How to write a DOM Document to an xml file java 1.5</category><category>Log4j</category><category>Log4j Eclipse Code Template</category><category>development</category><category>eclipse</category><category>how to</category><category>private method call generator</category><category>private method testing tool</category><category>programmatically retrieve variable IType</category><category>recurrent methods generator commonclipse</category><category>system configuration reading and writing with Castor XML</category><category>text selection</category><title>Agile Java</title><description>Tips, HOWTOs, reviews and development tools for Java</description><link>http://agile-magic.blogspot.com/</link><managingEditor>noreply@blogger.com (Blogger)</managingEditor><generator>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4731899479048168607.post-5456229312370362198</guid><pubDate>Thu, 16 Jun 2016 21:23:00 +0000</pubDate><atom:updated>2016-06-16T18:49:56.566-03:00</atom:updated><title>GenericJackson2JsonRedisSerializer Configuration - Spring Boot Example</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;b&gt;Add&amp;nbsp;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;spring-boot-&lt;/span&gt;&lt;wbr style=&quot;background-color: transparent; font-size: 12.8px;&quot;&gt;&lt;/wbr&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;starter-redis dependency to your pom file:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;dependency&gt;&lt;/dependency&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;div style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font-size: 12.8px;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&lt;i&gt;&amp;lt;dependency&amp;gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;lt;artifactId&amp;gt;spring-boot-starter-redis&amp;lt;/artifactId&amp;gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&lt;i&gt;&amp;lt;/dependency&amp;gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;i style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 12.8px;&quot;&gt;&amp;nbsp;&lt;/i&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;b&gt;Set Redis config in application.yml:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;div style=&quot;font-size: 12.8px;&quot;&gt;
spring:&lt;/div&gt;
&lt;div style=&quot;font-size: 12.8px;&quot;&gt;
&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; redis:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 12.8px;&quot;&gt;
&amp;nbsp; &amp;nbsp; host: localhost&lt;/div&gt;
&lt;div style=&quot;font-size: 12.8px;&quot;&gt;
&amp;nbsp; &amp;nbsp; port: 6379&lt;/div&gt;
&lt;div style=&quot;font-size: 12.8px; font-weight: bold;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;b&gt;Set Redis Template, Cache Manager and&amp;nbsp;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;@EnableCaching:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;@SpringBootApplication&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 12.8px;&quot;&gt;@EnableCaching&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;public class SpringBootApplication {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; public static void main(String[] args) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; &amp;nbsp; SpringApplication.run(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 12.8px;&quot;&gt;SpringBootApplication&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;.class, args);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; @Bean&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; public RedisTemplate&lt;object object=&quot;&quot;&gt; redisTemplate(RedisConnectionFactory jedisConnFactory) {&lt;/object&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; &amp;nbsp; RedisTemplate&lt;object object=&quot;&quot;&gt; redisTemplate = new RedisTemplate&lt;object object=&quot;&quot;&gt;();&lt;/object&gt;&lt;/object&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; &amp;nbsp; redisTemplate.setConnectionFactory(jedisConnFactory);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; &amp;nbsp; redisTemplate.setKeySerializer(new StringRedisSerializer());&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; &amp;nbsp; redisTemplate.setValueSerializer(new GenericJackson2JsonRedisSerializer());&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; &amp;nbsp; return redisTemplate;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; @Bean&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; public CacheManager cacheManager(RedisTemplate&lt;object object=&quot;&quot;&gt; redisTemplate) {&lt;/object&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; &amp;nbsp; RedisCacheManager redisCacheManager = new RedisCacheManager(redisTemplate);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; &amp;nbsp; redisCacheManager.setUsePrefix(true);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; &amp;nbsp; Collection&lt;string&gt; cacheNames = new ArrayList&amp;lt;&amp;gt;();&lt;/string&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 12.8px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 12.8px;&quot;&gt;&amp;nbsp; &amp;nbsp; cacheNames.add(&quot;user-accounts-cache&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; &amp;nbsp; redisCacheManager.setCacheNames(cacheNames);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; &amp;nbsp; Map&lt;string long=&quot;&quot;&gt; expires = new HashMap&amp;lt;&amp;gt;();&lt;/string&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 12.8px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 12.8px;&quot;&gt;&amp;nbsp; &amp;nbsp; expires.put(&quot;accounts-cache&quot;, 30L);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; &amp;nbsp; redisCacheManager.setExpires(expires);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; &amp;nbsp; return redisCacheManager;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&lt;b&gt;Decorate method for caching;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 12.8px;&quot;&gt;
&lt;div&gt;
@Cacheable(value = &quot;user-accounts-cache&quot;)&lt;/div&gt;
&lt;div&gt;
public List&lt;account&gt; getUserAccounts(String userId) {&lt;/account&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return accountDao.getAccounts(userId);&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: 12.8px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><link>http://agile-magic.blogspot.com/2016/06/genericjackson2jsonredisserializer.html</link><author>noreply@blogger.com (Blogger)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4731899479048168607.post-6462065875927698726</guid><pubDate>Fri, 21 Aug 2009 17:28:00 +0000</pubDate><atom:updated>2009-08-21T14:31:46.427-03:00</atom:updated><title>Agile Magic on Twitter</title><description>Follow Agile Magic on Twitter: http://twitter.com/agilemagic</description><link>http://agile-magic.blogspot.com/2009/08/agile-magic-on-twitter.html</link><author>noreply@blogger.com (Blogger)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4731899479048168607.post-3843195535587408742</guid><pubDate>Wed, 12 Aug 2009 01:09:00 +0000</pubDate><atom:updated>2009-08-12T00:07:07.822-03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Hibernate Mapping Generator for Eclipse</category><title>eclipse booster plugin: Easy Hibernate mapping generation!</title><description>&lt;div&gt;Eclipse Booster Plugin is an Open Source Hibernate mapping generator that supports mapping of relationships,  inheritance hierarchies, and collection type attributes. Booster Plugin uses application model classes to obtain data and generate code, so generating an Hibernate mapping file it&#39;s really easy:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 1: Code your application&#39;s Java model classes&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeiyU2sue5Aj2FDgMsR2OvajuRhSKx7kI8ro3KjcFQ98OQzq6nZqeYljh_08oGqCe42RE-n_beVs5CzpUnps1bMcGZ8FxX80L6Dp6rgnwzXeBY6pLyMX6rkZMwIY3nvjyR-scz5gkv-h8/s1600-h/codeClasses.jpg&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeiyU2sue5Aj2FDgMsR2OvajuRhSKx7kI8ro3KjcFQ98OQzq6nZqeYljh_08oGqCe42RE-n_beVs5CzpUnps1bMcGZ8FxX80L6Dp6rgnwzXeBY6pLyMX6rkZMwIY3nvjyR-scz5gkv-h8/s400/codeClasses.jpg&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5368892959490205890&quot; style=&quot;cursor: pointer; width: 272px; height: 311px; &quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 2: Create a project configuration&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiDveyDR5i6DPO5Ezoo0xIVy23JjW7jWD1aBqdQObYQoBgxjZlhqbyxtAbPW4zwAIsuFkxyY7VVlMqdGZ-exM9D103IteQKHV2if9lFYW4u5Z8huVvrSAUJItaBtODn-6aZKItSNvj98Y/s1600-h/ConfigureProject.JPG&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiDveyDR5i6DPO5Ezoo0xIVy23JjW7jWD1aBqdQObYQoBgxjZlhqbyxtAbPW4zwAIsuFkxyY7VVlMqdGZ-exM9D103IteQKHV2if9lFYW4u5Z8huVvrSAUJItaBtODn-6aZKItSNvj98Y/s400/ConfigureProject.JPG&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5368892970875694098&quot; style=&quot;cursor: pointer; width: 400px; height: 62px; &quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA-e-t-1WHtpBmAYwSy0toete23bNoDU98iFllKIdmhD31uCE9H0ShWZCY4lqz54hrBdMgV6IvtMDQJWEzegEe6sI2ifsAFAfDvC32IKr43hOQtS-NMDJmitg9SL7iTrLhgfVfarocHZc/s1600-h/projectConfiguration.jpg&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA-e-t-1WHtpBmAYwSy0toete23bNoDU98iFllKIdmhD31uCE9H0ShWZCY4lqz54hrBdMgV6IvtMDQJWEzegEe6sI2ifsAFAfDvC32IKr43hOQtS-NMDJmitg9SL7iTrLhgfVfarocHZc/s400/projectConfiguration.jpg&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5368892976270137314&quot; style=&quot;cursor: pointer; width: 334px; height: 400px; &quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUlM1En9XqCa9SMXBO1CderL7wft6whw6l4msvqYVbsyC94lFztW4H3eB_HAbE1wIpLwY4z4NMHtr-CaG1cd_eoeEsa3JEiOWk9Zkbz1cFxidpVNCJntXkvHj9_yuxOXLqc5hlA3USMTg/s1600-h/pathsConfiguration.jpg&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUlM1En9XqCa9SMXBO1CderL7wft6whw6l4msvqYVbsyC94lFztW4H3eB_HAbE1wIpLwY4z4NMHtr-CaG1cd_eoeEsa3JEiOWk9Zkbz1cFxidpVNCJntXkvHj9_yuxOXLqc5hlA3USMTg/s400/pathsConfiguration.jpg&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5368892991161762626&quot; style=&quot;cursor: pointer; width: 340px; height: 400px; &quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 3: Select the class you want to map and attributes to persist&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqFTuQCLE_E2XxlVtZ4N4LMGB1SQ9iLWi8PtLQef-vRzhHL0c-1LS3o1CZ1gEqmQfLjJRlc7P2ueqhQcDnXS_B5xQJ7i_1Cwp7pIV6HGNxoMLCT4tL_g2YXiEaSmj4q46Kbi3Fjkk8WYY/s1600-h/Selection.jpg&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqFTuQCLE_E2XxlVtZ4N4LMGB1SQ9iLWi8PtLQef-vRzhHL0c-1LS3o1CZ1gEqmQfLjJRlc7P2ueqhQcDnXS_B5xQJ7i_1Cwp7pIV6HGNxoMLCT4tL_g2YXiEaSmj4q46Kbi3Fjkk8WYY/s400/Selection.jpg&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5368894161602362690&quot; style=&quot;cursor: pointer; width: 232px; height: 196px; &quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLoIsfGYTuUZ3NNYUkV5Mt3VtpkOiFAKD48rzFb07lKCf5udWAmAINErVPin9uR_tw2bXBjk4q9lt-jiDCi2OMKYDV98T2i6GTBHvxaMT9wEPoLRwngo9rprj6KxNupCSOcwCsB8MnqxM/s1600-h/atributesToPersist.jpg&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLoIsfGYTuUZ3NNYUkV5Mt3VtpkOiFAKD48rzFb07lKCf5udWAmAINErVPin9uR_tw2bXBjk4q9lt-jiDCi2OMKYDV98T2i6GTBHvxaMT9wEPoLRwngo9rprj6KxNupCSOcwCsB8MnqxM/s400/atributesToPersist.jpg&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5368892965252267506&quot; style=&quot;cursor: pointer; width: 400px; height: 332px; &quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 4: That&#39;s all!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can download it from google code: &lt;a href=&quot;http://code.google.com/p/hexacta-booster/downloads/list&quot;&gt;http://code.google.com/p/hexacta-booster/downloads/list&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enjoy!&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://agile-magic.blogspot.com/2009/08/eclipse-booster-plugin-easy-hibernate.html</link><author>noreply@blogger.com (Blogger)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeiyU2sue5Aj2FDgMsR2OvajuRhSKx7kI8ro3KjcFQ98OQzq6nZqeYljh_08oGqCe42RE-n_beVs5CzpUnps1bMcGZ8FxX80L6Dp6rgnwzXeBY6pLyMX6rkZMwIY3nvjyR-scz5gkv-h8/s72-c/codeClasses.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4731899479048168607.post-634817386951701774</guid><pubDate>Sat, 08 Aug 2009 18:19:00 +0000</pubDate><atom:updated>2009-08-08T15:47:13.319-03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">development</category><category domain="http://www.blogger.com/atom/ns#">eclipse plugin</category><category domain="http://www.blogger.com/atom/ns#">EditorAction</category><category domain="http://www.blogger.com/atom/ns#">programmatically retrieve variable IType</category><category domain="http://www.blogger.com/atom/ns#">text selection</category><title>Is there a better way to programmatically retrieve a local variable IType from an EditorAction text selection in Eclipse?</title><description>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial; border-collapse: collapse; font-size: 13px; &quot;&gt;&lt;div&gt;public class MyEditorActio&lt;wbr&gt;n extends EditorAction {&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    /**&lt;/div&gt;&lt;div&gt;     * @param unitEditor&lt;/div&gt;&lt;div&gt;     * @return&lt;/div&gt;&lt;div&gt;     */&lt;/div&gt;&lt;div&gt;    private IDocument getDocument(final CompilationUnitEditor unitEditor) {&lt;/div&gt;&lt;div&gt;        IDocumentProvider provider = unitEditor.&lt;wbr&gt;getDocumentProvider();&lt;/div&gt;&lt;div&gt;        IEditorInput input = unitEditor.getEditorInput();&lt;/div&gt;&lt;div&gt;        IDocument document = provider.getDocument(input);&lt;/div&gt;&lt;div&gt;        return document;&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;    public void runAction()  {&lt;/div&gt;&lt;div&gt;        if (getTargetEditor() instanceof CompilationUnitEditor) {&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;            CompilationUnitEditor unitEditor = (CompilationUnitEditor) getTargetEditor();&lt;/div&gt;&lt;div&gt;            ICompilationUnit varContainerUnit = (ICompilationUnit) unitEditor.getViewPartInput();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;            IDocument document = getDocument(unitEditor);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;            try {&lt;/div&gt;&lt;div&gt;                JavaTextSelection javaSelection = new JavaTextSelection(&lt;wbr&gt;varContainerUnit.getTypes()[0]&lt;wbr&gt;.getTypeRoot(),&lt;/div&gt;&lt;div&gt;                        document, getTextSelection().getOffset()&lt;wbr&gt;, getTextSelection().getLength()&lt;wbr&gt;);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                ILocalVariable localVar = (ILocalVariable) javaSelection.&lt;wbr&gt;resolveElementAtOffset()[0];&lt;/div&gt;&lt;div&gt;                String varQualifiedTypeName = Signature.&lt;wbr&gt;getSignatureSimpleName(&lt;wbr&gt;localVar.getTypeSignature());&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;//At this point with variable&#39;s container unit and qualified type name, use search engine to retrieve IType...&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                IType varType = SearchEngine.getVarType(&lt;wbr&gt;varQualifiedTypeName, varContainerUnit);&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;</description><link>http://agile-magic.blogspot.com/2009/08/is-there-better-way-to-programmatically.html</link><author>noreply@blogger.com (Blogger)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4731899479048168607.post-7422625172606973032</guid><pubDate>Tue, 04 Aug 2009 02:13:00 +0000</pubDate><atom:updated>2009-08-07T12:53:01.716-03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">How to write a DOM Document to an xml file java 1.5</category><title>How to write a DOM Document to an xml file in java 1.5</title><description>&lt;span class=&quot;Apple-style-span&quot;   style=&quot; border-collapse: collapse;  font-family:arial;font-size:13px;&quot;&gt;&lt;div&gt;private void writeXMLDocument(&lt;wbr&gt;final Document doc, final String fileName) throws IOException {&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;        // open output stream where XML Document will be saved&lt;/div&gt;&lt;div&gt;        File xmlOutputFile = new File(fileName);&lt;/div&gt;&lt;div&gt;        FileOutputStream fos;&lt;/div&gt;&lt;div&gt;        Transformer transformer;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;        fos = new FileOutputStream(&lt;wbr&gt;xmlOutputFile);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;        // Use a Transformer for output&lt;/div&gt;&lt;div&gt;        TransformerFactory transformerFactory = TransformerFactory.&lt;wbr&gt;newInstance();&lt;/div&gt;&lt;div&gt;        transformerFactory.&lt;wbr&gt;setAttribute(&quot;indent-number&quot;, new Integer(4));&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;        try {&lt;/div&gt;&lt;div&gt;            transformer = transformerFactory.&lt;wbr&gt;newTransformer();&lt;/div&gt;&lt;div&gt;            transformer.&lt;wbr&gt;setOutputProperty(OutputKeys.&lt;wbr&gt;INDENT, &quot;yes&quot;);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;            transformer.&lt;wbr&gt;setOutputProperty(OutputKeys.&lt;wbr&gt;DOCTYPE_PUBLIC, &quot;-//Hibernate/Hibernate Mapping DTD 3.0//EN&quot;);&lt;/div&gt;&lt;div&gt;            transformer.&lt;wbr&gt;setOutputProperty(OutputKeys.&lt;wbr&gt;DOCTYPE_SYSTEM,&lt;/div&gt;&lt;div&gt;                    &quot;&lt;a href=&quot;http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd&quot; target=&quot;_blank&quot; style=&quot;color: rgb(0, 84, 136); &quot;&gt;http://hibernate.&lt;wbr&gt;sourceforge.net/hibernate-&lt;wbr&gt;mapping-3.0.dtd&lt;/a&gt;&quot;);&lt;/div&gt;&lt;div&gt;            transformer.&lt;wbr&gt;setOutputProperty(OutputKeys.&lt;wbr&gt;ENCODING, &quot;ISO-8859-1&quot;);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;        } catch (&lt;wbr&gt;TransformerConfigurationExcept&lt;wbr&gt;ion e) {&lt;/div&gt;&lt;div&gt;            logger.error(&quot;Transformer configuration error: &quot; + e.getMessage());&lt;/div&gt;&lt;div&gt;            throw new IOException(e.getMessage());&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;        DOMSource source = new DOMSource(doc);&lt;/div&gt;&lt;div&gt;        StreamResult result = new StreamResult(new OutputStreamWriter(fos, &quot;utf-8&quot;));&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;        // transform source into result will do save&lt;/div&gt;&lt;div&gt;        try {&lt;/div&gt;&lt;div&gt;            transformer.transform(source, result);&lt;/div&gt;&lt;div&gt;        } catch (TransformerException e) {&lt;/div&gt;&lt;div&gt;            logger.error(&quot;Error transform: &quot; + e.getMessage());&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/span&gt;</description><link>http://agile-magic.blogspot.com/2009/08/how-to-write-dom-document-to-xml-file.html</link><author>noreply@blogger.com (Blogger)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4731899479048168607.post-9071925157795440502</guid><pubDate>Mon, 03 Aug 2009 23:13:00 +0000</pubDate><atom:updated>2009-08-07T12:10:36.596-03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">how to</category><category domain="http://www.blogger.com/atom/ns#">system configuration reading and writing with Castor XML</category><title>How to: Simple system configuration reading and writing with Castor XML</title><description>&lt;span class=&quot;Apple-style-span&quot;   style=&quot; border-collapse: collapse;  font-family:arial;font-size:13px;&quot;&gt;&lt;div&gt;&lt;blockquote&gt;&lt;/blockquote&gt;Step 1: Create a Java object representing a system configuration.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 2: Add Castor Maven dependency to project&#39;s pom.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;border-collapse: separate;  white-space: pre-wrap; font-family:&#39;Lucida Grande&#39;;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;border-collapse: separate;  white-space: pre-wrap; font-family:&#39;Lucida Grande&#39;;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;&amp;lt;groupId&amp;gt;org.codehaus.castor&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;border-collapse: separate;  white-space: pre-wrap; font-family:&#39;Lucida Grande&#39;;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;&amp;lt;artifactId&amp;gt;castor-xml&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;border-collapse: separate;  white-space: pre-wrap; font-family:&#39;Lucida Grande&#39;;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;&amp;lt;version&amp;gt;1.3&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;border-collapse: separate;  white-space: pre-wrap; font-family:&#39;Lucida Grande&#39;;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 3: Create &lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#FF0000;&quot;&gt;castor.properties&lt;/span&gt; file with &lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#FF0000;&quot;&gt;org.exolab.castor.indent=true&lt;/span&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 4: Read system configuration:&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#006600;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;FileReader reader = new FileReader(&quot;system.cfg.xml&quot;)&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#006600;&quot;&gt;&lt;wbr&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#006600;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#006600;&quot;&gt;            &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#006600;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#006600;&quot;&gt;SystemConfiguration systemConfiguration = (SystemConfiguration) Unmarshaller.unmarshal(SystemConfiguration.class, reader);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#006600;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#006600;&quot;&gt;            &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#006600;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#006600;&quot;&gt;reader.close();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 5: Write system configuration:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;            &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#009900;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#009900;&quot;&gt;FileWriter writer = new FileWriter(&quot;system.cfg.xml&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#009900;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#009900;&quot;&gt;            &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#009900;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#009900;&quot;&gt;Marshaller.marshal(&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#009900;&quot;&gt;&lt;wbr&gt;aSystemConfiguration, writer);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#009900;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#009900;&quot;&gt;            &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#009900;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#009900;&quot;&gt;writer.close();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;</description><link>http://agile-magic.blogspot.com/2009/08/how-to-simple-system-configuration.html</link><author>noreply@blogger.com (Blogger)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4731899479048168607.post-7691244285432705513</guid><pubDate>Sun, 02 Aug 2009 21:20:00 +0000</pubDate><atom:updated>2009-08-07T12:11:29.981-03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">eclipse</category><category domain="http://www.blogger.com/atom/ns#">Log4j</category><category domain="http://www.blogger.com/atom/ns#">Log4j Eclipse Code Template</category><title>Log4j Eclipse Code Template</title><description>&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;If you are tired of manualy adding static logger instances in classes, try this template ...&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;Under Preferences &gt; Java &gt; Editor &gt; Templates:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;Click new.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;Give it a description and name.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;Use this Pattern:&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#336666;&quot;&gt;${:import(org.apache.log4j.Logger)} &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#336666;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#336666;&quot;&gt;private static final Logger LOG = Logger.getLogger(${enclosing_type}.class); &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkomYZuzJdjijrtB2QneiRTfp9pHp7qiYWbFa6Hir51AdG8ni3wZRZ-b-m7ej6TpygOtHawJK3fvCbY1BabiIOvmUPyyK6tPld1I_UovwTofxqp8c0-zLOLWBlJvlSzLoKrhd8MzfDRAY/s1600-h/loggerTemplate.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 246px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkomYZuzJdjijrtB2QneiRTfp9pHp7qiYWbFa6Hir51AdG8ni3wZRZ-b-m7ej6TpygOtHawJK3fvCbY1BabiIOvmUPyyK6tPld1I_UovwTofxqp8c0-zLOLWBlJvlSzLoKrhd8MzfDRAY/s400/loggerTemplate.png&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5365484384083155442&quot; /&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;To apply it, type the template name and press ctrl + space.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(34, 34, 34); line-height: 20px; font-family:Verdana;font-size:12px;&quot;&gt;&lt;p style=&quot;margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;</description><link>http://agile-magic.blogspot.com/2009/08/log4j-eclipse-code-template.html</link><author>noreply@blogger.com (Blogger)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkomYZuzJdjijrtB2QneiRTfp9pHp7qiYWbFa6Hir51AdG8ni3wZRZ-b-m7ej6TpygOtHawJK3fvCbY1BabiIOvmUPyyK6tPld1I_UovwTofxqp8c0-zLOLWBlJvlSzLoKrhd8MzfDRAY/s72-c/loggerTemplate.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4731899479048168607.post-5531599684075159765</guid><pubDate>Sun, 02 Aug 2009 19:38:00 +0000</pubDate><atom:updated>2009-08-07T12:13:40.729-03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">eclipse plugin</category><category domain="http://www.blogger.com/atom/ns#">recurrent methods generator commonclipse</category><title>Commonclipse plugin: A recurrent method generator.</title><description>&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  ;font-family:Verdana;font-size:58px;&quot;&gt;&lt;p style=&quot;line-height: 1.3em; font-size: small; &quot;&gt;Commonclipse is an eclipse plugin for jakarta commons-lang users. It features automatic generation of the following methods using commons-lang builders:&lt;/p&gt;&lt;ul&gt;&lt;li style=&quot;font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; &quot;&gt;toString()&lt;/li&gt;&lt;li style=&quot;font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; &quot;&gt;hashcode()&lt;/li&gt;&lt;li style=&quot;font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; &quot;&gt;equals(Object)&lt;/li&gt;&lt;li style=&quot;font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; &quot;&gt;compareTo(Object)&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;line-height: 1.3em; font-size: small; &quot;&gt;Commonclipse supports customization of generated methods (custom ToStringStyle, use of appendSuper(), excluded fields) through user defined properties. Commonclipse actions are available both in java editor views and in package explorer.&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4IXy8-xGmNU1Ym-U5AsbjTDezOS7qR_lFRunJnAn2VGZjJVF00ZhWRP86GfCw3PGy3fAS5MNgNdzViznBlFXg02pD5eNmCOpPLBd9YX1IUyYI5TsMkHMxbOSaNDi7pjhQur7MbC3ytFk/s1600-h/commonclipse.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 393px; height: 400px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4IXy8-xGmNU1Ym-U5AsbjTDezOS7qR_lFRunJnAn2VGZjJVF00ZhWRP86GfCw3PGy3fAS5MNgNdzViznBlFXg02pD5eNmCOpPLBd9YX1IUyYI5TsMkHMxbOSaNDi7pjhQur7MbC3ytFk/s400/commonclipse.png&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5365453960134173282&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  ;font-family:Verdana;font-size:13px;&quot;&gt;&lt;p style=&quot;line-height: 1.3em; font-size: small; &quot;&gt;WebSite:&lt;/p&gt;&lt;p style=&quot;line-height: 1.3em; font-size: small; &quot;&gt;&lt;a href=&quot;http://commonclipse.sourceforge.net/&quot;&gt;http://commonclipse.sourceforge.net/&lt;/a&gt;&lt;/p&gt;&lt;/span&gt;</description><link>http://agile-magic.blogspot.com/2009/08/commonclipse-plugin-recurrent-method.html</link><author>noreply@blogger.com (Blogger)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4IXy8-xGmNU1Ym-U5AsbjTDezOS7qR_lFRunJnAn2VGZjJVF00ZhWRP86GfCw3PGy3fAS5MNgNdzViznBlFXg02pD5eNmCOpPLBd9YX1IUyYI5TsMkHMxbOSaNDi7pjhQur7MbC3ytFk/s72-c/commonclipse.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4731899479048168607.post-7265378423858285151</guid><pubDate>Sun, 02 Aug 2009 18:02:00 +0000</pubDate><atom:updated>2009-08-07T12:15:35.547-03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">private method call generator</category><category domain="http://www.blogger.com/atom/ns#">private method testing tool</category><title>Eclipse Booster Plugin: A private method testing tool.</title><description>&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot; color: rgb(33, 35, 36); font-family:Arial;&quot;&gt;When using reflection aproach to junit testing private methods it can become an error-prone, tedious and time consuming task. A private method call via Java Reflection API involves construction of formal and actual parameters as also method name specification as a string literal. Booster Plugin generates that code for you with just a few clicks.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;font-family:Arial;color:#212324;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:Arial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK_MXbEGux39B95fV4ALL78OdVMYYpFXNQI7awdkE1x8xzqhz2Zn5Py3X3-J7IFV3YlyJqlwYdsp8-j_iFBiJBoLCfWrXsYkB3oWlsQq1JOJNwmuxKw99Xz9zK6S0PKgQXGcPfdhbLSoo/s1600-h/reflectionCall.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 248px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK_MXbEGux39B95fV4ALL78OdVMYYpFXNQI7awdkE1x8xzqhz2Zn5Py3X3-J7IFV3YlyJqlwYdsp8-j_iFBiJBoLCfWrXsYkB3oWlsQq1JOJNwmuxKw99Xz9zK6S0PKgQXGcPfdhbLSoo/s400/reflectionCall.png&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5365440542682921346&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpztGVtxC_7o2k_2D-3sPOElG7XxxXI1L4-o5-yu75GFiwc6Z24B35NAeqRRlATEP8lNnMCA_4LOTDGJdg64vsNo3dloCXwUpV9I3Tlv0_DRaKjlEFzd48w9Q_stnhTc63-VG1Bfk2jJI/s1600-h/privateMethodCallGenerator.PNG&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 321px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpztGVtxC_7o2k_2D-3sPOElG7XxxXI1L4-o5-yu75GFiwc6Z24B35NAeqRRlATEP8lNnMCA_4LOTDGJdg64vsNo3dloCXwUpV9I3Tlv0_DRaKjlEFzd48w9Q_stnhTc63-VG1Bfk2jJI/s400/privateMethodCallGenerator.PNG&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5365440540271560898&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;font-family:Arial;color:#212324;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;font-family:Arial;color:#212324;&quot;&gt;Web Site: &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;font-family:Arial;color:#212324;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color: rgb(0, 0, 0);  font-family:Georgia;&quot;&gt;           &lt;a href=&quot;http://code.google.com/p/hexacta-booster/downloads/list&quot;&gt;http://code.google.com/p/hexacta-booster/&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;font-family:Arial;color:#212324;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://agile-magic.blogspot.com/2009/08/eclipse-booster-plugin-private-method.html</link><author>noreply@blogger.com (Blogger)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK_MXbEGux39B95fV4ALL78OdVMYYpFXNQI7awdkE1x8xzqhz2Zn5Py3X3-J7IFV3YlyJqlwYdsp8-j_iFBiJBoLCfWrXsYkB3oWlsQq1JOJNwmuxKw99Xz9zK6S0PKgQXGcPfdhbLSoo/s72-c/reflectionCall.png" height="72" width="72"/><thr:total>0</thr:total></item></channel></rss>