<?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-34849561</id><updated>2012-01-20T03:53:07.635-08:00</updated><title type='text'>My IT world</title><subtitle type='html'>Java, J2EE, JBoss, MySQL, Oracle, Bea WebLogic and friends</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>95</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-34849561.post-5462131979364510228</id><published>2011-08-02T08:34:00.000-07:00</published><updated>2011-08-02T08:43:15.805-07:00</updated><title type='text'>Low memory in Cloud Bees</title><content type='html'>I've noticed that memory goes low at Cloud Bees RUN@CLOUD service.  As I wrote earlier, about &lt;a href="http://ostas.blogspot.com/2011/07/memory-monitoring-on-cloudbees-runcloud.html"&gt;near-real time physical memory monitoring&lt;/a&gt;, this application works, but sometimes it's just not available. This is the image I've faced 5 min before writing this post :&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-fVrsk601VAs/Tjga2N_eENI/AAAAAAAAANU/Bw9GYPtWS60/s1600/memory.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 194px;" src="http://1.bp.blogspot.com/-fVrsk601VAs/Tjga2N_eENI/AAAAAAAAANU/Bw9GYPtWS60/s320/memory.png" alt="" id="BLOGGER_PHOTO_ID_5636284452425306322" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-5462131979364510228?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/5462131979364510228/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=5462131979364510228' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/5462131979364510228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/5462131979364510228'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2011/08/low-memory-in-cloud-bees.html' title='Low memory in Cloud Bees'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-fVrsk601VAs/Tjga2N_eENI/AAAAAAAAANU/Bw9GYPtWS60/s72-c/memory.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-7833535850442270460</id><published>2011-07-08T05:37:00.000-07:00</published><updated>2011-07-08T06:07:14.452-07:00</updated><title type='text'>Adobe Flex Mobile On Android - first application</title><content type='html'>I think that new feature of Adobe Flex 4.5.1 Mobile is really cool stuff !!! I was able to convert existent application from my previous blog post to application for Android platform. Didn't tryed iOS support yet, but for Android platform things looks good.&lt;br /&gt;&lt;br /&gt;So, few words about app. I have free CloudBees run@cloud account. Application from my previous blog post showing &lt;a href="http://ostas.blogspot.com/2011/07/memory-monitoring-on-cloudbees-runcloud.html"&gt;live data feed about physical RAM memory usage on server&lt;/a&gt;, one frame per second. Long AMF pooling used there to fetch fresh data. And Flex charting for visualization.&lt;br /&gt;&lt;br /&gt;I have to admit that in mobile version plain AMF pooling is used, because I had no luck with long AMF pooling.&lt;br /&gt;&lt;br /&gt;You can pick up this application from here -&amp;gt; &lt;a href="http://dl.dropbox.com/u/282185/MonitoringOnAndroid.apk"&gt;Memory monitoring Adobe Flex Mobile App&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Maybe CloudBees will want to have it ? :)&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-7833535850442270460?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/7833535850442270460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=7833535850442270460' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7833535850442270460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7833535850442270460'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2011/07/adobe-flex-mobile-on-android-first.html' title='Adobe Flex Mobile On Android - first application'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-3298824666292484762</id><published>2011-07-06T06:23:00.000-07:00</published><updated>2011-07-06T07:25:15.268-07:00</updated><title type='text'>Memory monitoring on CloudBees RUN@cloud instance</title><content type='html'>I've been playing with RUN@cloud for some time. In fact it's former Stax service provider. Friendly speaking I was disappointed a little because they decided to decrease amount of RAM available for Tomcat from 256 Mb to 128 Mb for free account. It doesn't affected my playground apps there, but the fact... From other point they have something good for &lt;a href="http://cloudbees.com/foss/foss-dev.cb"&gt;Open Source projects&lt;/a&gt;. Maybe I'll try it soon.&lt;br /&gt;&lt;br /&gt;So, regarding this changes, I've desided to write RIA application for live RAM monitoring. I mean not JVM memory, but actual RAM amount. I believe this makes sense, even for all things which are even not Java related. Yep, I know there are a lot of them available for free, some of them are commercial. The key feature of my application here is that we have near real time memory charts - 1 second between measuring times + some network roundtrips time + time for rendering. And all this in fancy Adobe Flex client.&lt;br /&gt;&lt;br /&gt;Next thing I'm going to do is to create the same kind of application, but for Android. It's possible with Adobe Flash builder 4.5.  Among tons of games, organaizers and other stuff this application could be useful for admins, support team, whatever.&lt;br /&gt;&lt;br /&gt;You can take a look at my app here : &lt;a href="http://monitoring.daoway.staxapps.net/"&gt;http://monitoring.daoway.staxapps.net/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Any feedback apprececiated. Thanks.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-3298824666292484762?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/3298824666292484762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=3298824666292484762' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/3298824666292484762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/3298824666292484762'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2011/07/memory-monitoring-on-cloudbees-runcloud.html' title='Memory monitoring on CloudBees RUN@cloud instance'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-6401844066169495397</id><published>2011-05-25T09:16:00.000-07:00</published><updated>2011-05-25T10:00:13.101-07:00</updated><title type='text'>Loading Spring Beans based on environment</title><content type='html'>In complex deployment environments it makes sense to keep web application monolith war file and provide appropriate instructions for deployment team. It's possible only if your application have flexible configurability strategy, so that at least you can switch from DEV to UAT, from UAT to PROD environments and be sure that only thing has been changed is environment specific stuff. Forget about unpacking and patching war-file, it could be prohibited at all because of non-trivial distribution mechanism.&lt;br /&gt;&lt;br /&gt;For Spring-based applications all this could look a little bit scary for a first look, you have your applicationContext.xml with placeholders, which is ok, or JNDI for enviromnent-specific resource lookup. Great, but what you are going to do if some of the parts of resources are present in one env. and absent in another ? For example +1 in dev, -1 in uat and +1 in prod ? Maybe there is not only one way to do it, but I came across the following solution for this.&lt;br /&gt;&lt;br /&gt;It's based on combination of servlet context init params and Spring bean re-definition at runtume. Thanks to Spring it's possible. In terms of configurability servlet init params is very flexible thing. You can define one in web.xml, and then redefine it in context setup. I mean externally, so, your war file is still don't need to be patched. Other stuff is technical details for this - key point to implement this is Spring bean which implements both ServletContextAware and ApplicationContextAware interfaces. First makes possible to access Servlet context, second - Spring application context. Runtime re-defintion is not so hard - take a look &lt;a href="http://code.google.com/p/ostas-blog-src/source/browse/trunk/SpringBeanRuntime/src/main/java/com/blogspot/ostas/spring/MyApplicationConfiguratorBean.java"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Complete source code you can find &lt;a href="http://code.google.com/p/ostas-blog-src/source/browse/#svn%2Ftrunk%2FSpringBeanRuntime"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-6401844066169495397?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/6401844066169495397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=6401844066169495397' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/6401844066169495397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/6401844066169495397'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2011/05/loading-spring-beans-based-on.html' title='Loading Spring Beans based on environment'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-3232704609697929364</id><published>2011-04-28T02:26:00.000-07:00</published><updated>2011-04-28T02:48:50.427-07:00</updated><title type='text'>How to turn off popup page preview in Google search results</title><content type='html'>Did you enjoyed this feature ? This fancy useless annoing popup page preview images ? Ohh yeess... There is no way to turn it of using some kind of chekbox, so here is the solution for this.&lt;br /&gt;&lt;br /&gt;1) Install Firefox extenstion called Grasemonkey - &lt;a href="http://userscripts.org/scripts/show/90222"&gt;https://addons.mozilla.org/ru/firefox/addon/greasemonkey/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2) Install script for Grasemonkey that will disable this shit - &lt;a href="http://userscripts.org/scripts/show/90222"&gt;http://userscripts.org/scripts/show/90222&lt;/a&gt; just click on install button at this page.&lt;br /&gt;&lt;br /&gt;3) Say goodbye to page preview popups. Enjoy.&lt;br /&gt;&lt;br /&gt;I believe it's hard to implement this kind of feature from technical perspective. I mean preview of web page. You have to deal with rendering HTML, CSS, JavaScript... a lot of work, but...&lt;br /&gt;&lt;br /&gt;From user's perspective it's useless bullshit !&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-3232704609697929364?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/3232704609697929364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=3232704609697929364' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/3232704609697929364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/3232704609697929364'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2011/04/how-to-turn-off-popup-page-preview-in.html' title='How to turn off popup page preview in Google search results'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-2420552747219420604</id><published>2011-04-15T01:39:00.000-07:00</published><updated>2011-04-15T01:54:54.465-07:00</updated><title type='text'>Java code block in JIRA</title><content type='html'>This is just small hint on JIRA usage.&lt;br /&gt;&lt;br /&gt;If you want to post some source code example in JIRA issue, please use code blocks ! Other vice you'll have a chance to see fancy smiles instead of certain pieces of code. I saw it few times, very annoying...&lt;br /&gt;&lt;br /&gt;It's not hard at all:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;{code} public static void main(String[] args)  {code}&lt;br /&gt;&lt;br /&gt;&lt;a href="http://confluence.atlassian.com/display/DOC/Code+Block+Macro"&gt;Other languages are also supported.&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-2420552747219420604?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/2420552747219420604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=2420552747219420604' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/2420552747219420604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/2420552747219420604'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2011/04/java-code-block-in-jira.html' title='Java code block in JIRA'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-3712843152440754029</id><published>2011-02-25T03:21:00.000-08:00</published><updated>2011-02-25T03:34:24.496-08:00</updated><title type='text'>Precompile JSP with Maven 2</title><content type='html'>There are situations where JDK is banned in production and only JRE allowed for use. In this case if you are using JSP there is only one option to use - precompile JSP. Here is example how to achieve that. Nothing very special, but I guess this can save some time and effort for somebody )&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: rgb(0, 0, 0); background: none repeat scroll 0% 0% rgb(255, 255, 255);"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;plugin&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.codehaus.mojo&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jspc-maven-plugin&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;executions&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;             &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;execution&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;                 &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jspc&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;                 &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goals&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;                     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goal&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;compile&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goal&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;                 &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goals&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;             &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;execution&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;executions&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;plugin&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;plugin&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.apache.maven.plugins&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;maven-war-plugin&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;             &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;webXml&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;${basedir}/target/jspweb.xml&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;webXml&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;warSourceExcludes&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;**/*.jsp&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;warSourceExcludes&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;plugin&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;WarSourceExcludes will not package original JSPs - really makes no sence since they are just classes and appropriate servlet mappins in web.xml now.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-3712843152440754029?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/3712843152440754029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=3712843152440754029' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/3712843152440754029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/3712843152440754029'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2011/02/precompile-jsp-with-maven-2.html' title='Precompile JSP with Maven 2'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-7639157585613645590</id><published>2011-02-19T07:17:00.000-08:00</published><updated>2011-02-19T08:09:06.204-08:00</updated><title type='text'>Mock JNDI in jUnit</title><content type='html'>JNDI is very useful technology. But... not everywhere. If there is the need to deploy your application on variety of different environments, for example databases with sensitive data and you are not a person who is suitable to deploy application for a bunch of reasons - segregation of concepts, separate production team, etc - JNDI is what you need. If you are with JNDI, only thing you have to provide is JNDI names with example config, so that person responsible for deployment could figure out how to deal with it. Just imagine the mess when you need to deploy war file for ~10 different Oracle databases and the same number of WebSphere MQ queues without JNDI. Think for 1 min :)&lt;br /&gt;&lt;br /&gt;But, in development is not so pleasant to have a deal with JNDI, since container required in this case to perform actual lookup of resources. From the other point of view not all so bad, since there is a way in 10 lines of code to mock required JNDI datasource. In fact it could be any other resource, but data source seems to be the most popular.&lt;br /&gt;&lt;br /&gt;Key point here is the use of the calss from SpringSource -&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;org.springframework.mock.jndi.SimpleNamingContextBuilder&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here is the complete example how to use it -&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: rgb(0, 0, 0); background: none repeat scroll 0% 0% rgb(255, 255, 255);"&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; com&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;blogspot&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;ostas&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;cxf&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;SimpleDao&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; oracle&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;jdbc&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;pool&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;OracleDataSource&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;apache&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;log4j&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;Logger&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;junit&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;BeforeClass&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;junit&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;Test&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;junit&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;runner&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;RunWith&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;springframework&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;beans&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;factory&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;annotation&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;Autowired&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;springframework&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;mock&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;jndi&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;SimpleNamingContextBuilder&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;springframework&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;test&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;context&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;ContextConfiguration&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;springframework&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;test&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;context&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;junit4&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;SpringJUnit4ClassRunner&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; javax&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;naming&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;NamingException&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; java&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;sql&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;SQLException&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; static org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;junit&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;Assert&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;assertEquals&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; static org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;junit&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;Assert&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;assertNotNull&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;@RunWith(SpringJUnit4ClassRunner.class)&lt;br /&gt;@ContextConfiguration(locations=&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"classpath:/WEB-INF/dataAccess-applicationContext.xml"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;)&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;class&lt;/span&gt; DaoTestCase&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; Logger logger &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; Logger&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getLogger&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;DaoTestCase&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;class&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getName&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;@&lt;/span&gt;BeforeClass&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;void&lt;/span&gt; setUp&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;    OracleDataSource ods &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;null&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;try&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;        ods &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;new&lt;/span&gt; OracleDataSource&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;catch&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;SQLException&lt;/span&gt; e&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;        logger&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;error&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;e&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;    ods&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;setURL&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"jdbc:oracle:thin:@127.0.0.1:1521/orcldb"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    ods&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;setUser&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"*"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    ods&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;setPassword&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"*"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    SimpleNamingContextBuilder builder &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;null&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;try&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;        builder &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; SimpleNamingContextBuilder&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;emptyActivatedContextBuilder&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;        builder&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;bind&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"java:comp/env/jdbc/db"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;ods&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;catch&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;NamingException e&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;        logger&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;error&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;e&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;@&lt;/span&gt;Autowired&lt;br /&gt;SimpleDao simpleDao&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;@&lt;/span&gt;Test&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;void&lt;/span&gt; testInjectBean&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;throws&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Exception&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;    logger&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;debug&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"Bean : &gt;&gt;&gt; "&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;+&lt;/span&gt; simpleDao&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    assertNotNull&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;simpleDao&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;@&lt;/span&gt;Test&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;void&lt;/span&gt; testDBconnection&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;throws&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Exception&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;    assertEquals&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;simpleDao&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getNumber&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;As you can see from this code, actual mock is just&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: rgb(0, 0, 0); background: none repeat scroll 0% 0% rgb(255, 255, 255);"&gt;SimpleNamingContextBuilder builder = null&lt;span style="color: rgb(128, 128, 48);"&gt;;&lt;/span&gt;&lt;br /&gt;try &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;  builder &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; SimpleNamingContextBuilder&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;emptyActivatedContextBuilder&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  builder&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;bind&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"java:comp/env/jdbc/db"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;ods&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt; catch (NamingException e) &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;    logger&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;error&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;e&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;ods - just plain DataSource. From Spring point jdbc/db looks llike this -&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: rgb(0, 0, 0); background: none repeat scroll 0% 0% rgb(255, 255, 255);"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;dataSource&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(39, 71, 150);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;org.springframework.jndi.JndiObjectFactoryBean&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;jndiName&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;java:comp/env/jdbc/db&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The last thing I have to mention here is Maven2 dependency for use SimpleNamingContextBuilder class -&lt;br /&gt;&lt;br /&gt;&lt;pre style='color:#000000;background:#ffffff;'&gt;&lt;span style='color:#a65700; '&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;dependency&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style='color:#a65700; '&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;groupId&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;org.springframework&lt;span style='color:#a65700; '&gt;&amp;lt;/&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;groupId&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style='color:#a65700; '&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;artifactId&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;spring-test&lt;span style='color:#a65700; '&gt;&amp;lt;/&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;artifactId&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style='color:#a65700; '&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;version&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;3.0.3.RELEASE&lt;span style='color:#a65700; '&gt;&amp;lt;/&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;version&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style='color:#a65700; '&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;scope&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;test&lt;span style='color:#a65700; '&gt;&amp;lt;/&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;scope&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#a65700; '&gt;&amp;lt;/&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;dependency&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-7639157585613645590?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/7639157585613645590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=7639157585613645590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7639157585613645590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7639157585613645590'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2011/02/mock-jndi-resources-in-unit-tests.html' title='Mock JNDI in jUnit'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-7388568895791319299</id><published>2010-02-22T13:26:00.000-08:00</published><updated>2010-02-22T14:08:09.322-08:00</updated><title type='text'>Generate Maven2 Archetype from existing project</title><content type='html'>It's not hard to create custom archetype in Maven 2.2 from existing project. I had multi-module  .ear Maven project which I want to reuse. So, I decided to play a little with custom archetypes to create my own and don't repeat myself again and again. Fixing dependencies manually - is not the best way to spend lifetime :)&lt;br /&gt;&lt;br /&gt;To jumpstart archetype creaton there is a special maven goal of archetype plugin archetype:&lt;span style="font-weight: bold;"&gt;create-from-project&lt;/span&gt;. So,&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;mvn clean archetype:create-from-project&lt;/blockquote&gt;Now we have prototype of our archetype in target\generated-sources\archetype\ directory.&lt;br /&gt;Then...&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;cd target\generated-sources\archetype\&lt;br /&gt;mvn install&lt;br /&gt;&lt;/blockquote&gt;Friendly speaking, I had to do some tweaking to successfully generate normal .ear Maven 2 project which can be compiled and run without problems. It was fixing some of dependencies at Logic and EAR modules, bit it was not hard - just specifying ${groupId} where necessary.  To use this archetype after "mvn install" just type&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;mvn archetype:generate&lt;br /&gt;&lt;/blockquote&gt;and choose EnterpriseApp-archetype from the list. It will looks like....&lt;br /&gt;&lt;blockquote&gt;2: local -&gt; EnterpriseApp-archetype (EnterpriseApp-archetype)&lt;br /&gt;....&lt;br /&gt;&lt;/blockquote&gt;in the list.&lt;br /&gt;&lt;br /&gt;Source code is here : http://ostas-blog-src.googlecode.com/svn/trunk/JbossCargoJpaEjbWebEarArchetype/.&lt;br /&gt;&lt;br /&gt;To build it use&lt;br /&gt;&lt;blockquote&gt;svn co http://ostas-blog-src.googlecode.com/svn/trunk/JbossCargoJpaEjbWebEarArchetype/&lt;br /&gt;&lt;br /&gt;mvn install&lt;/blockquote&gt;You'll need to specify your jboss home location at parent pom.xml file to use cargo-jboss deployment. In my case it is&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;pre style='color:#000000;background:#ffffff;'&gt;&lt;span style='color:#a65700; '&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;jboss.home&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;C:/server/Java/jboss-4.2.2.GA/&lt;span style='color:#a65700; '&gt;&amp;lt;/&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;jboss.home&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;If you have any comments/issues/suggestions give me to know.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-7388568895791319299?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/7388568895791319299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=7388568895791319299' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7388568895791319299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7388568895791319299'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2010/02/generate-maven2-archetype-from-existing.html' title='Generate Maven2 Archetype from existing project'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-4434267054566093980</id><published>2010-01-19T01:10:00.000-08:00</published><updated>2010-01-19T01:44:29.643-08:00</updated><title type='text'>Quartz Scheduler uptime</title><content type='html'>My RIA application I've mentioned &lt;a href="http://ostas.blogspot.com/2010/01/adobe-flex-and-java-with-data-push-live.html"&gt;before&lt;/a&gt; seems to be working. One week (7 days) without any failure or restart. The interesting part is the number of jobs executed by scheduler. At the moment of writing it's 584,038. It's because job being executed every second. Take a look here:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_CcxKUpSUr-k/S1V7wxvyaqI/AAAAAAAAADs/beqsyaW3LuE/s1600-h/scheduler-details.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 250px;" src="http://1.bp.blogspot.com/_CcxKUpSUr-k/S1V7wxvyaqI/AAAAAAAAADs/beqsyaW3LuE/s320/scheduler-details.png" alt="" id="BLOGGER_PHOTO_ID_5428381003782711970" border="0" /&gt;&lt;/a&gt;Actually, it's output of org.quartz.Scheduler.getMetaData().getSummary();&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-4434267054566093980?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/4434267054566093980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=4434267054566093980' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4434267054566093980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4434267054566093980'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2010/01/quartz-scheduler-uptime.html' title='Quartz Scheduler uptime'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_CcxKUpSUr-k/S1V7wxvyaqI/AAAAAAAAADs/beqsyaW3LuE/s72-c/scheduler-details.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-7323420122831922770</id><published>2010-01-12T14:51:00.000-08:00</published><updated>2010-01-12T17:12:35.676-08:00</updated><title type='text'>Adobe Flex and Java with data push live example</title><content type='html'>&lt;blockquote&gt;&lt;/blockquote&gt;Today I want to present to your attention my Adobe Flex 3 + Java rich internet application.&lt;br /&gt;&lt;a href="http://myflexapp.daoway.staxapps.net/"&gt;http://myflexapp.daoway.staxapps.net&lt;/a&gt; auth: user/user. Under "user" account you'll not able to control scheduler behavior - start and stop. Declarative, role-based method-level security using Spring Security rocks ! :)&lt;br /&gt;&lt;br /&gt;I have to say few words about what my RIA actually can do. It could be useful for live JVM memory monitoring and visualization. Or maybe not... Anyway, this is my playground. In the future, source of data for visualization could be anything else. I suppose that approach will remain the same.&lt;br /&gt;&lt;br /&gt;I have a Quartz scheduler which is asking for a memory state every 1 sec. Then this data goes to Flex using data push. To view live chart click on menu Live data&gt; Subscribe. BlazeDS is responsible for Flex-Java interaction. I have to admit that it's pleasant to work with Spring-Flex integration. So, if you using Flex and and Spring together - try &lt;a href="http://www.springsource.org/spring-flex"&gt;Spring BlazeDS integration&lt;/a&gt; !&lt;br /&gt;&lt;br /&gt;You can make a screen shot of current state of free memory chart or go full screen. You can change a number of frames to show on live chart. It was not very hard to implement. I've spent much more time to implement "make snapshot" functionality. The idea is to record memory state every 5 seconds for later analysis. Well, I can add cron job to Quartz scheduler dynamically, but there is no notification functionality for managing "ready state" or "still in progress". I'll implement it later... I have some ideas. So, adding a job to scheduler works and this job can successfully write data to database for later reuse or export. Hibernate is used here. Maybe to heavyweight, but nobody stops me to implement new service implementation using JDBC. Spring and DI should work here. Work on ability to store different snapshots in right way is still in progress. At this moment every data from any request for snapshot goes into the same database table. It's alpha... User registration is also under development. Don't try to register yet, just use credentials I've mentioned before - user/user.&lt;br /&gt;&lt;br /&gt;If you have any issues with this application give me a sign, please. Any comments or emails with suggestions or improvements are welcome ! It's early alpha and there is a lot of work to be done to make it looking nice and shiny. So, I hope for your feedback. Maybe I'll share the sources. Thanks !&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-7323420122831922770?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/7323420122831922770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=7323420122831922770' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7323420122831922770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7323420122831922770'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2010/01/adobe-flex-and-java-with-data-push-live.html' title='Adobe Flex and Java with data push live example'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-7242902980751329927</id><published>2010-01-07T14:49:00.000-08:00</published><updated>2010-01-07T15:00:21.576-08:00</updated><title type='text'>My Twitter</title><content type='html'>Yep, I'm started. Here it is - &lt;a href="http://twitter.com/stanislavos"&gt;http://twitter.com/stanislavos&lt;/a&gt;. Lets see WTF it is... if so many people using it, there is should be something I've missed before.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-7242902980751329927?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/7242902980751329927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=7242902980751329927' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7242902980751329927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7242902980751329927'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2010/01/my-twitter.html' title='My Twitter'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-8683205542787411433</id><published>2009-10-16T00:19:00.000-07:00</published><updated>2009-10-16T00:21:49.665-07:00</updated><title type='text'>[Friday] You just divided by zero, didn't you?</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_CcxKUpSUr-k/StgewRCpDYI/AAAAAAAAAC0/oZc238Wx3Rw/s1600-h/633495993495399838-you-son-of-a-bitch.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://1.bp.blogspot.com/_CcxKUpSUr-k/StgewRCpDYI/AAAAAAAAAC0/oZc238Wx3Rw/s320/633495993495399838-you-son-of-a-bitch.jpg" alt="" id="BLOGGER_PHOTO_ID_5393094368333204866" border="0" /&gt;&lt;/a&gt;&lt;a href="http://www.motivatedphotos.com/?id=572"&gt;source&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-8683205542787411433?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/8683205542787411433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=8683205542787411433' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/8683205542787411433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/8683205542787411433'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2009/10/friday-you-just-divided-by-zero-didnt.html' title='[Friday] You just divided by zero, didn&apos;t you?'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_CcxKUpSUr-k/StgewRCpDYI/AAAAAAAAAC0/oZc238Wx3Rw/s72-c/633495993495399838-you-son-of-a-bitch.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-4518727968551638144</id><published>2009-09-22T04:34:00.000-07:00</published><updated>2009-09-22T05:18:55.830-07:00</updated><title type='text'>Screenshot of Web Page in Python - 15 lines of code</title><content type='html'>I cant say that this solution is pretty elegant, but it's short and working. But... platform dependent, because of IE. Anyway here it is :&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;"&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;from&lt;/span&gt; win32com&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;client &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt; Dispatch&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;from&lt;/span&gt; time &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt; sleep&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;from&lt;/span&gt; sys &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt; &lt;span style="color: rgb(227, 74, 220);"&gt;exit&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt; ImageGrab&lt;br /&gt;&lt;br /&gt;IE&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;Dispatch&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"InternetExplorer.Application"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;IE&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;Visible&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;1&lt;/span&gt;&lt;br /&gt;IE&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;fullScreen &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;1&lt;/span&gt;&lt;br /&gt;IE&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;Navigate&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"http://ostas.blogspot.com"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;while&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;IE&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;ReadyState &lt;span style="color: rgb(128, 128, 48);"&gt;!&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;:&lt;/span&gt;&lt;br /&gt; sleep&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;img &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; ImageGrab&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;grab&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;1440&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;900&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;img&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;save&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'screenshot.jpg'&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'JPEG'&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;IE&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;Quit&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;exit&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Code is pretty simple- it launches IE in full screen mode, waiting while page being loaded, makes screenshot of whole screen resolution - 1440 x 900 in my case, and happily exits.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-4518727968551638144?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/4518727968551638144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=4518727968551638144' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4518727968551638144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4518727968551638144'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2009/09/screenshot-of-web-page-in-python-15.html' title='Screenshot of Web Page in Python - 15 lines of code'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-7547956348388862471</id><published>2009-08-25T00:27:00.000-07:00</published><updated>2009-08-25T05:50:04.205-07:00</updated><title type='text'>Spring BlazeDS integration - playing with testdrive</title><content type='html'>svn checkout https://src.springframework.org/svn/spring-flex/trunk/spring-flex-samples/&lt;br /&gt;&lt;br /&gt;cd spring-flex-samples\spring-flex-testdrive,&lt;br /&gt;&lt;br /&gt;mvn install&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;[ERROR] FATAL ERROR&lt;br /&gt;[INFO] -------------------------------------&lt;br /&gt;[INFO] Java heap space&lt;br /&gt;[INFO] -------------------------------------&lt;br /&gt;[INFO] Trace&lt;br /&gt;java.lang.OutOfMemoryError: Java heap space&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Oops... Okay... lets say "&lt;span style="font-weight: bold;"&gt;set MAVEN_OPTS=-Xmx1024m&lt;/span&gt;" - should be enough.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;mvn clean install&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Not all is clear here, still :&lt;br /&gt;&lt;blockquote&gt;Missing:&lt;br /&gt;----------&lt;br /&gt;1) org.springframework.flex:spring-flex:jar:1.0.1.BUILD-SNAPSHOT&lt;br /&gt;&lt;br /&gt;Try downloading the file manually from the project website.&lt;br /&gt;&lt;br /&gt;Then, install it using the command:&lt;br /&gt;    mvn install:install-file -DgroupId=org.springframework.flex -DartifactId=spring-flex -Dversion=1.0.1.BUILD-SNAPSHOT -Dpack&lt;br /&gt;aging=jar -Dfile=/path/to/file&lt;br /&gt;&lt;br /&gt;Alternatively, if you host your own repository you can deploy the file there:&lt;br /&gt;    mvn deploy:deploy-file -DgroupId=org.springframework.flex -DartifactId=spring-flex -Dversion=1.0.1.BUILD-SNAPSHOT -Dpackag&lt;br /&gt;ing=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]&lt;br /&gt;&lt;br /&gt;Path to dependency:&lt;br /&gt;      1) org.springframework.flex.samples:testdrive:war:1.0.1.BUILD-SNAPSHOT&lt;br /&gt;      2) &lt;span style="font-weight: bold;"&gt;org.springframework.flex:spring-flex:jar:1.0.1.BUILD-SNAPSHOT&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;cd testdrive, edit pom.xml, change version of spring-flex jar:&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;  &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupid&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.springframework.flex&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupid&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactid&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.springframework.flex&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactid&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;  &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;1.0.0.RELEASE&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;blockquote&gt;mvn install&lt;br /&gt;....&lt;br /&gt;[INFO] BUILD SUCCESSFUL&lt;br /&gt;[INFO] --------------------------------&lt;br /&gt;[INFO] Total time: 4 minutes 50 seconds&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Cool, but not yet...&lt;br /&gt;Deploying...&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_messageBrokerDefaultHandlerMapping': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_messageBroker': Invocation of init method failed; &lt;span style="font-weight: bold;"&gt;nest ed exception is java.lang.NoClassDefFoundError: org/apache/xpath/CachedXPathAPI&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Well, ok, org.apache.xpath.CachedXPathAPI - it's xalan&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;"&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;dependency&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;                       &lt;br /&gt;  &lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;groupid&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;xalan&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;/&lt;/span&gt;groupid&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;   &lt;br /&gt;  &lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;artifactid&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;xalan&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;/&lt;/span&gt;artifactid&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;version&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;2.7&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;/&lt;/span&gt;version&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;   &lt;br /&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;/&lt;/span&gt;dependency&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then ... mvn install&lt;br /&gt;&lt;br /&gt;Yahoooo !&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;[INFO] BUILD SUCCESSFUL&lt;br /&gt;[INFO] ------------------------------------------&lt;br /&gt;[INFO] Total time: 7 minutes 30 seconds&lt;br /&gt;[INFO] Finished at: Tue Aug 25 11:10:46 EEST 2009&lt;br /&gt;[INFO] Final Memory: 32M/106M&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;Deploying.. looks nice...&lt;br /&gt;FF -&gt; http://localhost:8080/testdrive/insync01/insync01.html&lt;br /&gt;&lt;br /&gt;Ooops... Flash-plugin stacktrace :&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error &lt;span style="font-weight: bold;"&gt;NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:8080/messagebroker/amf'&lt;/span&gt;"]&lt;br /&gt;  at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()&lt;br /&gt;  at mx.rpc::Responder/fault()&lt;br /&gt;  at mx.rpc::AsyncRequest/fault()&lt;br /&gt;  at mx.messaging::ChannelSet/faultPendingSends()&lt;br /&gt;  at mx.messaging::ChannelSet/channelFaultHandler()&lt;br /&gt;  at flash.events::EventDispatcher/dispatchEventFunction()&lt;br /&gt;  at flash.events::EventDispatcher/dispatchEvent()&lt;br /&gt;  at mx.messaging::Channel/connectFailed()&lt;br /&gt;  at mx.messaging.channels::PollingChannel/connectFailed()&lt;br /&gt;  at mx.messaging.channels::AMFChannel/statusHandler()&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Maybe wrong context root ? Where ? To keep things as simple as possible I'm renaming testdrive.war to ROOT.war. And yes ! It works. I've added maven jetty plugin to be able to run web application directly from command line, I just love it. BTW, &lt;a href="http://stas.ostapenko.googlepages.com/spring-flex-testdrive.fix.diff"&gt;here&lt;/a&gt; is the svn diff file (patch) which you can apply as described &lt;a href="http://wiki.habariproject.org/en/Subversion_and_applying_patchs"&gt;here&lt;/a&gt; and don't do manual editing. It's simple, but maybe could be useful for someone.&lt;br /&gt;&lt;br /&gt;Now I'm going to test all this stuff to see how can I benefit from using integration.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-7547956348388862471?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/7547956348388862471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=7547956348388862471' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7547956348388862471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7547956348388862471'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2009/08/spring-blazeds-integration-playing-with.html' title='Spring BlazeDS integration - playing with testdrive'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-5881280060151295960</id><published>2009-08-21T02:53:00.000-07:00</published><updated>2009-08-21T03:57:52.562-07:00</updated><title type='text'>Java Champion Yakov Fain started podcast</title><content type='html'>Here is a few words about Yakov (from book &lt;a href="http://www.amazon.com/Internet-Applications-Adobe-Secrets-Masters/dp/097776222X"&gt;"Rich Internet Applications with Adobe Flex &amp;amp; Java"&lt;/a&gt;)&lt;br /&gt;&lt;blockquote&gt;Yakov Fain is a Managing Principal of Farata Systems. He’s responsible for the enterprise architecture and emerging technologies. Yakov has authored several Java books, dozens of technical articles, and his blog is hugely popular. Sun Microsystems has awarded Yakov with the title Java Champion. He leads the Princeton Java Users Group. Yakov holds a BS and an MS in Applied Math and is an Adobe Certified Flex Instructor.&lt;/blockquote&gt;Link : &lt;a href="http://nobsit.podbean.com/"&gt;http://nobsit.podbean.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-5881280060151295960?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/5881280060151295960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=5881280060151295960' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/5881280060151295960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/5881280060151295960'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2009/08/java-champion-yakov-fain-started.html' title='Java Champion Yakov Fain started podcast'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-4263020689714277939</id><published>2009-08-19T05:55:00.000-07:00</published><updated>2010-01-13T06:22:29.621-08:00</updated><title type='text'>Adobe Flex , BlazeDS and Spring data push RIA app</title><content type='html'>I'm playing with Adobe Flex 3 and BlazeDS last time. It's pretty fun! Imagine some kind of application where we need to process and visualize data which we fetching from some service at regular basis, for example every second. Maybe not so regular, maybe 10 seconds or something else. So, it's better to notify client that we have a new data and send it to client for processing. Data push - is when server pushing data to client, every time new data become available.&lt;br /&gt;&lt;br /&gt;My example of such kind of application is RIA app for JVM free memory monitoring. It's probably useless, but approach is right, I suppose :) I have Adobe Flex 3 on client and Spring 2 + BlazeDS+Quartz on backend. I don't want to dive into technical details here(not now, sorry, maybe latter), just code and video of working application. Source is &lt;a href="http://code.google.com/p/ostas-blog-src/source/checkout"&gt;here&lt;/a&gt; (FlexMemoryMonitoring) and here is the video :&lt;br /&gt;&lt;br /&gt;&lt;object height="344" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/uRDAHjuX5Zk&amp;amp;hl=en&amp;amp;fs=1&amp;amp;rel=0"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/uRDAHjuX5Zk&amp;amp;hl=en&amp;amp;fs=1&amp;amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="344" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Update&lt;/span&gt;.&lt;br /&gt;You can see fresh version of this application &lt;a style="font-weight: bold;" href="http://ostas.blogspot.com/2010/01/adobe-flex-and-java-with-data-push-live.html"&gt;online&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-4263020689714277939?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/4263020689714277939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=4263020689714277939' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4263020689714277939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4263020689714277939'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2009/08/adobe-flex-blazeds-and-spring-data-push.html' title='Adobe Flex , BlazeDS and Spring data push RIA app'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-8051707002728553521</id><published>2009-05-22T01:25:00.000-07:00</published><updated>2009-05-22T13:54:17.046-07:00</updated><title type='text'>My first Adobe Flex app - DZone RSS reader widget</title><content type='html'>I'm playing with Adobe Flex at this moment and want to share some impressions about Flex. To be short... Flex is definitively great ! I'm really hate Flash banners (Ablock Plus rock solid, besides) but Flex is pleasant instrument. Without any previous Flash experience I was able to create simple, but I hope interesting application - DZone RSS reader widget. It fetches RSS feed from dzone, and show items. Items are clickable, a little bit more detailed description is showed in pretty tooltip. You can list rss items, 10 per "page". There are 25 items at dzone rss, so pagination is needed. You can see it in action &lt;a href="http://stas.ostapenko.googlepages.com/flexrss"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The sad part of story is that my app doesnt works in IE 6 (or IE 7 too ?) but in FF3 all is OK. As for me it's strange... the same app, but behaviour is different. I'm getting this error message:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;[RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]. URL: http://feeds.dzone.com/dzone/frontpage"]&lt;br /&gt;&lt;/blockquote&gt;I have no idea why. Maybe some IE specific security manager, or something like that ? In FF3 all is OK... So, if you have some idea about resolving this issue, give me a sign, please. I hope it's something minor... If somebody become interested in this, I will share the source, it's something about 300 loc.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Source code is &lt;a href="http://stas.ostapenko.googlepages.com/RSSReader.zip"&gt;here&lt;/a&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-8051707002728553521?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/8051707002728553521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=8051707002728553521' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/8051707002728553521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/8051707002728553521'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2009/05/my-first-adobe-flex-app-dzone-rss.html' title='My first Adobe Flex app - DZone RSS reader widget'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-565887218825559442</id><published>2009-04-16T04:32:00.000-07:00</published><updated>2009-04-16T05:40:57.057-07:00</updated><title type='text'>Google XML Pages - HelloWorld app with source code</title><content type='html'>Last time I blogged was October 20, 2008... Wow ! Time is going so fast ! I'm really appreciate my readers who stayed with me and keep signing up using feedburner. You rock ! :)&lt;br /&gt;&lt;br /&gt;So, to be closer to topic... &lt;a href="http://google-opensource.blogspot.com/2008/07/google-xml-pages-functional-markup.html"&gt;Google XML Pages&lt;/a&gt; or GXP - seems to be interesting since it has been used in an army Google products -  &lt;a href="http://www.google.com/adsense/"&gt;AdSense&lt;/a&gt;, &lt;a href="http://www.blogger.com/"&gt;Blogger&lt;/a&gt;, and &lt;a href="http://reader.google.com/"&gt;Google Reader&lt;/a&gt;. I have some previous Apache Velocity experience, so the questions are what GXP is, what the differences between the two if any, performance ? I'll try to highlight some of this points in my next post, but for now - just hello world app.&lt;br /&gt;&lt;br /&gt;There is a lot of information about GXP, almost all of this info - just annonce. No code, no example...&lt;br /&gt;Our GXP template loooks like this :&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;template&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;com.google.code.projects.BlogSrc.GxpApp.HelloGxp&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(102, 102, 22);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.w3.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/1999/xhtml&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(102, 102, 22);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;google.com&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/2001/gxp&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(102, 102, 22);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;java&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;google.com&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/2001/gxp/code/java&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(102, 102, 22);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;call&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;google.com&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/2001/gxp/call&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(39, 71, 150);"&gt;gxp:ispace&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;preserve&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;gxp:espace&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;collapse&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(39, 71, 150);"&gt;content-type&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;text/plain&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;import&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;java.util.List&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;param&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;list&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;java:type&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;List{Integer}&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;loop&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;Integer&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;var&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;listItem&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;iterable&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;list&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;Value : &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;eval&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;expr&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;listItem&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;loop&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;template&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;What do we have here ? Template which takes as param List&lt;integer&gt; with name "list", iterates &lt;span class="ref_result"&gt;through&lt;/span&gt; list and print values stored in it. As you can see, template code is XML, actually. But ! After compiling this XML using GXP compiler we'll get Java source file with appropriate API for calling our template. Java method for calling template looks like this:&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt;&lt;br /&gt;void write(&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; java.lang.Appendable gxp$out,&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; com.google.gxp.base.GxpContext gxp_context,&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; List&amp;lt;Integer&gt; list)&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;throws&lt;/span&gt; java.io.IOException&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; java&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;util&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Locale&lt;/span&gt; gxp_locale &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; gxp_context&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getLocale&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;gxp$out&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;append&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(15, 105, 255);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(187, 121, 119);"&gt;boolean&lt;/span&gt; gxp$bool$&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;false&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;for&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Integer&lt;/span&gt; listItem &lt;span style="color: rgb(128, 128, 48);"&gt;:&lt;/span&gt; list&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;gxp$bool$&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;   gxp$out&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;append&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;" "&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;else&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;   gxp$bool$&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;true&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt; gxp$out&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;append&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(15, 105, 255);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;Value : "&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;                                      &lt;br /&gt; com&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;google&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;gxp&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;text&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;PlaintextAppender&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;INSTANCE&lt;br /&gt;     &lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;append&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;gxp$out&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; gxp_context&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;listItem&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; gxp$out&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;append&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(15, 105, 255);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;gxp$out&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;append&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(15, 105, 255);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Please notice list and listItem variables and their types. The last step is actually put some param and get result. The name of our tempale is com.google.code.projects.BlogSrc.GxpApp.HelloGxp, the name of file is HelloGxp.gxp. Result of template compilation is a java file - HelloGxp.java in package "com.google.code.projects.BlogSrc.GxpApp". Simplest way to run tempale code is just call static write() method from generated class HelloGxp. Something like this :&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;package&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; com&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;google&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;code&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;projects&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;BlogSrc&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;GxpApp&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; com&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;google&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;base&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;GxpContext&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; com&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;google&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;html&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;HtmlClosure&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; com&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;google&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;base&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;GxpClosure&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; java&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;io&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;*&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; java&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;util&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;*&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;class&lt;/span&gt; MyHelloWorld&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;StringWriter&lt;/span&gt; out &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;new&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;StringWriter&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;GxpContext gxpContext &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;br /&gt;    createGxpContext&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Locale&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;US&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;false&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;GxpContext createGxpContext&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Locale&lt;/span&gt; locale&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;boolean&lt;/span&gt; useXmlSyntax&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;return&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;new&lt;/span&gt; GxpContext&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;locale&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; useXmlSyntax&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;void&lt;/span&gt; testHello&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;throws&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Exception&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;List&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Integer&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt; list &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;new&lt;/span&gt; ArrayList&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Integer&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  list&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;add&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  list&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;add&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  list&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;add&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;3&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  list&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;add&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  list&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;add&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;5&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  list&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;add&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;6&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  HelloGxp&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;write&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;out&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; gxpContext&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;list&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;void&lt;/span&gt; main&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;String&lt;/span&gt; args&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; MyHelloWorld obj &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;new&lt;/span&gt; MyHelloWorld&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;try&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;         obj&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;testHello&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;String&lt;/span&gt; s &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; obj&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;out&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getBuffer&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;toString&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;System&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;out&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;println&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;s&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;catch&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Exception&lt;/span&gt; ex&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;         ex&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;printStackTrace&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Complete source code you can find &lt;a href="http://code.google.com/p/ostas-blog-src/source/browse/"&gt;here&lt;/a&gt;. &lt;/integer&gt;&lt;br /&gt;&lt;br /&gt;GxpHelloWorldMavenBuild - the same project but for use with Maven 2.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-565887218825559442?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/565887218825559442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=565887218825559442' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/565887218825559442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/565887218825559442'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2009/04/google-xml-pages-helloworld-app-with.html' title='Google XML Pages - HelloWorld app with source code'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-4049029439468325478</id><published>2008-10-20T04:28:00.000-07:00</published><updated>2008-10-20T04:37:14.835-07:00</updated><title type='text'>Google App Engine will support Java ? Cool !</title><content type='html'>Well, I don't believe yet, but it seems to be that Java will be supported on GAP !&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;At the recently Google Developers Day in Bangalore, Keynote speaker Prasad Ram said that Google App Engine will now support Java.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Source &lt;a href="http://technofriends.in/2008/10/20/google-app-engine-to-support-java/"&gt;here&lt;/a&gt; and &lt;a href="http://www.controlenter.in/2008/10/google-developer-day-bangalore-google-app-engine-to-support-java-android-sdk-release-on-oct-22/"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-4049029439468325478?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/4049029439468325478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=4049029439468325478' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4049029439468325478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4049029439468325478'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/10/google-app-engine-will-support-java.html' title='Google App Engine will support Java ? Cool !'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-8084761941053376760</id><published>2008-10-09T01:41:00.000-07:00</published><updated>2008-10-09T05:37:46.145-07:00</updated><title type='text'>JBoss EJB3 Integration testing with Maven2 and Cargo</title><content type='html'>One of the most boring things in EJB development is that we need container. Compile-Build-Deploy-Run_some_testing_code - this is to long cycle to repeat it frequently without some kind of automation. I'll show you one of the possible ways to simplify this stuff. There are others, but I didn't tried them (I mean jboss microcontainer here). It's not complex, but it works and probably could be portable solution for not only my case.&lt;br /&gt;&lt;br /&gt;So, my working environment is the following : Maven 2, JBoss 4.2.2 GA, jUnit 3.8.1 and of course EJB3. Build lifecycle with Maven 2 consists of &lt;a href="http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html"&gt;some phases&lt;/a&gt;, like "...compile,test,package,integration-test...". Ok, with package and compile phases all is clear. Test... we need jboss to be up and running before we can test anything. How to start and stop jboss automatically during build ? The answer is &lt;a href="http://cargo.codehaus.org/Maven2+plugin"&gt;Cargo with Maven2 plugin&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Cargo is a thin wrapper around existing containers (e.g. J2EE containers). It provides different APIs to easily manipulate containers.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Now we can assign "start container" and "stop container" goals to some Maven 2 build phase. First of all, we are interested in integration-test. Also we need to skip junit tests before integration test. To achieve this I'm using this config for cargo plugin :&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;plugin&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.codehaus.cargo&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;cargo-maven2-plugin&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;0.3-SNAPSHOT&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;container&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;containerId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jboss4x&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;containerId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;home&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;${jboss.home}&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;home&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;append&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;false&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;append&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;container&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;existing&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;home&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;${jboss.home}/server/default&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;home&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;properties&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;cargo.jboss.configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;default&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;cargo.jboss.configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;cargo.rmi.port&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;1099&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;cargo.rmi.port&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;cargo.logging&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;high&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;cargo.logging&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;properties&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;wait&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;false&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;wait&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;executions&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;execution&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;start-container&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;phase&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;pre-integration-test&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;phase&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goals&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goal&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;start&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goal&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goals&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;execution&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;execution&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;stop-container&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;phase&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;post-integration-test&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;phase&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goals&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goal&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;stop&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goal&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goals&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;execution&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;executions&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;    &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;plugin&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And this for surefire - to be able to run junit tests on integration-test phase, after container started at pre-integration-test phase :&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;plugin&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                                      &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.apache.maven.plugins&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;maven-surefire-plugin&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                            &lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;skip&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;true&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;skip&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                       &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                           &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;executions&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                               &lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;execution&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                             &lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;surefire-it&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                 &lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;phase&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;integration-test&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;phase&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;      &lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goals&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                              &lt;br /&gt;         &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goal&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;test&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goal&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                 &lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goals&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                             &lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                      &lt;br /&gt;         &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;skip&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;false&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;skip&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                &lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                     &lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;execution&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                            &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;executions&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                              &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;plugin&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;I haven't any luck with "standalone" type configuration. I should say that when"existing" jboss installation is used here, overall process is quite fast:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;[INFO] -------------------------------------------&lt;br /&gt;[INFO] BUILD SUCCESSFUL&lt;br /&gt;[INFO] -------------------------------------------&lt;br /&gt;[INFO] Total time: 42 seconds&lt;br /&gt;[INFO] Finished at: Thu Oct 09 15:15:39 EEST 2008&lt;br /&gt;[INFO] Final Memory: 9M/19M&lt;br /&gt;[INFO] -------------------------------------------&lt;br /&gt;&lt;/blockquote&gt;42 seconds to compile code, package jar, copy jar to deploy dir, start jboss, run junit test, stop jboss and all this by doing just "mvn install" !&lt;br /&gt;&lt;br /&gt;Complete source code available via svn &lt;a href="http://code.google.com/p/ostas-blog-src/source/checkout"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;PS.&lt;br /&gt;Time can be very different. My hardware is &lt;a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;amp;location=http%3A%2F%2Fwww.amazon.com%2FCompaq-Business-Notebook-6820s-Widescreen%2Fdp%2FB000VG2K0Q&amp;amp;tag=myitwo-20&amp;amp;linkCode=ur2&amp;amp;camp=1789&amp;amp;creative=9325"&gt;HP 6820s laptop&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=myitwo-20&amp;amp;l=ur2&amp;amp;o=1" alt="" style="border: medium none  ! important; margin: 0px ! important;" width="1" border="0" height="1" /&gt;. BTW, executing "mvn -o install" takes 23 sec :)&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-8084761941053376760?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/8084761941053376760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=8084761941053376760' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/8084761941053376760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/8084761941053376760'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/10/jboss-ejb3-integration-testing-with.html' title='JBoss EJB3 Integration testing with Maven2 and Cargo'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-7937123265943718284</id><published>2008-10-03T07:00:00.000-07:00</published><updated>2008-10-03T07:39:29.940-07:00</updated><title type='text'>Build EJB3 with Maven 2 example with source code</title><content type='html'>My posts (the &lt;a href="http://ostas.blogspot.com/2007/03/build-ejb3-with-maven-2.html"&gt;first&lt;/a&gt; and the &lt;a href="http://ostas.blogspot.com/2007/07/build-ejb3-with-jboss-and-maven-2.html"&gt;second&lt;/a&gt;) about how to build EJB3 using Maven 2 was very popular. This post is some kind of update, but now, with complete source code. BTW, I'm going to publish some of sources I mentioned at my blog posts, since readers are asking for them. I mean source code from &lt;a href="http://ostas.blogspot.com/2008/03/search-with-spring-hibernate-lucene-and.html"&gt;this&lt;/a&gt; post at minimum.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/ostas-blog-src/"&gt;&lt;br /&gt;So, here it is !&lt;/a&gt; In my further posts I'm going to highlight some of pitfalls one can face with.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-7937123265943718284?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/7937123265943718284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=7937123265943718284' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7937123265943718284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7937123265943718284'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/10/build-ejb3-with-maven-2-example-with.html' title='Build EJB3 with Maven 2 example with source code'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-2858317885681805188</id><published>2008-08-27T02:17:00.000-07:00</published><updated>2008-08-27T02:19:05.367-07:00</updated><title type='text'>Yet another Java Puzzle</title><content type='html'>No words here, just the code :)&lt;br /&gt;&lt;br /&gt;&lt;pre style='color:#000000;background:#ffffff;'&gt;&lt;span style='color:#800000; font-weight:bold; '&gt;class&lt;/span&gt; String&lt;br /&gt;&lt;span style='color:#800080; '&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span style='color:#800000; font-weight:bold; '&gt;public&lt;/span&gt; &lt;span style='color:#800000; font-weight:bold; '&gt;static&lt;/span&gt; &lt;span style='color:#bb7977; '&gt;void&lt;/span&gt; main&lt;span style='color:#808030; '&gt;(&lt;/span&gt;&lt;span style='color:#bb7977; font-weight:bold; '&gt;String&lt;/span&gt; args&lt;span style='color:#808030; '&gt;[&lt;/span&gt;&lt;span style='color:#808030; '&gt;]&lt;/span&gt;&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;br /&gt;    &lt;span style='color:#800080; '&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span style='color:#bb7977; font-weight:bold; '&gt;String&lt;/span&gt; &lt;span style='color:#bb7977; font-weight:bold; '&gt;String&lt;/span&gt;  &lt;span style='color:#808030; '&gt;=&lt;/span&gt; &lt;span style='color:#800000; font-weight:bold; '&gt;new&lt;/span&gt; &lt;span style='color:#bb7977; font-weight:bold; '&gt;String&lt;/span&gt;&lt;span style='color:#808030; '&gt;(&lt;/span&gt;&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;span style='color:#800080; '&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style='color:#800080; '&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#800080; '&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-2858317885681805188?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/2858317885681805188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=2858317885681805188' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/2858317885681805188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/2858317885681805188'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/08/yet-another-java-puzzle.html' title='Yet another Java Puzzle'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-4854219974994604179</id><published>2008-07-25T03:22:00.000-07:00</published><updated>2008-07-25T03:41:09.050-07:00</updated><title type='text'>Wow ! DZone.com using Acegi Security !</title><content type='html'>I've seen a very interesting alert box with exception message at dzone.com when tried to vote up for the post. It was something like "org.acegisecurity....". Hey, wait a minute, it is Acegi ! Really, login form looks as so&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;form&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;method&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"post"&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;action&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"/links/j_acegi_security_check"&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(39, 71, 150);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"loginform"&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"addlinkform"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;div&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;label&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;Username:&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;label&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;input&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"text"&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"txt"&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"j_username"&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;size&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"20"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;div&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;div&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;label&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;Password:&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;label&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;input&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"password"&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"txt"&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"j_password"&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;size&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"20"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;label&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;a&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;href&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"http://zones.dzone.com/user/password"&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;   class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"forgotpass"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; Forgot password?&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;a&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;div&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;div&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;label&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"cbx"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;input&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"checkbox"&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"_acegi_security_remember_me"&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt;&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;checked&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt; remember me&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;label&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;div&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;div&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"submit"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;input&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"submit"&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(39, 71, 150);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;onsubmit&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"lightbox.prototype.deactivate();"&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"Login"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;a&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;rel&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"deactivate"&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"lbAction"&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;href&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"#"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;input&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"button"&lt;/span&gt;&lt;span style="color: rgb(39, 71, 150);"&gt; &lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"Cancel"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;a&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                   &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;div&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;form&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;j_acegi_security_check, j_username, j_password, _acegi_security_remember_me - it seems to be really Acegi !&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-4854219974994604179?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/4854219974994604179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=4854219974994604179' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4854219974994604179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4854219974994604179'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/07/wow-dzonecom-using-acegi-security.html' title='Wow ! DZone.com using Acegi Security !'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-4237536948323660521</id><published>2008-07-22T05:03:00.000-07:00</published><updated>2008-07-22T05:16:03.496-07:00</updated><title type='text'>Struts 2 : Deprecate or remove Dojo plugin</title><content type='html'>Sometimes it is very useful to read struts-dev mailing list. See &lt;a href="http://www.nabble.com/-PROPOSAL--Deprecate-or-remove-Dojo-plugin-td18573704.html"&gt;here.&lt;/a&gt; In fact I'm very happy of that, because I was going to use some AJAX with Struts 2 and Dojo plugin.  One thing I couldn't figure out is why Dojo ?? Why not Prototype ? Why not jQuery ? Well, OK. If developers using Dojo, I will do the same. Now the situtation is more clear and I'm not going to use Dojo anymore. Maybe Prototype ? :)&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-4237536948323660521?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/4237536948323660521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=4237536948323660521' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4237536948323660521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4237536948323660521'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/07/struts-2-deprecate-or-remove-dojo.html' title='Struts 2 : Deprecate or remove Dojo plugin'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-2606936452540750419</id><published>2008-07-18T04:04:00.000-07:00</published><updated>2008-07-18T05:24:27.511-07:00</updated><title type='text'>A little bit of dependency injection with Struts 2 and Spring 2</title><content type='html'>I'm using Struts 2 + Hibernate 3 + Spring 2 for my current project. I have to admit that Struts+Spring integration is really easy. The key integration point is &lt;a href="http://struts.apache.org/2.x/docs/spring-plugin.html"&gt;Struts 2 Spring plugin&lt;/a&gt;. I'll not repeat the docs here. Only one thing I should admit that I prefer to handle spring dependencies by myself because of little bit different version of Spring - 2.0.5 in plugin and 2.0.8 in my project. So, I have this lines in my pom.xml (Maven 2 build file)&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.apache.struts&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;struts2-spring-plugin&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;2.0.11.1&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusions&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.springframework&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;spring-beans&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.springframework&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;spring-core&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.springframework&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;spring-context&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.springframework&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;spring-web&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusions&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;and&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.springframework&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;spring-core&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;${spring.version}&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;etc. I'm injecting Spring powered services into Struts 2 actions, but I had never had a chance to inject some kind of static list. Now I have, so  the story about it.&lt;br /&gt;&lt;br /&gt;I have a static list of countries. I think it doesn't make sense to store this info in database. The number of countries is not that large. If so, I need to store this data in some data structure and place it in memory. It could be List or Map - it depends on situation. And init this data structure once application starts. In web app when war file being deployed, Spring's WebApplicationContext initialized. So, when we define our list as Spring bean, it will be initialized at the application start and will be ready to other manipulations. I've defined it as so :&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;xml&lt;/span&gt; &lt;span style="color: rgb(0, 74, 67);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;"1.0"&lt;/span&gt; &lt;span style="color: rgb(0, 74, 67);"&gt;encoding&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"UTF-8"&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;?&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;beans&lt;/span&gt; &lt;span style="color: rgb(102, 102, 22);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.springframework.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/schema/beans&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(102, 102, 22);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;xsi&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.w3.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/2001/XMLSchema-instance&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(102, 102, 22);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;util&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.springframework.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/schema/util&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(102, 102, 22);"&gt;xsi&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;schemaLocation&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.springframework.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/schema/beans&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.springframework.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/schema/beans/spring-beans-2.0.xsd&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.springframework.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/schema/util&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.springframework.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/schema/util/spring-util-2.0.xsd&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;util&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;list&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;countryList&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;list-class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;java.util.LinkedList&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;item1&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;item2&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;item3&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;util&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;list&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;beans&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Here is the &lt;a href="http://forum.springframework.org/showthread.php?t=30584"&gt;one question&lt;/a&gt; on Spring forum and &lt;a href="http://static.springframework.org/spring/docs/2.0.x/reference/xsd-config.html#xsd-config-body-schemas-util"&gt;official docs&lt;/a&gt; about it. For now we have a LinkedList filled with countries. We are going to inject it into Spring action and then show it at the "view" jsp.&lt;br /&gt;&lt;br /&gt;Please note that id of our list is countryList. In fact it is a name of the bean. It's name really important since Struts 2 Spring pluring's default autowiring strategy is by name (I'm using default autowiring type and happy with that). It means that we can use setter injection this way&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;class&lt;/span&gt; SomeStruts2Action &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;extends&lt;/span&gt; ActionSupport&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;List&lt;/span&gt; countryList&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;void&lt;/span&gt; setCountryList&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;List&lt;/span&gt; countryList&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;this&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;countryList &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; countryList&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Please note that id and class member name with type List are equal. That is all ! But actually not all :) We have to tell where is our list definition is. In my case it's at one of jars so I have this line in web.xml :&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;context-param&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;param-name&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;contextConfigLocation&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;param-name&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;param-value&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;classpath:applicationContext-myCountryList.xml,&lt;br /&gt;   /WEB-INF/appContext-web.xml&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;param-value&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;context-param&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Have fun !&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-2606936452540750419?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/2606936452540750419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=2606936452540750419' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/2606936452540750419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/2606936452540750419'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/07/little-bit-of-dependency-injection-with.html' title='A little bit of dependency injection with Struts 2 and Spring 2'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-8377343446899317303</id><published>2008-07-02T04:03:00.000-07:00</published><updated>2008-07-02T04:26:46.248-07:00</updated><title type='text'>Blog stats : London vs California</title><content type='html'>I see an interesting tendency with blog visitors according to Google Analytics. With visitors by country US at the top, and California hit the score. But if I take criteria "by city", London at the top.&lt;br /&gt;&lt;br /&gt;I found it's pretty interesting. I know about Silicon Valley in CA - hudge technological center, but I don't know anything about London. Can we compare London vs. California from technological perspective? Just interesting what do you think, so feel free to comment. Of course my conclusion is based on my-only-stats and it's could be wrong.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-8377343446899317303?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/8377343446899317303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=8377343446899317303' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/8377343446899317303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/8377343446899317303'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/07/blog-stats-london-vs-california.html' title='Blog stats : London vs California'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-1816348846428408899</id><published>2008-06-05T00:24:00.000-07:00</published><updated>2008-06-05T01:09:49.529-07:00</updated><title type='text'>Spring Security 2.0 : Different target urls for different user roles</title><content type='html'>I'm evaluating Spring Security 2.0. The nice thing - it's really easier to have deal with it, rather than Acegi Security. I had an xml config file with 250+ LOC with Acegi ! Something like Rocket Science... but it is very flexible and expendable, it is very big plus.&lt;br /&gt;&lt;br /&gt;After all, it is still not so trivial to implement some things which I found very commonly used. But... Spring rocks ! And Spring community rocks even more. I've posted message to Spring forum &lt;a href="http://forum.springframework.org/showthread.php?t=55334"&gt;here&lt;/a&gt;.&lt;br /&gt;Thanks Luke Taylor for pointing me to the right direction.&lt;br /&gt;&lt;br /&gt;Lets imagine we have the same login form for common user and admin and we want admin to be redirected to some kind admin control panel and common user to /home /profile or something like that. In my case customized AuthenticationProcessingFilter will do the trick. The code looks like this :&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;package com&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;mycoolcompany&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;App&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;CustomSecurity&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt; javax&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;servlet&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;http&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;HttpServletRequest&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt; javax&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;servlet&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;http&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;HttpSession&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt; org&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;springframework&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;security&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;Authentication&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt; org&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;springframework&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;security&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;AuthenticationException&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt; org&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;springframework&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;security&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;GrantedAuthority&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt; org&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;springframework&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;security&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;providers&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;br /&gt; UsernamePasswordAuthenticationToken&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt; org&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;springframework&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;security&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;ui&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;webapp&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;br /&gt; &lt;/span&gt;AuthenticationProcessingFilter&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;public class CustomAuthenticationProcessingFilter&lt;br /&gt;extends AuthenticationProcessingFilter&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;@&lt;/span&gt;Override&lt;br /&gt;public Authentication attemptAuthentication&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;HttpServletRequest request&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;throws AuthenticationException &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(96, 48, 0);"&gt;String&lt;/span&gt; username &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; obtainUsername&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;request&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(96, 48, 0);"&gt;String&lt;/span&gt; password &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; obtainPassword&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;request&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;username &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; null&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt; username &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;password &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; null&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;  password &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;username &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; username&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;trim&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;UsernamePasswordAuthenticationToken authRequest &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;br /&gt;new UsernamePasswordAuthenticationToken&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;username&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; password&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;// Place the last username attempted into HttpSession for views&lt;/span&gt;&lt;br /&gt;HttpSession session &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; request&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getSession&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;false&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;session &lt;span style="color: rgb(128, 128, 48);"&gt;!&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; null &lt;span style="color: rgb(128, 128, 48);"&gt;|&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;|&lt;/span&gt; getAllowSessionCreation&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;  request&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getSession&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;setAttribute&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;SPRING_SECURITY_LAST_USERNAME_KEY&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;br /&gt;escapeEntities&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;username&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;// Allow subclasses to set the "details" property&lt;/span&gt;&lt;br /&gt;setDetails&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;request&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; authRequest&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;//role&amp;amp;URLs stuff&lt;/span&gt;&lt;br /&gt;final Authentication auth &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;&lt;br /&gt;this&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getAuthenticationManager&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;authenticate&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;authRequest&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;final GrantedAuthority&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt; grantedAuthorities &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; auth&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getAuthorities&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;boolean isAdmin &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; false&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;for&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;GrantedAuthority grantedAuthority &lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt; grantedAuthorities&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;if&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;ROLE_SUPERVISOR&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;equals&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;grantedAuthority&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;toString&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;     isAdmin &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; true&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;break&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(96, 48, 0);"&gt;String&lt;/span&gt; outcome &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; null&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;if&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;isAdmin&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;  outcome &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;/adminArea&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;else&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt; outcome &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;/someOtherUserArea&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;//actual change of default url for user&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;this&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;setDefaultTargetUrl&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;outcome&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;return&lt;/span&gt; auth&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;public &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(96, 48, 0);"&gt;String&lt;/span&gt; escapeEntities&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(96, 48, 0);"&gt;String&lt;/span&gt; s&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;StringBuffer sb &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; new StringBuffer&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;for&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;int&lt;/span&gt; i&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt; i &lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt; s&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;length&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt; i&lt;span style="color: rgb(128, 128, 48);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;char&lt;/span&gt; c &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; s&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;charAt&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;i&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;        &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;if&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;c &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;'&amp;lt;'&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;            sb&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;append&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;else&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;c &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;'&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;            sb&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;append&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;else&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;c &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;'"'&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;            sb&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;append&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;&amp;amp;#034;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;else&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;c &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;'\''&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;            sb&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;append&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;&amp;amp;#039;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;else&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;            sb&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;append&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;c&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;return&lt;/span&gt; sb&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;toString&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;And XML config :&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;xml&lt;/span&gt; &lt;span style="color: rgb(0, 74, 67);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;"1.0"&lt;/span&gt; &lt;span style="color: rgb(0, 74, 67);"&gt;encoding&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"UTF-8"&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;?&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;beans&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;beans&lt;/span&gt; &lt;span style="color: rgb(102, 102, 22);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.springframework.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/schema/security&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(102, 102, 22);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;beans&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.springframework.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/schema/beans&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(102, 102, 22);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;xsi&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.w3.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/2001/XMLSchema-instance&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(102, 102, 22);"&gt;xsi&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;schemaLocation&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.springframework.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/schema/beans&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.springframework.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/schema/beans/spring-beans-2.0.xsd&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.springframework.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/schema/security&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.springframework.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/schema/security/spring-security-2.0.1.xsd&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;http&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;auto-config&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;false&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;&lt;br /&gt;entry-point-ref&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;authenticationProcessingFilterEntryPoint&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;intercept-url&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;&lt;br /&gt; pattern&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;/secure/extreme/**&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;access&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;ROLE_SUPERVISOR&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;intercept-url&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;&lt;br /&gt; pattern&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;/someDefaultUrl/**&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;&lt;br /&gt; access&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;ROLE_SUPERVISOR&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;intercept-url&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;pattern&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;/secure/**&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;&lt;br /&gt; access&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;IS_AUTHENTICATED_REMEMBERED&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;intercept-url&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;pattern&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;/**&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;&lt;br /&gt; access&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;IS_AUTHENTICATED_ANONYMOUSLY&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;anonymous&lt;/span&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(105, 105, 105);"&gt;&amp;lt;!--&lt;/span&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;    Usernames/Passwords are&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;        rod/koala&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;        dianne/emu&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;        scott/wombat&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;        peter/opal&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;--&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;authentication-provider&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;password-encoder&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;hash&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;md5&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;user-service&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;user&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;rod&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;&lt;br /&gt;password&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;a564de63c2d0da68cf47586ee05984d7&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;&lt;br /&gt;authorities&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;ROLE_SUPERVISOR, ROLE_USER, ROLE_TELLER&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;user&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;dianne&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;&lt;br /&gt;password&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;65d15fe9156f9c4bbffd98085992a44e&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;&lt;br /&gt;authorities&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;ROLE_USER,ROLE_TELLER&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;user&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;scott&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;&lt;br /&gt;password&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;2b58af6dddbd072ed27ffc86725d7d3a&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(39, 71, 150);"&gt;authorities&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;ROLE_USER&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;user&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;peter&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;&lt;br /&gt;password&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;22b5c9accc6e1ba628cedc63a72d57f8&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;&lt;br /&gt;authorities&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;ROLE_USER&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;user-service&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;authentication-provider&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;authentication-manager&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;alias&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;authenticationManagerAlias&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;beans&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;authenticationProcessingFilterEntryPoint&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(39, 71, 150);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;org.springframework.security.ui.webapp.&lt;br /&gt;AuthenticationProcessingFilterEntryPoint&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;beans&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;&lt;br /&gt; name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;loginFormUrl&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;/login.jsp&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;beans&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;forceHttps&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;&lt;br /&gt; value&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;false&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;beans&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;beans&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;myAuthenticationProcessingFilter&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(39, 71, 150);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;com.mycoolcompany.App.CustomSecurity.&lt;br /&gt;CustomAuthenticationProcessingFilter&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;beans&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;&lt;br /&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;filterProcessesUrl&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;&lt;br /&gt;value&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;/j_spring_security_check&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;beans&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;&lt;br /&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;defaultTargetUrl&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(39, 71, 150);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;/someDefaultUrl/index.jsp&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;beans&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;authenticationManager&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(39, 71, 150);"&gt;ref&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;authenticationManagerAlias&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;custom-filter&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;position&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;AUTHENTICATION_PROCESSING_FILTER&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;beans&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;beans&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;beans&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The end.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-1816348846428408899?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/1816348846428408899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=1816348846428408899' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/1816348846428408899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/1816348846428408899'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/06/spring-security-20-different-target.html' title='Spring Security 2.0 : Different target urls for different user roles'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-6489958693109562236</id><published>2008-03-12T05:27:00.000-07:00</published><updated>2008-05-05T04:47:49.556-07:00</updated><title type='text'>Search with Spring Hibernate Lucene and Aspect Oriented Programming in action</title><content type='html'>I've read a lot about AOP and what it's used for. It is useful for logging, tracing, declarative transactions management and even caching. Great ! I'm going to share with you yet another AOP use case. BTW, I found it really interesting. So, the story.&lt;br /&gt;&lt;br /&gt;I have some entity with with field "content"  which is HTML text. The number of entries is large and keep growing. It is natural that I want to find some entry which contain some text. So, I need search. Since text is in HTML format, database full text search is not the best solution possible. I've decided to try &lt;a href="http://lucene.apache.org/java/docs/index.html"&gt;Lucene&lt;/a&gt;. It is                  a "high-performance, full-featured text search engine library". To use Lucene I need to crate an index, add my objects into it and then I will able to query index to get search results.&lt;br /&gt;&lt;br /&gt;Since I'm using Spring, I was looking for Lucene-Spring integration. Bingo ! It is available as one of Spring modules project. This integration has two aspects - one for index management and another for performing actual search. Complete configuration :&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;fsDirectory&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(39, 71, 150);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;org.springmodules.lucene.index.support.FSDirectoryFactoryBean&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;create&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;true&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;location&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;file:///C:/temp/index&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;alias&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;fsDirectory&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;alias&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;indexDirectory&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(39, 71, 150);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;indexFactory&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(39, 71, 150);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;org.springmodules.lucene.index.support.SimpleIndexFactoryBean&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;create&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;true&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;directory&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;           &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;ref&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;bean&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;indexDirectory&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;analyzer&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;org.apache.lucene.analysis.standard.StandardAnalyzer&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;indexAccessor&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(39, 71, 150);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;com.mycoolcompany.app.search.LuceneIndexerService&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;indexFactory&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;ref&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;local&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;indexFactory&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;searcherFactory&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(39, 71, 150);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;org.springmodules.lucene.search.factory.SimpleSearcherFactory&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;directory&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;ref&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;bean&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;indexDirectory&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;searchService&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(39, 71, 150);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;com.mycoolcompany.app.search.LuceneSearchService&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;searcherFactory&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;ref&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;local&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;searcherFactory&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;analyzer&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;org.apache.lucene.analysis.standard.StandardAnalyzer&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I can pre-populate index by querying database and adding objects to index. But what to do when new entry has been added ? How to keep index up to date ? After some Googling I found solution with custom hibernate interceptor. It looks like this :&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; java&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;io&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;Serializable&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;hibernate&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;EmptyInterceptor&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;hibernate&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;Type&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;class&lt;/span&gt; CustomHibernateInterceptor &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;extends&lt;/span&gt; EmptyInterceptor&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;private&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;long&lt;/span&gt; serialVersionUID &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;1214372449390884955&lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;L&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;//injected by spring&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;private&lt;/span&gt; LuceneIndexerService indexAccessor&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; LuceneIndexerService getIndexAccessor&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;return&lt;/span&gt; indexAccessor&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;void&lt;/span&gt; setIndexAccessor&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;LuceneIndexerService indexAccessor&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;this&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;indexAccessor &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; indexAccessor&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;   &lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;boolean&lt;/span&gt; onSave&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Object&lt;/span&gt; entity&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Serializable&lt;/span&gt; id&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Object&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt; state&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;String&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt; propertyNames&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;br /&gt;   Type&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt; types&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;entity &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;instanceof&lt;/span&gt; Entry&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;       &lt;span style="color: rgb(105, 105, 105);"&gt;//adding to index&lt;/span&gt;&lt;br /&gt;       indexAccessor&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;add&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;Entry&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;entity&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;return&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;super&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;onSave&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;entity&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; id&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; state&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; propertyNames&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; types&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Is it something wrong with this solution ? I guess no, it's working. But I have and idea to use AOP here. I guess, adding to index and persisting object to database at the same time is some king of cross-cutting concern. I'm using a Spring-Hibernate DAO for CRUD operations. My idea to resolve this issue is in using aspect. Aspect has a pointcut defined to intercept execution of my dao method addEntry(Entry entry) and "after" advice - this is the place where we can add object to index, after object has been persisted. Please notice that search service is injected into aspect :) All this stuff is very abstract but is pretty interesting to digg. Here is the source code of aspect :&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;@Aspect&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;class&lt;/span&gt; IndexForSearchAspect&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; IndexForSearchAspect&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;super&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;//will be injected&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;private&lt;/span&gt; LuceneIndexerService indexAccessor&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;void&lt;/span&gt; setIndexAccessor&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;LuceneIndexerService indexAccessor&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;this&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;indexAccessor &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; indexAccessor&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;//defining pointcut&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;@&lt;/span&gt;Pointcut&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"execution (* ....dao.BlogEntryDao.addEntry(....model.Entry))"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;void&lt;/span&gt; saveEntryToDB&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;//add object to index after it has been persisted&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;@&lt;/span&gt;After&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"saveEntryToDB()"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;void&lt;/span&gt; addEntryToLuceneIndex&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;JoinPoint joinpoint&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(105, 105, 105);"&gt;//getting argument of dao.addEntry()&lt;/span&gt;&lt;br /&gt; Entry entry &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;Entry&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; joinpoint&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getArgs&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(105, 105, 105);"&gt;// adding to index&lt;/span&gt;&lt;br /&gt; indexAccessor&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;add&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;entry&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Spring configuration for aspect :&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;aop&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;aspectj-autoproxy&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;searchindexAspect&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(39, 71, 150);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;com.mycoolcompany.app.search.IndexForSearchAspect&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(105, 105, 105);"&gt;&amp;lt;!--&lt;/span&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;indexer service will be injected &lt;/span&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;--&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;indexAccessor&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;ref&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;local&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;indexAccessor&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I know, I've missed a lot of details here, so this post is something like show-case, not cookbook :) Any opinions are welcome !&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-6489958693109562236?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/6489958693109562236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=6489958693109562236' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/6489958693109562236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/6489958693109562236'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/03/search-with-spring-hibernate-lucene-and.html' title='Search with Spring Hibernate Lucene and Aspect Oriented Programming in action'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-9087073710805979380</id><published>2008-03-04T01:39:00.000-08:00</published><updated>2008-12-11T20:57:28.571-08:00</updated><title type='text'>Even church using JSF !</title><content type='html'>I had a very interesting blog visitor which came from Google search. I'm not wondering a lot when I have visitors from high-tech companies or financial institutions, but church is something new and unexpected ! So, it is "The Church of Jesus Christ of Latter-day Saints". Take a look at Google Analytics screen :&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_CcxKUpSUr-k/R80dLyO63EI/AAAAAAAAABs/jlbiK9BAYYQ/s1600-h/ga.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_CcxKUpSUr-k/R80dLyO63EI/AAAAAAAAABs/jlbiK9BAYYQ/s320/ga.PNG" alt="" id="BLOGGER_PHOTO_ID_5173823635218684994" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I don't know how JSF is used there, but they looked for &lt;a href="http://ostas.blogspot.com/2007/11/jsf-redirect-to-url-with-param-from.html"&gt;"jsf page redirect params"&lt;/a&gt;&lt;a href="http://ostas.blogspot.com/2007/11/jsf-redirect-to-url-with-param-from.html"&gt;.&lt;/a&gt;&lt;br /&gt;Halleluiah ! :)&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-9087073710805979380?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/9087073710805979380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=9087073710805979380' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/9087073710805979380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/9087073710805979380'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/03/even-church-using-jsf.html' title='Even church using JSF !'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_CcxKUpSUr-k/R80dLyO63EI/AAAAAAAAABs/jlbiK9BAYYQ/s72-c/ga.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-453650015717754854</id><published>2008-02-24T12:41:00.000-08:00</published><updated>2008-02-24T13:34:19.104-08:00</updated><title type='text'>DBUnit Boolean issue</title><content type='html'>&lt;a href="http://www.dbunit.org/"&gt;DBUnit&lt;/a&gt; is a nice procduct. In fact I'm not using it directly. I'm prefer going in declarative way with &lt;a href="http://mojo.codehaus.org/dbunit-maven-plugin/"&gt;dbunit-maven-plugin&lt;/a&gt;. Why declarative way ? Well, all I need to do to populate database before executing JUnit test is to configure maven plugin and we are ready to go. The sweet thing is that data for storing in database is in xml format. XML is not SQL :) I've tested my application without any changes in HSQLDB, MySQL and Oracle without single change in data for testing. I mean no RDBMS specific  SQL here, more to say, no SQL at all. Creation such datafile also is not a problem. DBUnit plugin can create it for you with the help of dbunit:export goal.&lt;br /&gt;&lt;br /&gt;All is seems to be okay whyle you are not trying to persist Boolean value. For the first look, all is going wrong. I've spent a lot of time trying to understand WTF is going on. DBUnit does not insert boolean value, and says that column doesn't exist at all. It is damn fun when I know that column _exacly_ exists. Bug ? Feature ? /dev/hands error ? :)&lt;br /&gt;&lt;br /&gt;As Google reported, I was not alone with this problem. And it is more a feature than a bug. Solution is &lt;a href="http://issues.appfuse.org/browse/APF-101"&gt;here&lt;/a&gt;. So, adding           &lt;datatypefactoryname&gt;${dbunit.hack.Boolean}&lt;/datatypefactoryname&gt;  to plugin's configuration section works ! At HSQLDB profile of my parent pom.xml I have dbunit.hack.Boolean=org.dbunit.ext.hsqldb.HsqldbDataTypeFactory.&lt;br /&gt;&lt;br /&gt;I'm happy, but how many another small bugs/features are in software, which are ready to eat wery easy 1-2-3 hours of our life ?&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-453650015717754854?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/453650015717754854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=453650015717754854' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/453650015717754854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/453650015717754854'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/02/dbunit-boolean-issue.html' title='DBUnit Boolean issue'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-954819527728242255</id><published>2007-12-04T02:17:00.000-08:00</published><updated>2007-12-04T05:59:31.458-08:00</updated><title type='text'>Tracing MyFaces with AspectJ, Tomcat and Maven 2</title><content type='html'>When I started to learn Spring, I faced with AOP. It's new and interesting for me. It's really not easy to understand a new concept and to do some refactoring of my own brain while the most of documentation and books are in English (not my native language). There is not (almost) problem  with English itself, but understanding a new concept is hard.&lt;br /&gt;&lt;br /&gt;AOP is powerfull. Really. Relocating cross-cutting concerns to aspects is nice idea. Since I can intercept the methods executions of my own classes, I became very interested in how to trace any third-party libraries. In fact it's pretty cool to be able to see internals of MyFaces, Hibernate or whatever in action to get a deeper understanding what is going on behind the scene...&lt;br /&gt;&lt;br /&gt;I found a wiki page about &lt;a href="http://wiki.apache.org/myfaces/TracingMyFacesUsingAspectJ"&gt;tracing MyFaces with AspectJ&lt;/a&gt;. Many thanks to &lt;span title="193.243.207.122"&gt;Cagatay Civici for this article, really helpful. It is a starting point for my experiments. I'm using aspect source code from this article.&lt;br /&gt;&lt;br /&gt;My environment is the following : JDK 1.5, Maven 2, Tomcat 5, MyFaces, AspectJ 1.5. &lt;/span&gt;&lt;span title="193.243.207.122"&gt;&lt;br /&gt;&lt;br /&gt;Cagatay restrict his article to &lt;/span&gt;statically compiled AspectJ. But as you'll see later, runtime weaving on JDK 1.5 is not so hard to implement.&lt;br /&gt;&lt;br /&gt;The first issue I came across is how to compile AspectJ aspect with Maven 2. Bingo ! There is a &lt;a href="http://mojo.codehaus.org/aspectj-maven-plugin/usage.html"&gt;Maven plugin&lt;/a&gt;. So, placing some Trace.aj at src\main\java will work.&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;plugin&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.codehaus.mojo&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;aspectj-maven-plugin&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;outxml&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;true&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;outxml&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;executions&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;execution&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goals&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goal&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;compile&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goal&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goal&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;test-compile&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goal&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goals&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;execution&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;executions&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;plugin&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Please note, that outxml=true. It's important since it is flag to "Generate aop.xml file for load-time weaving with default name.(/META-INF/aop.xml)".&lt;br /&gt;&lt;br /&gt;The final part of config is agent setup for Tomcat. &lt;a href="http://www.eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html"&gt;According to docs&lt;/a&gt; it's should be started with one additional JVM argument - javaagent.&lt;br /&gt;&lt;br /&gt;Now we have tracing aspect, can compile it with Maven and know how to start Tomcat with right option. As for me, I like &lt;a href="http://cargo.codehaus.org/Maven2+plugin"&gt;Cargo plugin&lt;/a&gt;. It is useful for integration testing for example, but in this case it is just a very nice Maven 2 plugin to put all together. With this config we can automatically download tomcat 5 distribution, unpack it, run tomcat with our -javaagent option&lt;br /&gt;and deploy war. A lot of work, huh ? :)&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;plugin&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.codehaus.cargo&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;cargo-maven2-plugin&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;container&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;containerId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;tomcat5x&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;containerId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;zipUrlInstaller&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;url&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    http://www.eu.apache.org/dist&lt;br /&gt;    /tomcat/tomcat-5/v5.5.25/bin/apache-tomcat-5.5.25.zip&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;url&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;installDir&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   ${java.io.tmpdir}/donloadedByCargo&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;installDir&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;zipUrlInstaller&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;output&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;       ${project.build.directory}&lt;br /&gt;   /tomcat5x.logs/container.log&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;output&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;append&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;false&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;append&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;log&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;       ${project.build.directory}&lt;br /&gt;     /tomcat5x.logs/cargo.log&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;log&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;container&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;standalone&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;home&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; ${project.build.directory}/tomcat5x&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;home&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;properties&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;cargo.servlet.port&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     8080&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;cargo.servlet.port&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;cargo.jvmargs&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     -javaagent:"${user.home}\.m2\repository&lt;br /&gt;     \aspectj\aspectjweaver\1.5.3\aspectjweaver-1.5.3.jar"&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;cargo.jvmargs&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;cargo.logging&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;high&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;cargo.logging&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;properties&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;deployables&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;deployable&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;com.mycoolcompany.fun&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;MyFacesAspectJ&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;war&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;properties&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;context&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;MyFacesAspectJ&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;context&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;properties&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;deployable&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;deployables&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;plugin&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;As you can see, cargo.jvmargs element contains a path to  &lt;span style="font-family: monospace;"&gt;&lt;/span&gt;aspectjweaver-1.5.3.jar library, in my case it is in my local repository already. After all to see it in action just type "mvn clean package cargo:start" and you are ready to go !&lt;br /&gt;&lt;br /&gt;Trace will be available in the file "C:\trace.out" as defined in aspect source code. Exploring it's contents is another story, I guess.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-954819527728242255?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/954819527728242255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=954819527728242255' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/954819527728242255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/954819527728242255'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/12/tracing-myfaces-with-aspectj-tomcat-and.html' title='Tracing MyFaces with AspectJ, Tomcat and Maven 2'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-6085316133271952770</id><published>2007-11-14T01:26:00.000-08:00</published><updated>2007-11-14T02:22:50.258-08:00</updated><title type='text'>JSF : MyFaces and Sun RI profiles for Maven 2</title><content type='html'>I've used MyFaces as implementation of JSF 1.1 specification. Why ? The main reason is great community and great support for Maven 2 - maven-archetype-myfaces for example, + Tomahawk.&lt;br /&gt;&lt;br /&gt;And now, I'm interested in what is the difference between the two ? Any comments appreciated.&lt;br /&gt;&lt;br /&gt;Maven 2 is my friend here, since I can use profiles - one for JSF RI, another one for MyFaces. I guess it could be useful for someone else, so here is the code :&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;profiles&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;profile&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jsfri&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;activation&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jsf&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;ri&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;activation&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependencies&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;javax.faces&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jsf-api&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;1.1_02&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusions&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;java.servlet.servlet.jsp&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jsp-api&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;javax.servlet&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;servlet-api&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;javax.servlet.jsp&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jsp-api&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;javax.servlet.jsp.jstl&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jstl&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusions&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;javax.faces&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jsf-impl&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;1.1_02&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusions&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;java.servlet.servlet.jsp&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jsp-api&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;javax.servlet&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;servlet-api&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;javax.servlet.jsp&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jsp-api&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;javax.servlet.jsp.jstl&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jstl&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;exclusions&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;javax.servlet&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jstl&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;1.1.0&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependencies&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;repositories&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;repository&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;java.net&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;java.net Maven 1 Repository&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;url&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;br /&gt; &lt;/span&gt;https://maven-repository.dev.java.net/nonav/repository&lt;span style="color: rgb(166, 87, 0);"&gt;&lt;br /&gt; &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;url&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;layout&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;legacy&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;layout&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;repository&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;repositories&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;profile&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;profile&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;myfaces&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;activation&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jsf&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;myfaces&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;activation&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependencies&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.apache.myfaces.core&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;myfaces-api&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;1.1.6-SNAPSHOT&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.apache.myfaces.core&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;myfaces-impl&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;1.1.6-SNAPSHOT&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(105, 105, 105);"&gt;&amp;lt;!--&lt;/span&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;        &amp;lt;dependency&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;            &amp;lt;groupId&gt;org.apache.myfaces.tomahawk&amp;lt;/groupId&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;            &amp;lt;artifactId&gt;tomahawk&amp;lt;/artifactId&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;            &amp;lt;version&gt;1.1.6-SNAPSHOT&amp;lt;/version&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;        &amp;lt;/dependency&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;--&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependencies&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;repositories&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;repository&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;releases&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;enabled&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;false&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;enabled&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;releases&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;snapshots&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;apache-maven-snapshots&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;url&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; http://people.apache.org/repo/m2-snapshot-repository&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;url&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;repository&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;repositories&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;profile&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;profiles&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;To switch between profiles use "mvn -Djsf=ri" or "mvn -Djsf=myfaces".&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-6085316133271952770?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/6085316133271952770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=6085316133271952770' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/6085316133271952770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/6085316133271952770'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/11/jsf-myfaces-and-sun-ri-profiles-for.html' title='JSF : MyFaces and Sun RI profiles for Maven 2'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-4839491470702087821</id><published>2007-11-12T03:45:00.000-08:00</published><updated>2007-11-12T05:17:44.912-08:00</updated><title type='text'>JSF : hacking redirect and request scope managed bean</title><content type='html'>Strting with MyFaces project and Maven 2 is very easy :&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;mvn archetype:create&lt;br /&gt;-DarchetypeGroupId=org.apache.myfaces.maven&lt;br /&gt;-DarchetypeArtifactId=maven-archetype-myfaces&lt;br /&gt;-DarchetypeVersion=1.0-SNAPSHOT&lt;br /&gt;-DgroupId=com.mycoolcompany.web&lt;br /&gt;-DartifactId=jsfRedirect&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;When project is created, you can run web app (jetty is used here) :&lt;br /&gt;&lt;span style="" lang="EN-US"&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;mvn -U -PjettyConfig jetty:run&lt;br /&gt;&lt;/blockquote&gt;Now we have a skeleton of application. Let's try to understand how to deal with redirect.&lt;br /&gt;&lt;br /&gt;Let's check what happens when form is submitted. Current config is&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;navigation-case&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;from-outcome&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;success&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;from-outcome&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;to-view-id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;/page2.jsp&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;to-view-id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;navigation-case&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;First request :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;blockquote&gt;GET /jsfRedirect/helloWorld.jsf HTTP/1.1&lt;br /&gt;Accept: */*&lt;br /&gt;Accept-Language: ru&lt;br /&gt;Accept-Encoding: gzip, deflate&lt;br /&gt;User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.40903)&lt;br /&gt;Host: localhost:8080&lt;br /&gt;Connection: Keep-Alive&lt;br /&gt;Cache-Control: no-cache&lt;br /&gt;Cookie: JSESSIONID=zm2pcktnv9vl&lt;br /&gt;&lt;/blockquote&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Response : &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;blockquote&gt;  HTTP/1.1 200 OK&lt;br /&gt;Content-Type: text/html; charset=ISO-8859-5&lt;br /&gt;Content-Language: ru&lt;br /&gt;Content-Length: 7742&lt;br /&gt;Server: Jetty(6.1.6rc1)&lt;br /&gt;&lt;/blockquote&gt;There is nothing special here.&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Form submit:&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;blockquote&gt;POST /jsfRedirect/helloWorld.jsf HTTP/1.1&lt;br /&gt;Accept: */*&lt;br /&gt;Referer: http://localhost:8080/jsfRedirect/helloWorld.jsf&lt;br /&gt;Accept-Language: ru&lt;br /&gt;Content-Type: application/x-www-form-urlencoded&lt;br /&gt;Accept-Encoding: gzip, deflate&lt;br /&gt;User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.40903)&lt;br /&gt;Host: localhost:8080&lt;br /&gt;Content-Length: 3892&lt;br /&gt;Connection: Keep-Alive&lt;br /&gt;Cache-Control: no-cache&lt;br /&gt;Cookie: JSESSIONID=zm2pcktnv9vl&lt;/blockquote&gt;&lt;span style="" lang="EN-US"&gt;Posted data is the following:&lt;/span&gt;&lt;p class="MsoNormal"&gt;&lt;/p&gt;&lt;blockquote&gt;form:input1    testString&lt;br /&gt;form:button1    press me&lt;br /&gt;autoScroll    0,0&lt;br /&gt;form_SUBMIT    1&lt;br /&gt;form:_idcl&lt;br /&gt;form:_link_hidden_&lt;br /&gt;javax.faces.ViewState  ___very__loong__ &lt;/blockquote&gt;   &lt;p&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;___very__loong__ is really very long string and I don’t want to post it, you can check it by yourself if you want.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;  &lt;/p&gt;As we can see, our submitted value were sent as form:input1 POST parameter. Please notice that at helloWorld.jsp we have assigned id="form" to h:form&lt;h:form&gt; and id="input1" to &lt;h:inputtext&gt;h:inputText.&lt;br /&gt;&lt;br /&gt;I guess org.apache.myfaces.AUTO_SCROLL is responsible for autoScroll param value.&lt;br /&gt;To see it in action take a look &lt;a href="http://www.irian.at/myfaces/autoscroll.jsf"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Responce is:&lt;br /&gt;&lt;br /&gt;&lt;/h:inputtext&gt;&lt;/h:form&gt;&lt;blockquote&gt;HTTP/1.1 200 OK&lt;br /&gt;Content-Language: ru&lt;br /&gt;Content-Type: text/html; charset=ISO-8859-5&lt;br /&gt;Content-Length: 6781&lt;br /&gt;Server: Jetty(6.1.6rc1)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;....&lt;/blockquote&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;And now let’s see what will change when redirect is used.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;navigation-case&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;from-outcome&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;success&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;from-outcome&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;to-view-id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;/page2.jsp&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;to-view-id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;redirect&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;navigation-case&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;In this case form submission looks the same as before,  but response is different, as expected :&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;  &lt;/p&gt;&lt;blockquote&gt;HTTP/1.1 302 Found&lt;br /&gt;Location: http://localhost:8080/jsfRedirect/page2.jsf&lt;br /&gt;Content-Length: 0&lt;br /&gt;Server: Jetty(6.1.6rc1)&lt;br /&gt;&lt;/blockquote&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;"Location" http header means redirect for browser i.e. GET request.&lt;o:p&gt;&lt;/o:p&gt; In this case the value of request scoped managed bean will be lost between requests &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;(POST ant then GET), since HTTP is a stateless protocol.&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;How to avoid data loss ? Ohh.. it is a long story.&lt;o:p&gt;&lt;/o:p&gt; To save data between requests I need to save managed bean in session. I can get access to http session object using faces context:&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;class&lt;/span&gt; HelloWorldBacking &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;String&lt;/span&gt; sendSessionHack&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;FacesContext facesContext &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;br /&gt;    FacesContext&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getCurrentInstance&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;Map session &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;br /&gt;     facesContext&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getExternalContext&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getSessionMap&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;session&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;put&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"myBackingBean"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;this&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;"successSessionHack"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;Ok, but how to get this value back in view ? It is a long story...&lt;br /&gt;&lt;br /&gt;Maybe "there is no one way to do it", but I see only one - PhaseListener.&lt;br /&gt;If you know any other, please give me a sign! Code listed below will act at RESTORE_VIEW phase and then check if there is a session param with name myBackingBean, and finally assign&lt;br /&gt;this value to managed bean via programmatically operations with JSF EL.&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;package&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;apache&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;myfaces&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;blank&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;listener&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; javax&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;faces&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;event&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;PhaseListener&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; javax&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;faces&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;context&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;FacesContext&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; javax&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;faces&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;event&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;PhaseEvent&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; javax&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;faces&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;event&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;PhaseId&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; javax&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;faces&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;FactoryFinder&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; javax&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;faces&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;application&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;Application&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; javax&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;faces&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;application&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;ApplicationFactory&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; javax&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;faces&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;el&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;ValueBinding&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;apache&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;myfaces&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;blank&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;HelloWorldBacking&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; java&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;util&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;Map&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;class&lt;/span&gt; MyPhaseListener &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;implements&lt;/span&gt; PhaseListener&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; PhaseId getPhaseId&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;return&lt;/span&gt; PhaseId&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;RESTORE_VIEW&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;void&lt;/span&gt; beforePhase&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;PhaseEvent e&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;FacesContext facesContext &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;br /&gt;  FacesContext&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getCurrentInstance&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;Map session &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;br /&gt;  facesContext&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getExternalContext&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getSessionMap&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;HelloWorldBacking backingBean &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;HelloWorldBacking&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;session&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;get&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"myBackingBean"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;if&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;backingBean&lt;span style="color: rgb(128, 128, 48);"&gt;!&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;null&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;ApplicationFactory appFactory &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;ApplicationFactory&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; FactoryFinder&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getFactory&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;FactoryFinder&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;APPLICATION_FACTORY&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;Application application &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;br /&gt;appFactory&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getApplication&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;ValueBinding valueBinding &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;br /&gt;application&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;createValueBinding&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"#{helloWorldBacking}"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;valueBinding&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;setValue&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;facesContext&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;backingBean&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;session&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;remove&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"myBackingBean"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;void&lt;/span&gt; afterPhase&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;PhaseEvent e&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(105, 105, 105);"&gt;// don't care  &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Not so trivial, isn't it? :)&lt;br /&gt;BTW, to enable custom phase listener you need to add this snip of code in faces config file, examples-config.xml in our case :&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;lifecycle&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;phase-listener&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;org.apache.myfaces.blank.listener.MyPhaseListener&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;phase-listener&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;lifecycle&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-4839491470702087821?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/4839491470702087821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=4839491470702087821' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4839491470702087821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4839491470702087821'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/11/jsf-hacking-redirect-and-request-scope.html' title='JSF : hacking redirect and request scope managed bean'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-1980130967170804013</id><published>2007-11-01T01:43:00.000-07:00</published><updated>2007-11-01T02:22:27.661-07:00</updated><title type='text'>JSF : Redirect to URL with param from navigation-case</title><content type='html'>I'm evaluating JSF now. I have to admit that some of JSF ideas are pretty nice, but there are many non-intuitive things which make life hard. From another point of view, it is framework, with it's own rules of the game.&lt;br /&gt;&lt;br /&gt;From my little experience I could say that JSF doesn't like the way of passing params via GET. Of course it is possible, but I couldn't say it is trivial and easy as in Struts for example. So, here is some technical stuff.&lt;br /&gt;&lt;br /&gt;I need to to redirect from navigation-case to URL with param which is a property of a managed bean. It looks like this :&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;navigation-rule&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;from-view-id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;/add.jsp&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;from-view-id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;navigation-case&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;from-outcome&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;added&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;from-outcome&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;to-view-id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;/view.jsf?myParam=#{myManagedBean.id}&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;to-view-id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;redirect&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;navigation-case&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;navigation-rule&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;I've tried to figure out how to do it, but had no success here. In fact I found solution, but it's more something like a hack than solution.&lt;br /&gt;So, I've asked MyFaces mailing list. Many thanks to all the people who answered me.&lt;br /&gt;&lt;br /&gt;To keep the story short, &lt;a href="http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/urlParamNav/"&gt;here is solution.&lt;/a&gt; Custom view and navigation handlers should be added to use managed bean property as url param in navigation-case.&lt;br /&gt;&lt;br /&gt;I think to myself... should I use core JSF or switch to Apache Orchestra, or JBoss Seam to make development with JSF less painful ? JSF is still young, 1.2 is the latest version of specification and frameworks that use JSF has many additional functionality. Who knows ?&lt;br /&gt;&lt;span id="_user_mario@ops.co.at" style="color: rgb(121, 6, 25);"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-1980130967170804013?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/1980130967170804013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=1980130967170804013' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/1980130967170804013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/1980130967170804013'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/11/jsf-redirect-to-url-with-param-from.html' title='JSF : Redirect to URL with param from navigation-case'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-7155032802207925737</id><published>2007-09-21T07:09:00.000-07:00</published><updated>2007-09-21T07:35:09.187-07:00</updated><title type='text'>static final String[] is not final ?</title><content type='html'>Lets take final variable  and try to assign new value  to it.  Well , we 'll have no luck here - "cannot assign a value to final variable myVar" yet at compilation stage.  But  having a deal with  final arrays  is something different.  Here is an example :&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;class&lt;/span&gt; FinalArray&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;String&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt; array &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"a"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;"b"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"c"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;void&lt;/span&gt; main&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;String&lt;/span&gt; args&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;     array&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;"aaa"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;System&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;out&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;println&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;array&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Output will be "aaa". It is still not possible to do something like&lt;br /&gt;&lt;br /&gt;String[] some_array = {"aaa", "bbb","ccc"};&lt;br /&gt;array = some_array;&lt;br /&gt;&lt;br /&gt;but possible per-element assigning new values to final array elements:&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;class&lt;/span&gt; FinalArray&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;String&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt; array &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"a"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;"b"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"c"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;void&lt;/span&gt; main&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;String&lt;/span&gt; args&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;String&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt; some_array &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"aaa"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;"bbb"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"ccc"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;for&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119);"&gt;int&lt;/span&gt; i&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;i&lt;array&gt;&amp;lt;length&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;i&lt;span style="color: rgb(128, 128, 48);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;          array&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;i&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; some_array&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;i&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;      &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;for&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;String&lt;/span&gt; element&lt;span style="color: rgb(128, 128, 48);"&gt;:&lt;/span&gt; array&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;          &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;System&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;out&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;println&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;element&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/array&gt;&lt;/pre&gt;So, it is final, you say ?&lt;br /&gt;&lt;hints id="hah_hints"&gt;&lt;/hints&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-7155032802207925737?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/7155032802207925737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=7155032802207925737' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7155032802207925737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7155032802207925737'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/09/static-final-string-is-not-final.html' title='static final String[] is not final ?'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-7162150967993400986</id><published>2007-08-30T02:57:00.000-07:00</published><updated>2007-08-30T04:16:45.654-07:00</updated><title type='text'>User driven startups community</title><content type='html'>Startups is everywhere. YouTube, MySpace, Skype and a lot of other very famous names. The number of new startups increase quickly, but only 1 of maybe hundreds or even thousands will be on top. But which of them ? Nobody knows. Friendly speaking I'm still don't understand why MySpace is so popular. One thing which I get form MySpace on regular basis is a spam - friend requests.   Something like "Take a look at my nude pics at this site. MySpace don't allow to post it here." Damn !&lt;br /&gt;&lt;br /&gt;Closer to name of post :) I've found this site quite interesting - &lt;a href="http://www.killerstartups.com"&gt;http://www.killerstartups.com                     &lt;/a&gt; &lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;                  &lt;div&gt;                     &lt;p class="contendio" align="justify"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;strong&gt;KillerStartups.com&lt;/strong&gt; is a user driven internet startups community. Entrepreneurs, investors, and bloggers are staying informed on up-and-coming internet startups using our blog platform, where internet entrepreneurs submit their startup to see what others think about it.&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;                   &lt;/div&gt;Nice idea.&lt;br /&gt;&lt;br /&gt;I have some startup ideas but no prototype yet. Even I'll have a prototype, to find a venture capitalist or some kind of investor can be impossible at the place where i leave - Sumy, Ukraine. So, everything I can do for now is to read what other people are doing.&lt;br /&gt;&lt;br /&gt;BTW, what about startups in Java world ? I mean something done in Java ? Only PHP+MySQL ? :) Hmm.. wait a minute...  JSESSIONID cookie at FeedBurner. Maybe I'm wrong but JSESSIONID is part of servlet spec and web applications should not mess with it.  Do you know any others ?&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-7162150967993400986?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/7162150967993400986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=7162150967993400986' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7162150967993400986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7162150967993400986'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/08/user-driven-startups-community.html' title='User driven startups community'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-1977764433580239222</id><published>2007-08-27T07:31:00.000-07:00</published><updated>2007-08-27T07:50:53.077-07:00</updated><title type='text'>Maven: The Definitive Guide (1.0 Alpha 2)</title><content type='html'>It seems to be that &lt;a href="http://www.sonatype.com/book/"&gt;this is very nice book about Maven 2&lt;/a&gt;. Maybe it can help me to understand Maven 2 concepts even better. I'd found link to this book at this &lt;a href="http://tapestryjava.blogspot.com/2007/08/maven-love-to-hate-or-hate-to-love.html"&gt;blog&lt;/a&gt;. I'm agree with author, Maven 2 is a really painful sometimes. Ant and Maven concepts are very different and a lot of time is needed to switch between them.&lt;br /&gt;&lt;hints id="hah_hints"&gt;&lt;/hints&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-1977764433580239222?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/1977764433580239222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=1977764433580239222' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/1977764433580239222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/1977764433580239222'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/08/maven-definitive-guide-10-alpha-2.html' title='Maven: The Definitive Guide (1.0 Alpha 2)'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-6740898278631318332</id><published>2007-08-10T01:26:00.000-07:00</published><updated>2007-08-10T01:52:49.951-07:00</updated><title type='text'>Brainbench Java exam - passed</title><content type='html'>Yesterday I have passed Brainbench exam, Java 2 Fundamentals. Exam details:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Test: Java 2 Fundamentals&lt;br /&gt;Date: 09-Aug-2007&lt;br /&gt;Score: 3.88&lt;br /&gt;Weights: 100% Java 2 Fundamentals&lt;br /&gt;Elapsed time: 68 min 39 sec&lt;br /&gt;Percentile:Scored higher than 84% of previous examinees&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;There were 40 questions, 3 minute per question. My transcript is &lt;a href="http://www.brainbench.com/transcript.jsp?pid=4973851"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Friendly speaking, I'm not satisfied with my score. But I've got it without any preparation, just for fun. It is my first certification, by the way. I'm going to pass another exam at brainbench on J2EE 1.4. It is free now. Why not ?&lt;br /&gt;&lt;br /&gt;I have no idea about authority of Brainbench certification. If you have any information, comments are highly welcome.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-6740898278631318332?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/6740898278631318332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=6740898278631318332' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/6740898278631318332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/6740898278631318332'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/08/brainbench-java-exam-passed.html' title='Brainbench Java exam - passed'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-6284732093791687230</id><published>2007-07-26T03:27:00.000-07:00</published><updated>2007-07-26T06:24:16.120-07:00</updated><title type='text'>Declarative transaction management with Spring 2 and AspectJ</title><content type='html'>I'm playing with Hibernate, Spring 2 and AOP. Configuring this stuff were some kind of challenge for me. But now it woks. I faced wery interesting exeption during configuration. Since I'm using Maven 2, Spring + Hibernate dependency looks like this:&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.springframework&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;spring-hibernate3&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;2.0.5&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Exception is looks like this :&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:&lt;br /&gt;Line 63 in XML document from class path resource [applicationContext.xml] is invalid;&lt;br /&gt;nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c:&lt;br /&gt;The matching wildcard is strict, but no declaration can be found for element 'aop:config'.&lt;br /&gt;Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c:&lt;br /&gt;The matching wildcard is strict, but no declaration can be found for element 'aop:config'.&lt;/blockquote&gt;Strange ! I have appropriate configuration for namespaces at my applicationContext.xml :&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;beans&lt;/span&gt; &lt;span style="color: rgb(102, 102, 22);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.springframework.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/schema/beans&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(102, 102, 22);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;xsi&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.w3.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/2001/XMLSchema-instance&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(102, 102, 22);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;aop&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.springframework.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/schema/aop&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(102, 102, 22);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;tx&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.springframework.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/schema/tx&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(102, 102, 22);"&gt;xsi&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;schemaLocation&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.springframework.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/schema/beans&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.springframework.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/schema/beans/spring-beans-2.0.xsd&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.springframework.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/schema/tx&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.springframework.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/schema/tx/spring-tx-2.0.xsd&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.springframework.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/schema/aop&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.springframework.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/schema/aop/spring-aop-2.0.xsd&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Config :&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;aop&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;config&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;aop&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;advisor&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;serviceTxAdvisor&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(39, 71, 150);"&gt;pointcut&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;execution(public *&lt;br /&gt; com.company.service.impl.ServiceImpl.*(..))&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(39, 71, 150);"&gt;advice-ref&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;txAdviceForService&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;aop&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;config&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;tx&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;advice&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;txAdviceForService&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;&lt;br /&gt;            transaction-manager&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;transactionManager&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;tx&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;attributes&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;tx&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;method&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;get*&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;read-only&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;true&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;tx&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;method&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;tx&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;attributes&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;tx&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;advice&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://forum.springframework.org/showthread.php?p=132182"&gt;Solution suggested at Spring forum&lt;/a&gt; doesn't work for me. I had no success with Xerces. So, I decided to digg a little more. As a result I've found two missing dependencies that should make me happy:&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.springframework&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;spring-aop&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;2.0.5&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.springframework&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;spring-aspects&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;2.0.5&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Weird exception vanished. I'm very happy now.&lt;br /&gt;&lt;br /&gt;BTW, even you use &lt;artifactid&gt;spring&lt;/artifactid&gt; dependency, you should add spring-aspects dependency as well to be able to use aop:config.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-6284732093791687230?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/6284732093791687230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=6284732093791687230' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/6284732093791687230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/6284732093791687230'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/07/declarative-transaction-management-with.html' title='Declarative transaction management with Spring 2 and AspectJ'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-5363299243052475719</id><published>2007-07-19T09:28:00.000-07:00</published><updated>2007-07-19T09:46:24.183-07:00</updated><title type='text'>Java developers for US Army</title><content type='html'>It seems to be that  US army really using  Java. At least they are recruting Java programmers. Take a look &lt;a href="http://jobview.monster.com/getjob.asp?JobID=59906207&amp;JobTitle=Java+developer+for+US+Army+Army+Recruiting+Command+in+Ft.+Knox%2c+KY&amp;amp;q=Java+US+Army&amp;brd=1&amp;amp;cy=US&amp;vw=b&amp;amp;AVSDM=2007-07-11+11%3a30%3a00&amp;pg=1&amp;amp;seq=1"&gt;here&lt;/a&gt;.&lt;span id="TrackingJobBody" name="TrackingJobBody"&gt;&lt;/span&gt;&lt;span id="TrackingJobBody" name="TrackingJobBody"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span id="TrackingJobBody" name="TrackingJobBody"&gt;Minimum requirements:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span id="TrackingJobBody" name="TrackingJobBody"&gt;* Java, J2EE - at least 2-3 years&lt;br /&gt;* Struts framework - at least 1 year&lt;br /&gt;* Oracle, Sybase, DB2 or any other major database - at least 2 years&lt;br /&gt;* XML - 1-2 years&lt;br /&gt;* UML - at least general understanding&lt;br /&gt;* Documentum - nice to have, no mandatory&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Well, Struts +1 !&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-5363299243052475719?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/5363299243052475719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=5363299243052475719' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/5363299243052475719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/5363299243052475719'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/07/java-developers-for-us-army.html' title='Java developers for US Army'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-8583958114315200226</id><published>2007-07-19T01:40:00.000-07:00</published><updated>2008-12-11T20:57:28.899-08:00</updated><title type='text'>Military visitors ...</title><content type='html'>I haven't many visitors at my blog. But all of them are very interesting for me. Nevertheless, there are some that I couldn't expect to see. They are military. The most exciting is Pentagon. Here is screen shot of Google Analytics :&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_CcxKUpSUr-k/Rp8pkmj8MEI/AAAAAAAAAA0/3dZ8pghRMq8/s1600-h/pentagon.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_CcxKUpSUr-k/Rp8pkmj8MEI/AAAAAAAAAA0/3dZ8pghRMq8/s320/pentagon.PNG" alt="" id="BLOGGER_PHOTO_ID_5088831812755271746" border="0" /&gt;&lt;/a&gt;After some digging I have found others and here is complete list:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.monmouth.army.mil/CELCMC/"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;usaisc&lt;/span&gt;-&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;cecom&lt;/span&gt;&lt;/a&gt; : "The mission of the US Army Communications-Electronics Command (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;CECOM&lt;/span&gt;) is to develop, acquire and sustain superior information technologies and integrated systems, enabling &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;battlespace&lt;/span&gt; dominance for America's &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;warfighters&lt;/span&gt;."&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The Pentagon&lt;/li&gt;&lt;li&gt;Office of the Chief of Naval Research&lt;/li&gt;&lt;li&gt;Headquarters, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;USAAISC&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;I'm for peace :) Anyway, thanks for visit. It's still unclear for me what they attempt to find here. I'm not sure, but as far as I know, open source software is used in US army. Who knows :)&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-8583958114315200226?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/8583958114315200226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=8583958114315200226' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/8583958114315200226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/8583958114315200226'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/07/military-visitors.html' title='Military visitors ...'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_CcxKUpSUr-k/Rp8pkmj8MEI/AAAAAAAAAA0/3dZ8pghRMq8/s72-c/pentagon.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-2724123039085886019</id><published>2007-07-10T06:16:00.000-07:00</published><updated>2008-10-07T14:09:50.056-07:00</updated><title type='text'>Build EJB3 with jBoss and Maven 2 - better solution</title><content type='html'>I'm working on project which is not in touch with EJB3, but Maven 2 is is used intensively. I remember my post about building &lt;a href="http://ostas.blogspot.com/2007/03/build-ejb3-with-maven-2.html"&gt;EJB3 with jBoss and Maven 2.&lt;/a&gt; In fact that solution works, but I'm not satisfied with it. Since I'm became a little bit stronger in Maven 2 I decided to improve that solution.&lt;br /&gt;&lt;br /&gt;So, the task is to build EJB3 entity and EJB3 session bean with Maven 2 and jBoss dependent jars. First, we setting up non another repository where Maven can find jboss jars :&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;repositories&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;repository&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jboss-maven2&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;url&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;http://repository.jboss.com/maven2&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;url&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;repository&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;repositories&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;A little bit of magic should be added  :)&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;parent&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                             &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jboss&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;           &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jboss-parent&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;2&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;               &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;parent&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And finally, dependencies. JPA :&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                                  &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jboss&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                    &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jboss-persistence-api&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;3.0.0-SNAPSHOT&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;           &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;EJB3 :&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                          &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jboss&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;            &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jboss-ejb-api&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;4.2.0.GA&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;         &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;That is all ! Complete pom.xml looks like this :&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;project&lt;/span&gt; &lt;span style="color: rgb(102, 102, 22);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;maven.apache.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/POM/4.0.0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;xsi&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.w3.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/2001/XMLSchema-instance&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;xsi&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;schemaLocation&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;maven.apache.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/POM/4.0.0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt; &lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;maven.apache.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/maven-v4_0_0.xsd&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;modelVersion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;4.0.0&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;modelVersion&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;com.mycompany.beans&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;SimpleEJB3&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;packaging&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jar&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;packaging&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;1.0-SNAPSHOT&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;SimpleEJB3&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;url&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;http://maven.apache.org&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;url&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;parent&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jboss&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jboss-parent&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;2&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;parent&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;repositories&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;repository&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jboss-maven2&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;url&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;http://repository.jboss.com/maven2&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;url&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;repository&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;repositories&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependencies&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;junit&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;junit&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;3.8.1&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;scope&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;test&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;scope&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jboss&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jboss-persistence-api&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;3.0.0-SNAPSHOT&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jboss&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jboss-ejb-api&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;4.2.0.GA&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependencies&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;project&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;If there is something wrong with this solution, or maybe you have some improvement, give me a sign.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;UPD&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Complete example with source code is here : &lt;a href="http://code.google.com/p/ostas-blog-src/"&gt;http://code.google.com/p/ostas-blog-src/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-2724123039085886019?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/2724123039085886019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=2724123039085886019' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/2724123039085886019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/2724123039085886019'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/07/build-ejb3-with-jboss-and-maven-2.html' title='Build EJB3 with jBoss and Maven 2 - better solution'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-2215081087179378978</id><published>2007-06-28T09:17:00.000-07:00</published><updated>2007-06-28T11:51:58.139-07:00</updated><title type='text'>Maven 2 war plugin &amp; docs</title><content type='html'>Maven 2 is really nice thing, but  in some cases it is hard to understand new concepts.  But there is not  one problem.&lt;br /&gt;&lt;br /&gt;So, the issue. I need to add some &lt;hints id="hah_hints"&gt;&lt;/hints&gt; resource to final war file and it should be filtered. It is real world situation when you have to deal with applicationContext.xml one for unit testing another one for webapp. How to do the trick ? In Ant it is trivial :) In Maven we can use ant plugin, but using &lt;a href="http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html"&gt;war plugin&lt;/a&gt; is a better solution. So, the &lt;a href="http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html"&gt;docs&lt;/a&gt;.&lt;br /&gt;They use version 2.0 in examples. Ok.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;webResources is a list of resources. All options of resource is supported. &lt;br /&gt;A web resource     &lt;br /&gt;* can have inclusion/exclusion    &lt;br /&gt;* can be filtered    &lt;br /&gt;* is not limited to the default destination - the root of the war.&lt;br /&gt;&lt;/blockquote&gt;Great ! Setting targetPath to WEB-INF should solve the problem. But it doesn't ! All is done according to docs, I see this plugin for the first time in my life... My filtered xml file copied but to the root of war.&lt;br /&gt;&lt;br /&gt;After some time I realized that it's a bug in plugin. No hints in docs about it :( I have found solution &lt;a href="http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-war-plugin/2.0.2/"&gt;here&lt;/a&gt;. There is no such problem in 2.0.2 version.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-2215081087179378978?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/2215081087179378978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=2215081087179378978' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/2215081087179378978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/2215081087179378978'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/06/maven-2-war-plugin-docs.html' title='Maven 2 war plugin &amp; docs'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-8303095121113695274</id><published>2007-05-23T11:12:00.000-07:00</published><updated>2007-05-31T06:18:38.335-07:00</updated><title type='text'>Weird Integer</title><content type='html'>Take a look at this simple class :&lt;br /&gt;&lt;div style="overflow: auto;"&gt; &lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;class&lt;/span&gt; Werid&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;void&lt;/span&gt; main&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;String&lt;/span&gt; args&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Integer&lt;/span&gt; j1 &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;127&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Integer&lt;/span&gt; j2 &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;127&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;System&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;out&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;println&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;j1&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;j2&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt; &lt;span style="color: rgb(105, 105, 105);"&gt;// true&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Integer&lt;/span&gt; k1 &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;128&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Integer&lt;/span&gt; k2 &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;128&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;System&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;out&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;println&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;k1&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;k2&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt; &lt;span style="color: rgb(105, 105, 105);"&gt;// false    &lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt; &lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;How do you think, is it all OK here ? :) There is _something_ in this class.  I've noticed that for the numbers less than 128 operator == returns true.&lt;br /&gt;Why ?..&lt;br /&gt;&lt;br /&gt;Lets see... When we run our Werid class with -verbose option we'll get sometting like this :&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;C:\&gt;java -verbose &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Werid&lt;/span&gt;&lt;br /&gt;.......&lt;br /&gt;.......&lt;br /&gt;[Loaded &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Werid&lt;/span&gt; from file:/C:/]&lt;br /&gt;[Loaded java.lang.Integer$IntegerCache from shared objects file]&lt;br /&gt;true&lt;br /&gt;true&lt;br /&gt;false&lt;br /&gt;false&lt;br /&gt;.......&lt;br /&gt;.......&lt;br /&gt;&lt;/blockquote&gt;OK. What we have at java.lang.Integer$IntegerCache ? Cache of Integers is something interesting already. Lets go to sources :&lt;br /&gt;&lt;div style="overflow: auto;"&gt; &lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;private&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;class&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;IntegerCache&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;private&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;IntegerCache&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Integer&lt;/span&gt; cache&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;&lt;br /&gt;      new&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Integer&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;128&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;+&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;127&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;+&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;for&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119);"&gt;int&lt;/span&gt; i &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt; i &lt;span style="color: rgb(128, 128, 48);"&gt;&lt;&lt;/span&gt; cache&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;length&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt; i&lt;span style="color: rgb(128, 128, 48);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;  cache&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;i&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;new&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Integer&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;i &lt;span style="color: rgb(128, 128, 48);"&gt;-&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;128&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt; &lt;/pre&gt;&lt;/div&gt;Great, it really cache. It is used only in one method:&lt;br /&gt;&lt;div style="overflow: auto;"&gt; &lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(63, 95, 191);"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;*&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt; Returns a &lt;/span&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;&lt;tt&gt;&lt;/tt&gt;&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt;&lt;tt&gt;Integer&lt;/tt&gt;&lt;/span&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt; instance representing the&lt;br /&gt;specified&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt; &lt;/span&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;&lt;tt&gt;&lt;/tt&gt;&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt;&lt;tt&gt;int&lt;/tt&gt;&lt;/span&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt; value.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;*&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt; If a new &lt;/span&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;&lt;tt&gt;&lt;/tt&gt;&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt;&lt;tt&gt;Integer&lt;/tt&gt;&lt;/span&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt; instance is not required&lt;/span&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;,&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt; this method&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;*&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt; should generally be used in preference to&lt;br /&gt;the constructor&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;*&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt; {&lt;/span&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;@&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt;link &lt;/span&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;#&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt;Integer(int)}&lt;/span&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;,&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt; as this method is likely&lt;br /&gt;to yield&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;*&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt; significantly better space and time performance&lt;br /&gt;by caching&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;*&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt; frequently requested values.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;*&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;*&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt; &lt;/span&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;@&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;param&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt;  i an &lt;/span&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;&lt;code&gt;&lt;/code&gt;&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt;int&lt;/span&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt; value.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;*&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt; &lt;/span&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;@return&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt; a &lt;/span&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;&lt;tt&gt;&lt;/tt&gt;&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt;&lt;tt&gt;Integer&lt;/tt&gt;&lt;/span&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt; instance representing &lt;/span&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;&lt;br /&gt;&lt;tt&gt;&lt;/tt&gt;&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt;&lt;tt&gt;i&lt;/tt&gt;&lt;/span&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;*&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt; &lt;/span&gt;&lt;span style="color: rgb(127, 159, 191); font-weight: bold;"&gt;@since&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;1.5&lt;/span&gt;&lt;span style="color: rgb(63, 95, 191);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(63, 95, 191);"&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; Integer valueOf(int i) &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;int&lt;/span&gt; offset &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;128&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;i &lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;128&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;&amp;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;&lt;/span&gt; i &lt;span style="color: rgb(128, 128, 48);"&gt;&lt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;127&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt; &lt;span style="color: rgb(105, 105, 105);"&gt;// must cache &lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;return&lt;/span&gt; IntegerCache&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;cache&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;i &lt;span style="color: rgb(128, 128, 48);"&gt;+&lt;/span&gt; offset&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;return&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;new&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Integer&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;i&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt; &lt;/pre&gt;&lt;/div&gt;Ahaa :)  &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;i &lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;128&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;&amp;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;&lt;/span&gt; i &lt;span style="color: rgb(128, 128, 48);"&gt;&lt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;127&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;).&lt;br /&gt;&lt;/span&gt;Things become more clear now.&lt;span style="color: rgb(128, 128, 48);"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-8303095121113695274?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/8303095121113695274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=8303095121113695274' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/8303095121113695274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/8303095121113695274'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/05/werid-integer.html' title='Weird Integer'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-6966441571207936035</id><published>2007-05-22T14:25:00.000-07:00</published><updated>2007-05-22T14:44:58.995-07:00</updated><title type='text'>New atricle about JSF at Theserverside</title><content type='html'>&lt;a href="http://www.theserverside.com/tt/articles/article.tss?l=RethinkingJSF&amp;asrc=EM_NLN_1470268&amp;amp;uid=3048571"&gt;Here it is.&lt;/a&gt; I'm agree with author, 100%. Lack of cool third party components is not good at all. I think to myself "Is there some commercial &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;JSF&lt;/span&gt; stuff ?". Opensource is even better :)&lt;br /&gt;&lt;br /&gt;Dear readers, if you know some  interesting products, please give me a sign. I saw a few in ASP.NET (AJAX data grids and so on), it will be very interesting to compare.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-6966441571207936035?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/6966441571207936035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=6966441571207936035' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/6966441571207936035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/6966441571207936035'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/05/new-atricle-about-jsf-at-theserverside.html' title='New atricle about JSF at Theserverside'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-3136589265310242556</id><published>2007-05-11T02:04:00.000-07:00</published><updated>2007-05-11T03:02:31.050-07:00</updated><title type='text'>Wikipedia internals</title><content type='html'>I've noticed that my post about &lt;a href="http://ostas.blogspot.com/2006/12/ebay-internals.html"&gt;eBay internals&lt;/a&gt; was very popular. So, here is another one post about big and complex system - Wikipedia. &lt;a href="http://dammit.lt/uc/workbook2007.pdf"&gt;It is presentation&lt;/a&gt; on MySQL Conference &amp;amp; Expo. LAMP environment under heavy load... They are using Apache Lucene for Search. But what they say about Java:&lt;br /&gt;&lt;blockquote&gt;Due to licensing issues Wikipedia did not run Java Virtual Machine from Sun Microsystems (non-free software is not matching free content ideals), so alternatives were chosen - at first GCJ-based solution, afterwards .net Lucene port was used on top of Mono .NET framework.&lt;/blockquote&gt;Interesting point of view... *nix implementation of .NET framework (sponsored by... not Microsof but Novell) with port of well-known solution is better than using "native" Java with JVM.&lt;br /&gt;&lt;br /&gt;Another hint is :&lt;br /&gt;&lt;blockquote&gt;The major components for search are:&lt;br /&gt;.....&lt;br /&gt;....&lt;br /&gt;Mono (or GCJ.. or JVM... depends on mood - we have support for all).&lt;br /&gt;&lt;/blockquote&gt;Depends on mood is great ! :) It is still not clear for me what actually they use. But is not a problem, I like wikipedia and using it all the time. If some solution works - let it be so.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Another question is why Lucene ? Why not &lt;a href="http://swish-e.org/"&gt;Swish-e&lt;/a&gt; for example ? It is nice product, Apache folks using it at http://search.apache.org.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-3136589265310242556?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/3136589265310242556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=3136589265310242556' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/3136589265310242556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/3136589265310242556'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/05/wikipedia-internals.html' title='Wikipedia internals'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-870292970589390633</id><published>2007-05-05T14:54:00.000-07:00</published><updated>2007-05-05T15:46:59.622-07:00</updated><title type='text'>Songs about Java EE 5 and Code Monkey</title><content type='html'>Googling for something &lt;span id="r_text" name="r_text"&gt;not always bring expected results, but other results can appear not less interesting. I have decided to find a song fragment which sounds in &lt;a href="http://javaposse.com"&gt;Javaposse&lt;/a&gt; podcast. As a result I've come across 2 other songs. First one is about &lt;a href="http://blogs.sun.com/roumen/entry/new_song_java_ee_5"&gt;Java EE 5&lt;/a&gt;&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Another one is about code monkey... not so fun as first, more sad I should say :&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Code Monkey get up get coffee.&lt;br /&gt;Code Monkey go to job.&lt;br /&gt;Code Monkey have boring meeting&lt;br /&gt;with boring manager Rob.&lt;br /&gt;&lt;br /&gt;Rob say Code Monkey very dilligent&lt;br /&gt;but his output stink.&lt;br /&gt;His code not functional or ellegant&lt;br /&gt;what do Code Monkey think?&lt;br /&gt;&lt;br /&gt;Code Monkey think maybe manager wanna write god damn login page himself.&lt;br /&gt;Code Monkey not say it outloud.&lt;br /&gt;Code Monkey not crazy, just proud.&lt;/blockquote&gt;It is from &lt;a href="http://www.jonathancoulton.com/2006/04/14/thing-a-week-29-code-monkey/"&gt;here.&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.jonathancoulton.com/music/thingaweek/CodeMonkey.mp3"&gt;MP3&lt;/a&gt; , &lt;a href="http://codemilitia.com/blogs/tobin.titus/archive/2006/04/28/472.aspx"&gt;Lyrics&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Enjoy :)&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-870292970589390633?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/870292970589390633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=870292970589390633' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/870292970589390633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/870292970589390633'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/05/songs-about-java-ee-5-and-code-monkey.html' title='Songs about Java EE 5 and Code Monkey'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-2103455232058573111</id><published>2007-04-23T02:06:00.000-07:00</published><updated>2007-04-23T02:47:23.014-07:00</updated><title type='text'>Solaris DVDs for free !</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Finally ! My Solaris DVDs arrived. I requested two Solaris distributions : open Solaris starter kit and Free Solaris 10 Media Kit (Solaris 10 11/6 and developer tools). It’s taken a lot of time from requesting to arrival. But.. it's interesting that "Media Kit" arrived faster from &lt;/span&gt;&lt;st1:city&gt;&lt;st1:place&gt;&lt;span style="" lang="EN-US"&gt;San Jose&lt;/span&gt;&lt;/st1:place&gt;&lt;/st1:City&gt;&lt;span style="" lang="EN-US"&gt; than "starter kit" from &lt;/span&gt;&lt;st1:country-region&gt;&lt;st1:place&gt;&lt;span style="" lang="EN-US"&gt;Sweden&lt;/span&gt;&lt;/st1:place&gt;&lt;/st1:country-region&gt;&lt;span style="" lang="EN-US"&gt; if I'm not missing something. Friendly speaking I’m almost forgot about this story at all... but it is &lt;span name="r_text" id="r_text"&gt;doubly&lt;/span&gt; &lt;span name="r_text" id="r_text"&gt;pleasantly &lt;/span&gt;to receive them now. So, I'm &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Solarised&lt;/span&gt; up to 100% :) Thanks to Sun &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Microsystems&lt;/span&gt;,  it is really nice move. Not all the people can download 4GB distribution just to see what Solaris is. I will share DVDs in the university with some students and co-workers.&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;span style="" lang="EN-US"&gt;I’m planning to install Solaris at my second &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;hdd&lt;/span&gt;, but not earlier than&lt;/span&gt; I backup useful information :) Starter kit has 3 distributions on Live DVD, but real system is rather more interesting. I saw &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;Nexenta&lt;/span&gt; almost a year ago, so I can evaluate it is evolution. Nice idea – Debian system with &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;openSolaris&lt;/span&gt; kernel.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-2103455232058573111?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/2103455232058573111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=2103455232058573111' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/2103455232058573111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/2103455232058573111'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/04/solaris-dvds-for-free.html' title='Solaris DVDs for free !'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-3050221289914171579</id><published>2007-04-20T06:12:00.000-07:00</published><updated>2007-04-22T01:19:25.094-07:00</updated><title type='text'>Random strings and removing duplicates</title><content type='html'>Sometimes I need a large database with non-real data for playing. In fact it is not just playing, but testing database layer in real world comparable environment. Recently I came across with a problem : I heed a lot of unique random strings with random length. Here is the result of my work. I'm using Set to remove duplicates. According to &lt;a href="http://java.sun.com/docs/books/tutorial/collections/interfaces/set.html"&gt;docs&lt;/a&gt; HashSet is the fastest implementation of Set Interface. It is not guarantees the order of iteration, but in my case it is not an issue. By the way, you can compare this Java code with another one - in &lt;a href="http://ostas.blogspot.com/2006/12/python-generate-random-strings.html"&gt;Python&lt;/a&gt;. See the difference ? :) Dont beat me if my solution is not very original... it is works for me. Can it be done better ? Any suggesions are welcome.&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; java&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;util&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;Random&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; java&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;util&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;Set&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; java&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;util&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;HashSet&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;class&lt;/span&gt; RandomStringRandomLength&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;private&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;String&lt;/span&gt; alphabet&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"a"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"b"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"c"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"d"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"e"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"f"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;void&lt;/span&gt; main&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;String&lt;/span&gt; args&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;if&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;args&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;length&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;System&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;exit&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(187, 121, 119);"&gt;int&lt;/span&gt; numberOfRandomStrings &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(187, 121, 119);"&gt;int&lt;/span&gt; minLength &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(187, 121, 119);"&gt;int&lt;/span&gt; maxLength &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;try&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;  minLength &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;new&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Integer&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;args&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  maxLength &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;new&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Integer&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;args&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;      numberOfRandomStrings &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;new&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Integer&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;args&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;catch&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;NumberFormatException&lt;/span&gt; NumEx&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;System&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;out&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;println&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"Enter a numbers !"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  Set&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;String&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt; set &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;new&lt;/span&gt; HashSet&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;String&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Random&lt;/span&gt; random &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;new&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Random&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(187, 121, 119);"&gt;int&lt;/span&gt; rndStringLength &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(187, 121, 119);"&gt;int&lt;/span&gt; rndIndex &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;StringBuffer&lt;/span&gt; rndString &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;null&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;for&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119);"&gt;int&lt;/span&gt; i&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;i&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;numberOfRandomStrings&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;i&lt;span style="color: rgb(128, 128, 48);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;  rndStringLength &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; minLength &lt;span style="color: rgb(128, 128, 48);"&gt;+&lt;/span&gt;&lt;br /&gt;      random&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;nextInt&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;maxLength&lt;span style="color: rgb(128, 128, 48);"&gt;-&lt;/span&gt;minLength&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  rndString &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;new&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;StringBuffer&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;for&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119);"&gt;int&lt;/span&gt; j&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;j&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;rndStringLength&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;j&lt;span style="color: rgb(128, 128, 48);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;      rndIndex &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; random&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;nextInt&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;alphabet&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;length&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;      rndString&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;append&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;alphabet&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;rndIndex&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;set&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;add&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;rndString&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;toString&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;     &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;for&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;String&lt;/span&gt; s &lt;span style="color: rgb(128, 128, 48);"&gt;:&lt;/span&gt; set&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;System&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;out&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;println&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;s&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-3050221289914171579?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/3050221289914171579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=3050221289914171579' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/3050221289914171579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/3050221289914171579'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/04/random-strings-and-removing-duplicates.html' title='Random strings and removing duplicates'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-4775708388424408700</id><published>2007-04-16T23:48:00.000-07:00</published><updated>2007-04-17T07:03:28.193-07:00</updated><title type='text'>IT Podcasting</title><content type='html'>I'm become a fan of podcasting. Why ? It is interesting to me to hear what the people say. I don't know, maybe it is wish to be closer to the technology leaders. I'm not able to visit such parties as ApacheCon, JavaOne etc. Maybe someday, somehow... :) So, podcast listening is a nice alternative.&lt;br /&gt;&lt;br /&gt;I've listened few podcasts in Russian - one IT only podcast, another not so related to IT but from IT specialist. It was interesting to hear about lifestyle and some points from interviewer form Chicago, US. Another interesting thing (in Russian also) is about startup creation. I have a few ideas which I found interesting, but I need a lot (maybe not) of meditation to create at least business-plan and prototype. Searching a venture capitalist is the most complicated thing as far as I see. But maybe not. I'm noticed that I have a visitors from different kind of financial organizations. Will see :) I guess the most exciting thing of startup creation is that I'm not loosing something. When it is successful - I won, when not - I'm also won because I completed some work and added a line to my CV. When you have nothing life is simple - go and fight :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Of course I'm interested in Java related podcasts. I've found one - &lt;a href="http://www.javaposse.com/"&gt;http://www.javaposse.com&lt;/a&gt;&lt;br /&gt;I have to admit that is not too easy to perceive sound. English is not my native language, so I need a lot of practice. As the Lenin said "To learn, to learn and to learn once again!"&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-4775708388424408700?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/4775708388424408700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849561&amp;postID=4775708388424408700' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4775708388424408700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4775708388424408700'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/04/it-podcasting.html' title='IT Podcasting'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-836778233612259029</id><published>2007-04-11T01:44:00.000-07:00</published><updated>2007-04-11T04:24:53.490-07:00</updated><title type='text'>Using XDoclet with Maven 2</title><content type='html'>One of the useful features of Ant is ability to generate different kind of config files (and othe stuff) with the help of XDoclet. I would like to use this feature with Maven. It's take a lot of time to understand how to do the trick but for now it is working as expected and I want to share with you some of hints.&lt;br /&gt;So, what is doing here. I just want to build servlet with Maven, generate deployment descriptor from annotated source and finally create a war file. OK, lets start.&lt;br /&gt;First of all I'm creating a new Maven project like thins :&lt;br /&gt;&lt;blockquote&gt;mvn archetype:create&lt;br /&gt;-DgroupId=MyServlets&lt;br /&gt;-DartifactId=longRunningServlet&lt;br /&gt;-DarchetypeArtifactId=maven-archetype-webapp&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;In my pom.xml I have  &lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;packaging&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;war&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;/&lt;/span&gt;packaging&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;so, all is ok. Final name of war file will be longRunningServlet.war. Further more interesting. Where I should place servlet source code ? Answer is longRunningServlet\src\main\java. But you should to create "java" directory by hand since it is not created by Maven. Is it bug of feature ? :) How we have directory strucure for building project with sources placed at longRunningServlet\src\main\java. To build servlet we need to set up dependencies. Standalone servlet has one dependency&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;javax.servlet&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;servlet-api&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;scope&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;provided&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;scope&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;2.4&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Please notice scope=provided. In practice it is means that servlet api jar will not be placed in war's WEB-INF\lib.&lt;br /&gt;And now XDoclet. Dependencies for XDoclet are :&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;xdoclet&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;xdoclet-web-module&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;scope&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;provided&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;scope&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;1.2.3&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;xdoclet&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;xjavadoc&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;scope&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;provided&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;scope&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;1.1&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Actualy XDoclet is executed via Maven Antrun plugin with specific configuration of both - maven-run plugin and xdoclet. &lt;span id="r_text" name="r_text"&gt; Looks impressively :&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;plugin&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                                                             &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;maven-antrun-plugin&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                        &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;executions&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                                                       &lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;execution&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                                                       &lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;phase&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;generate-sources&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;phase&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                                  &lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                                                 &lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;tasks&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                                                        &lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;taskdef&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;webdoclet&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;                                  &lt;br /&gt;             &lt;span s
