<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" gd:etag="W/&quot;A0YARH06cCp7ImA9WhRUGEQ.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031</id><updated>2012-01-29T20:52:25.318-08:00</updated><category term="Spring Java Development" /><category term="Programmer's Hacks" /><category term="Google App Engine Development" /><category term="Java Web Development" /><category term="Java Tips and Tricks" /><category term="Scala Development" /><category term="Java EE Development" /><category term="Event Notification" /><category term="Spring Development" /><category term="Domain-Driven Development" /><title>Spring vs Java EE Web Dev</title><subtitle type="html">Unleashing the Enterprise &amp;amp; Mobile Java ecosystem</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>127</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/springjavaee" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="springjavaee" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">springjavaee</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;D0MNRHszfip7ImA9WhRVF0o.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-5862979522906556742</id><published>2012-01-16T20:44:00.001-08:00</published><updated>2012-01-16T20:44:55.586-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-16T20:44:55.586-08:00</app:edited><title>Pentaho Data Integration Transformation and Step Architecture</title><content type="html">&lt;div class='posterous_autopost'&gt;&lt;div class='p_embed p_image_embed'&gt; &lt;a href="http://getfile1.posterous.com/getfile/files.posterous.com/spring-java-ee/tAAJP9ZHkdPb6d99nIjMi7bkRHUmDDqEH9Cjavm3iWzQT4XDgbUQbTTJntIb/Pentaho-Data-Integration-trans.png"&gt;&lt;img alt="Pentaho-data-integration-trans" height="212" src="http://getfile2.posterous.com/getfile/files.posterous.com/spring-java-ee/kocV66GUmJ2RmFjbehH7jZ71MVTV6GGHw6c2QQqNUabVIBQPJG1c1gwfz8bg/Pentaho-Data-Integration-trans.png.scaled.500.jpg" width="500" /&gt;&lt;/a&gt; &lt;/div&gt; &lt;p&gt;After doing some &lt;a href="http://kettle.pentaho.com/"&gt;&lt;b&gt;Pentaho Data Integration (Kettle)&lt;/b&gt;&lt;/a&gt; work especially with &lt;a href="http://spring-java-ee.blogspot.com/2011/12/i-don-json-output-in-pentaho-data.html"&gt;&lt;b&gt;JSON Output Step&lt;/b&gt;&lt;/a&gt; in &lt;a href="http://jira.pentaho.com/browse/PDI-7197"&gt;PDI-7195 bug&lt;/a&gt;, I guess it&amp;#39;s a good thing to describe visually how I see the PDI &lt;b&gt;transformations &lt;/b&gt;and &lt;b&gt;steps &lt;/b&gt;architecture.&lt;p /&gt; Hopefully this is helpful for you and also to remind me when I&amp;#39;m confused because which Kettle step framework classes/interfaces relate to which ones is sometimes easy to forget. :-)&lt;p /&gt;Learn how to &lt;i&gt;process&lt;/i&gt; and &lt;i&gt;integrate enterprise databases &amp;amp; data warehouses&lt;/i&gt; easily with &lt;a href="http://www.amazon.com/gp/product/1849515247/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=springjavaee-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1849515247"&gt;&lt;b&gt;Pentaho Data Integration 4 Cookbook&lt;/b&gt;&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-5862979522906556742?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/5862979522906556742/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2012/01/pentaho-data-integration-transformation.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/5862979522906556742?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/5862979522906556742?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2012/01/pentaho-data-integration-transformation.html" title="Pentaho Data Integration Transformation and Step Architecture" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C04MSXo5fCp7ImA9WhRVFU8.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-1525850800139306240</id><published>2012-01-13T22:19:00.003-08:00</published><updated>2012-01-13T22:19:48.424-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-13T22:19:48.424-08:00</app:edited><title>When do work in Enterprise Application Integration field...</title><content type="html">&lt;div class='posterous_autopost'&gt;&lt;p&gt;...be prepared to get ClassNotFoundException, ClassCastException,&lt;/p&gt; &lt;p&gt;and loads of other classpath and classloading problems often. :-)&lt;/p&gt; &lt;p&gt;(if you don&amp;#39;t use OSGi, that is...)&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-1525850800139306240?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/1525850800139306240/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2012/01/when-do-work-in-enterprise-application_13.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/1525850800139306240?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/1525850800139306240?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2012/01/when-do-work-in-enterprise-application_13.html" title="When do work in Enterprise Application Integration field..." /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C04MRng5fyp7ImA9WhRVFU8.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-465456852282680095</id><published>2012-01-13T22:19:00.001-08:00</published><updated>2012-01-13T22:19:47.627-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-13T22:19:47.627-08:00</app:edited><title>When do work in Enterprise Application Integration field...</title><content type="html">&lt;div class='posterous_autopost'&gt;&lt;p&gt;...be prepared to get ClassNotFoundException, ClassCastException,&lt;/p&gt; &lt;p&gt;and loads of other classpath and classloading problems often. :-)&lt;/p&gt; &lt;p&gt;(if you don&amp;#39;t use OSGi, that is...)&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-465456852282680095?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/465456852282680095/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2012/01/when-do-work-in-enterprise-application.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/465456852282680095?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/465456852282680095?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2012/01/when-do-work-in-enterprise-application.html" title="When do work in Enterprise Application Integration field..." /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Ck4ASXw9cCp7ImA9WhRVE00.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-4459363537028747961</id><published>2012-01-11T08:55:00.001-08:00</published><updated>2012-01-11T08:55:48.268-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-11T08:55:48.268-08:00</app:edited><title>Making JSF 2.0 Composite Components Ajax render-capable</title><content type="html">&lt;div class='posterous_autopost'&gt;&lt;div class='p_embed p_image_embed'&gt; &lt;a href="http://getfile1.posterous.com/getfile/files.posterous.com/spring-java-ee/XleobDSs5L6q2B5mpO9wxOdLFgfRIvneYrxINGeVjJpomLRjt13GKogCm9xm/satukancinta-user-follow-jsf-a.png"&gt;&lt;img alt="Satukancinta-user-follow-jsf-a" height="284" src="http://getfile2.posterous.com/getfile/files.posterous.com/spring-java-ee/vEaq2auI1VdQv4Uxgfb6J5ms4o5UDxBZbZgZXiNM8eHbuaDKDiiKwDjoG1oG/satukancinta-user-follow-jsf-a.png.scaled.500.jpg" width="500" /&gt;&lt;/a&gt; &lt;/div&gt; &lt;p&gt;If you for example have the following &lt;b&gt;composite component&lt;/b&gt; in a &lt;b&gt;JSF 2.0 Facelets XHTML template&lt;/b&gt;: &lt;/p&gt;&lt;div class="gmail_quote"&gt;&lt;p style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; &amp;lt;sc:block title=&lt;i&gt;&amp;quot;Followers&amp;quot;&lt;/i&gt;&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 	&amp;lt;h:panelGroup rendered=&lt;i&gt;&amp;quot;#{not empty userShow.user.followedByUsers}&amp;quot;&lt;/i&gt;&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 		&amp;lt;ul&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt;  	&amp;lt;ui:repeat var=&lt;i&gt;&amp;quot;user&amp;quot;&lt;/i&gt; value=&lt;i&gt;&amp;quot;#{userShow.user.followedByUsers}&amp;quot;&lt;/i&gt;&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt;  		&amp;lt;li&amp;gt;&amp;lt;sc:user_link user=&lt;i&gt;&amp;quot;#{user}&amp;quot;&lt;/i&gt;/&amp;gt;&amp;lt;/li&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt;  	&amp;lt;/ui:repeat&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt;  	&amp;lt;/ul&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt;  &amp;lt;/h:panelGroup&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 	&amp;lt;h:panelGroup rendered=&lt;i&gt;&amp;quot;#{empty usefollowedByUsers}&amp;quot;&lt;/i&gt;&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 		#{&lt;a href="http://userShow.user.name" target="_blank"&gt;userShow.user.name&lt;/a&gt;} has no followers.&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 	&amp;lt;/h:panelGroup&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; &amp;lt;/sc:block&amp;gt;&lt;/p&gt; &lt;p&gt;and try do ajax render:&lt;/p&gt; &lt;p style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; &amp;lt;a4j:commandButton value=&lt;i&gt;&amp;quot;Follow&amp;quot;&lt;/i&gt; action=&lt;i&gt;&amp;quot;#{userBean.follow(currentUser, userShow.user)}&amp;quot;&lt;/i&gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 	 			render=&lt;i&gt;&amp;quot;followPanel followers&amp;quot;&lt;/i&gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 	 			rendered=&lt;i&gt;&amp;quot;#{not currentUser.isFollowing(userShow.user)}&amp;quot;&lt;/i&gt;/&amp;gt;&lt;/p&gt; &lt;p&gt;This won&amp;#39;t work for some reason. &lt;b&gt;Wrong&lt;/b&gt; &lt;i&gt;workaround&lt;/i&gt; is using a &lt;b&gt;h:panelGroup&lt;/b&gt; and moving the &lt;b&gt;id&lt;/b&gt; for &lt;b&gt;ajax render&lt;/b&gt; there:&lt;/p&gt; &lt;p style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; &amp;lt;sc:block title=&lt;i&gt;&amp;quot;Followers&amp;quot;&lt;/i&gt;&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 	&amp;lt;h:panelGroup id=&lt;i&gt;&amp;quot;followers&amp;quot;&lt;/i&gt;&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 		&amp;lt;h:panelGroup rendered=&lt;i&gt;&amp;quot;#{not empty userShow.user.followedByUsers}&amp;quot;&lt;/i&gt;&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 			&amp;lt;ul&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 	 	&amp;lt;ui:repeat var=&lt;i&gt;&amp;quot;user&amp;quot;&lt;/i&gt; value=&lt;i&gt;&amp;quot;#{userShow.user.followedByUsers}&amp;quot;&lt;/i&gt;&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 	 		&amp;lt;li&amp;gt;&amp;lt;sc:user_link user=&lt;i&gt;&amp;quot;#{user}&amp;quot;&lt;/i&gt;/&amp;gt;&amp;lt;/li&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 	 	&amp;lt;/ui:repeat&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 	 	&amp;lt;/ul&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt;  	&amp;lt;/h:panelGroup&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 		&amp;lt;h:panelGroup rendered=&lt;i&gt;&amp;quot;#{empty us.followedByUsers}&amp;quot;&lt;/i&gt;&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 			#{&lt;a href="http://userShow.user.name" target="_blank"&gt;userShow.user.name&lt;/a&gt;} has no followers.&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 		&amp;lt;/h:panelGroup&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 	&amp;lt;/h:panelGroup&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; &amp;lt;/sc:block&amp;gt;&lt;/p&gt; &lt;p&gt;The &lt;b&gt;correct solution&lt;/b&gt; is to put a &lt;b&gt;#{cc.clientId}&lt;/b&gt; like below in the composite implementation:&lt;/p&gt; &lt;p style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; &amp;lt;composite:implementation&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 	&amp;lt;section &lt;span style="background: #ffff00;"&gt;id&lt;/span&gt;&lt;span style="background: #ffff00;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="background: #ffff00;"&gt;&amp;quot;#{cc.clientId}&amp;quot;&lt;/span&gt;&lt;/i&gt; class=&lt;i&gt;&amp;quot;block&amp;quot;&lt;/i&gt;&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 		&amp;lt;div class=&lt;i&gt;&amp;quot;block-inner clearfix&amp;quot;&lt;/i&gt;&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 			&amp;lt;h2 class=&lt;i&gt;&amp;quot;block-title&amp;quot;&lt;/i&gt;&amp;gt;#{cc.attrs.title}&amp;lt;/h2&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 			&amp;lt;div class=&lt;i&gt;&amp;quot;block-content content&amp;quot;&lt;/i&gt;&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 				&amp;lt;composite:insertChildren/&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 			&amp;lt;/div&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 		&amp;lt;/div&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 	&amp;lt;/section&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; &amp;lt;/composite:implementation&amp;gt;&lt;/p&gt; &lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt;&lt;/p&gt;&lt;p align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;To learn more about &lt;b&gt;Java Web Development&lt;/b&gt; using &lt;b&gt;Java EE 6&lt;/b&gt;, I highly recommend &lt;a href="http://www.amazon.com/gp/product/0137081855/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=springjavaee-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0137081855" target="_blank"&gt;&lt;b&gt;The Java EE 6 Tutorial: Basic Concepts (4th Edition)&lt;/b&gt; (Java Series) by Eric Jendrock, Ian Evans, Devika Gollapudi and Kim Haase&lt;/a&gt;.&lt;/p&gt; &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-4459363537028747961?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/4459363537028747961/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2012/01/making-jsf-20-composite-components-ajax.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/4459363537028747961?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/4459363537028747961?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2012/01/making-jsf-20-composite-components-ajax.html" title="Making JSF 2.0 Composite Components Ajax render-capable" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0QBRH8_fCp7ImA9WhRXFUg.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-821054473879135593</id><published>2011-12-22T05:09:00.001-08:00</published><updated>2011-12-22T05:09:15.144-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-22T05:09:15.144-08:00</app:edited><title>Fix Jackson/JAXB JSON Serialization Problem with Spring Data Neo4j @NodeEntity Objects</title><content type="html">&lt;div class='posterous_autopost'&gt;  &lt;p class="western"&gt;&lt;b&gt;Spring Data Neo4j @NodeEntity&lt;/b&gt;-&lt;b&gt;annotated objects&lt;/b&gt; are &lt;i&gt;proxy&lt;/i&gt;-enriched by Spring Data Neo4j &lt;b&gt;aspects &lt;/b&gt;using &lt;b&gt;AspectJ&lt;/b&gt;&lt;span style="font-weight: normal;"&gt;. There are times we want to expose these objects via &lt;/span&gt;&lt;b&gt;JAX-RS REST API &lt;/b&gt;&lt;span style="font-weight: normal;"&gt;or &lt;/span&gt;&lt;b&gt;JAX-WS / SOAP web services &lt;/b&gt;&lt;span style="font-weight: normal;"&gt;and then (by default) we will have problems.&lt;/span&gt;&lt;/p&gt; &lt;p class="western"&gt;&lt;span style="font-weight: normal;"&gt;The &lt;/span&gt;&lt;b&gt;error stacktrace messages&lt;/b&gt;&lt;span style="font-weight: normal;"&gt; (here using &lt;/span&gt;&lt;b&gt;JBoss AS 7.0.2&lt;/b&gt;&lt;span style="font-weight: normal;"&gt;) are along the lines of:&lt;/span&gt;&lt;/p&gt; &lt;p class="western" style="margin-left: 1.27cm;"&gt;&lt;span style="font-weight: normal;"&gt;HTTP Status 500 - org.codehaus.jackson.map.JsonMappingException: No serializer found for class org.neo4j.graphdb.DynamicRelationshipType and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: com.satukancinta.domain.User[&amp;quot;enjoyActivities&amp;quot;]-&amp;gt;org.springframework.data.neo4j.fieldaccess.ManagedFieldAccessorSet[0]-&amp;gt;com.satukancinta.domain.Activity[&amp;quot;persistentState&amp;quot;]-&amp;gt;org.neo4j.rest.graphdb.entity.RestNode[&amp;quot;relationships&amp;quot;]-&amp;gt;org.neo4j.rest.graphdb.entity.RestRelationship[&amp;quot;type&amp;quot;])&lt;/span&gt;&lt;/p&gt; &lt;hr size="1" align="RIGHT" width="632" /&gt; &lt;p class="western" style="margin-left: 1.27cm;"&gt;&lt;b&gt;type&lt;/b&gt; Status report&lt;/p&gt; &lt;p class="western" style="margin-left: 1.27cm;"&gt;&lt;b&gt;message&lt;/b&gt; org.codehaus.jackson.map.JsonMappingException: No serializer found for class org.neo4j.graphdb.DynamicRelationshipType and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: com.satukancinta.domain.User[&amp;quot;enjoyActivities&amp;quot;]-&amp;gt;org.springframework.data.neo4j.fieldaccess.ManagedFieldAccessorSet[0]-&amp;gt;com.satukancinta.domain.Activity[&amp;quot;persistentState&amp;quot;]-&amp;gt;org.neo4j.rest.graphdb.entity.RestNode[&amp;quot;relationships&amp;quot;]-&amp;gt;org.neo4j.rest.graphdb.entity.RestRelationship[&amp;quot;type&amp;quot;])&lt;/p&gt; &lt;p class="western" style="margin-left: 1.27cm;"&gt;&lt;b&gt;description&lt;/b&gt; The server encountered an internal error (org.codehaus.jackson.map.JsonMappingException: No serializer found for class org.neo4j.graphdb.DynamicRelationshipType and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: com.satukancinta.domain.User[&amp;quot;enjoyActivities&amp;quot;]-&amp;gt;org.springframework.data.neo4j.fieldaccess.ManagedFieldAccessorSet[0]-&amp;gt;com.satukancinta.domain.Activity[&amp;quot;persistentState&amp;quot;]-&amp;gt;org.neo4j.rest.graphdb.entity.RestNode[&amp;quot;relationships&amp;quot;]-&amp;gt;org.neo4j.rest.graphdb.entity.RestRelationship[&amp;quot;type&amp;quot;])) that prevented it from fulfilling this request.&lt;/p&gt; &lt;p class="western"&gt;&lt;span style="font-weight: normal;"&gt;To solve this problem, annotate your entity class with &lt;/span&gt;&lt;span style="font-weight: normal;"&gt;@JsonAutoDetect&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;(JsonMethod.&lt;/span&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;NONE&lt;/span&gt;&lt;/i&gt;&lt;span style="font-weight: normal;"&gt;) :&lt;/span&gt;&lt;/p&gt; &lt;p class="western" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; &lt;b&gt;import&lt;/b&gt;&lt;span style="font-weight: normal;"&gt; org.codehaus.jackson.annotate.JsonAutoDetect;&lt;/span&gt;&lt;/p&gt; &lt;p class="western" align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; &lt;b&gt;import&lt;/b&gt; org.codehaus.jackson.annotate.JsonMethod;&lt;/p&gt; &lt;p class="western" align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; &lt;b&gt;import&lt;/b&gt; org.codehaus.jackson.annotate.JsonProperty;&lt;/p&gt; &lt;p class="western" align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; &lt;br /&gt; &lt;/p&gt; &lt;p class="western" align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; @NodeEntity @JsonAutoDetect(JsonMethod.&lt;i&gt;NONE&lt;/i&gt;)&lt;/p&gt; &lt;p class="western" align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; &lt;b&gt;public&lt;/b&gt; &lt;b&gt;class&lt;/b&gt; User &lt;b&gt;implements&lt;/b&gt; NodeBacked {&lt;/p&gt; &lt;p class="western"&gt;&lt;p /&gt; &lt;/p&gt; &lt;p class="western"&gt;&lt;span style="font-weight: normal;"&gt;then manually annotate each property you want to serialize with @JsonProperty :&lt;/span&gt;&lt;/p&gt; &lt;p class="western" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; &lt;span style="font-weight: normal;"&gt;	&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;@JsonProperty&lt;/span&gt;&lt;/p&gt; &lt;p class="western" align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 	&lt;b&gt;public&lt;/b&gt; String getName() {&lt;/p&gt; &lt;p class="western" align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 		&lt;b&gt;return&lt;/b&gt; name;&lt;/p&gt; &lt;p class="western" align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 	}&lt;/p&gt; &lt;p class="western"&gt;&lt;span style="font-weight: normal;"&gt;Now the &lt;/span&gt;&lt;b&gt;JAX-RS Application&lt;/b&gt; 	 	 	 	&lt;span style="font-weight: normal;"&gt; works as intended and everybody is happy. :-) There&amp;#39;s also a &lt;a href="http://stackoverflow.com/questions/4362104/strange-jackson-exception-being-thrown-when-serializing-hibernate-object"&gt;StackOverflow thread&lt;/a&gt; that discusses this problem.&lt;/span&gt;&lt;/p&gt;&lt;p class="wikiPara"&gt;To learn more about &lt;b&gt;Java Web Development&lt;/b&gt; using &lt;b&gt;Java EE 6&lt;/b&gt;, I highly recommend &lt;a href="http://www.amazon.com/gp/product/0137081855/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=springjavaee-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0137081855" target="_blank"&gt;&lt;b&gt;The Java EE 6 Tutorial: Basic Concepts (4th Edition)&lt;/b&gt; (Java Series) by Eric Jendrock, Ian Evans, Devika Gollapudi and Kim Haase&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-821054473879135593?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/821054473879135593/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2011/12/fix-jacksonjaxb-json-serialization.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/821054473879135593?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/821054473879135593?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2011/12/fix-jacksonjaxb-json-serialization.html" title="Fix Jackson/JAXB JSON Serialization Problem with Spring Data Neo4j @NodeEntity Objects" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;CUUFRHkycCp7ImA9WhRXFUg.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-6397557817442920702</id><published>2011-12-22T03:26:00.001-08:00</published><updated>2011-12-22T03:26:55.798-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-22T03:26:55.798-08:00</app:edited><title>How to Resolve Spring Data Neo4j / Jersey / Jackson Conflict with JBoss AS 7 RESTEasy</title><content type="html">&lt;div class='posterous_autopost'&gt;  &lt;p class="western" style="font-weight: normal;"&gt;I&amp;#39;m using &lt;b&gt;Spring Data Neo4j REST Client&lt;/b&gt; which uses &lt;b&gt;Jersey JAX-RS Client&lt;/b&gt;. Unfortunately when deployed to &lt;b&gt;JBoss AS 7.0.2&lt;/b&gt;, it&lt;b&gt; conflicts&lt;/b&gt; with the built-in &lt;b&gt;RESTEasy&lt;/b&gt; deployer (&lt;a href="https://jira.springsource.org/browse/DATAGRAPH-159"&gt;bug DATAGRAPH-159&lt;/a&gt;).&lt;/p&gt; &lt;p class="western" style="font-weight: normal;"&gt;In order to run the application, jersey-server must be excluded :&lt;/p&gt; &lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;&amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;org.springframework.data&amp;lt;/groupId&amp;gt; &amp;lt;artifactId&amp;gt;spring-data-neo4j-rest&amp;lt;/artifactId&amp;gt; &amp;lt;version&amp;gt;${spring-data-neo4j.version}&amp;lt;/version&amp;gt; &amp;lt;exclusions&amp;gt; ... &amp;lt;exclusion&amp;gt; &amp;lt;artifactId&amp;gt;jersey-server&amp;lt;/artifactId&amp;gt; &amp;lt;groupId&amp;gt;com.sun.jersey&amp;lt;/groupId&amp;gt; &amp;lt;/exclusion&amp;gt; &amp;lt;/exclusions&amp;gt; &amp;lt;/dependency&amp;gt;&lt;/pre&gt;&lt;/div&gt; &lt;/div&gt; &lt;p class="western" style="font-weight: normal;"&gt;Another issue I came across is my web application is also a &lt;b&gt;JAX-RS Service Application&lt;/b&gt;, therefore it requires &lt;b&gt;JBoss RESTEasy&lt;/b&gt;. Unfortunately Jackson JSON Provider which is a dependency of Neo4j REST Client and Jersey JAX-RS Client conflicts with RESTEasy&amp;#39;s Jackson Provider, with the following exception stacktrace message:&lt;/p&gt; &lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;java.lang.RuntimeException: Unable to instantiate MessageBodyReader  org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:760)  org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:742)  org.jboss.resteasy.spi.ResteasyDeployment.registerProvider(ResteasyDeployment.java:505)  org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:305)  org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:225)  org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:67)  org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)  org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139)  org.jboss.as.web.NamingValve.invoke(NamingValve.java:57)  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)  org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:897)  org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:626)  org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2054)  java.lang.Thread.run(Thread.java:722)&lt;/pre&gt;&lt;/div&gt; &lt;/div&gt; &lt;p class="western" style="background: #ffffff; font-style: normal;"&gt; &lt;b&gt;&lt;span style="background: #525d76;"&gt;root cause&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;java.lang.RuntimeException: Illegal to inject a message body into a singleton into public org.codehaus.jackson.jaxrs.JacksonJsonProvider(org.codehaus.jackson.map.ObjectMapper,org.codehaus.jackson.jaxrs.Annotations[])  org.jboss.resteasy.core.MessageBodyParameterInjector.inject(MessageBodyParameterInjector.java:209)  org.jboss.resteasy.core.ConstructorInjectorImpl.injectableArguments(ConstructorInjectorImpl.java:63)  org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:129)  org.jboss.resteasy.spi.ResteasyProviderFactory.getProviderInstance(ResteasyProviderFactory.java:1038)&lt;/pre&gt;&lt;/div&gt; &lt;/div&gt; &lt;p class="western"&gt; I thought this was issue &lt;a href="https://issues.jboss.org/browse/RESTEASY-503"&gt;RESTEASY-503&lt;/a&gt;, because JBoss AS 7.0.2 happened to use the somewhat buggy RESTEasy &lt;a href="http://2.2.1.GA"&gt;2.2.1.GA&lt;/a&gt;. But it turns out there is an easy fix to this problem, thanks to &lt;a href="https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7"&gt;Configuring Module Classloading in JBoss AS 7&lt;/a&gt;.&lt;/p&gt; &lt;p class="western"&gt;Edit src/main/webapp/WEB-INF/jboss-deployment-structure.xml as follows:&lt;/p&gt; &lt;p class="western"&gt;&lt;br /&gt;&amp;lt;jboss-deployment-structure xmlns=&lt;i&gt;&amp;quot;urn:jboss:deployment-structure:1.0&amp;quot;&lt;/i&gt;&amp;gt;&lt;/p&gt; &lt;p class="western" align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 	&amp;lt;deployment&amp;gt;&lt;/p&gt; &lt;p class="western" align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 		&amp;lt;dependencies&amp;gt;&lt;/p&gt; &lt;p class="western" align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 			&amp;lt;module name=&lt;i&gt;&amp;quot;org.codehaus.jackson.jackson-jaxrs&amp;quot;&lt;/i&gt;/&amp;gt;&lt;/p&gt; &lt;p class="western" align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 			&amp;lt;module name=&lt;i&gt;&amp;quot;org.codehaus.jackson.jackson-core-asl&amp;quot;&lt;/i&gt;/&amp;gt;&lt;/p&gt; &lt;p class="western" align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 			&amp;lt;module name=&lt;i&gt;&amp;quot;org.codehaus.jackson.jackson-mapper-asl&amp;quot;&lt;/i&gt;/&amp;gt;&lt;/p&gt; &lt;p class="western" align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 		&amp;lt;/dependencies&amp;gt;&lt;/p&gt; &lt;p class="western" align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; 	&amp;lt;/deployment&amp;gt;&lt;/p&gt; &lt;p class="western" align="LEFT" style="margin-bottom: 0cm; font-style: normal; font-weight: normal;"&gt; &amp;lt;/jboss-deployment-structure&amp;gt;&lt;/p&gt; &lt;p class="western"&gt;Now Spring Data Neo4j, Jersey Client with JSON Jackson Provider, and my JAX-RS Application served by RESTEasy, all can coexist in the same web application WAR. :-)&lt;/p&gt;&lt;p class="western"&gt;&lt;/p&gt;&lt;p class="wikiPara"&gt;To learn more about &lt;b&gt;Java Web Development&lt;/b&gt; using &lt;b&gt;Java EE 6&lt;/b&gt;, I highly recommend &lt;a href="http://www.amazon.com/gp/product/0137081855/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=springjavaee-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0137081855" target="_blank"&gt;&lt;b&gt;The Java EE 6 Tutorial: Basic Concepts (4th Edition)&lt;/b&gt; (Java Series) by Eric Jendrock, Ian Evans, Devika Gollapudi and Kim Haase&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-6397557817442920702?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/6397557817442920702/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2011/12/how-to-resolve-spring-data-neo4j-jersey.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/6397557817442920702?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/6397557817442920702?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2011/12/how-to-resolve-spring-data-neo4j-jersey.html" title="How to Resolve Spring Data Neo4j / Jersey / Jackson Conflict with JBoss AS 7 RESTEasy" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>4</thr:total></entry><entry gd:etag="W/&quot;CUMGQ344fCp7ImA9WhRQEkg.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-213690938424748479</id><published>2011-12-07T02:23:00.001-08:00</published><updated>2011-12-07T02:23:42.034-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-07T02:23:42.034-08:00</app:edited><title>I don't "get" JSON Output in Pentaho Data Integration (PDI) / Kettle</title><content type="html">&lt;div class='posterous_autopost'&gt;I don&amp;#39;t understand how to use the &lt;b&gt;JSON Output step&lt;/b&gt; properly in &lt;b&gt;Kettle&lt;/b&gt; aka &lt;b&gt;Pentaho Data Integration (PDI)&lt;/b&gt;.&lt;p /&gt;With &amp;quot;Nr of rows in a bloc&amp;quot; set to 0 or 3, I got:&lt;p /&gt;&lt;span style="font-family: courier new,monospace;"&gt;{&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;  &amp;quot;categories&amp;quot;: [&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    {&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;      &amp;quot;code&amp;quot;: &amp;quot;WORKAHOLIC-CHIC&amp;quot;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    },&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    {&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;      &amp;quot;name&amp;quot;: &amp;quot;Workaholic Chic&amp;quot;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    },&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    {&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;      &amp;quot;description&amp;quot;: &amp;quot;Move ! Move ! move...!!\nLight Up Your Day... with a perfect match, \nPadanan busana kerja Professsional look, Powerfull &amp;amp; Fashionable,\nwhich got several design for different mood,  multifunction,\nMemorable style!\nLetâ€™s be and stay Tuneeca...\n&amp;quot;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    }&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;  ]&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;}&lt;/span&gt;&lt;p /&gt; which is basically only the last record.&lt;p /&gt;With &amp;quot;Nr of rows in a bloc&amp;quot; set to 1, I got:&lt;p /&gt;&lt;span style="font-family: courier new,monospace;"&gt;{&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;  &amp;quot;categories&amp;quot;: [&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    {&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;      &amp;quot;code&amp;quot;: &amp;quot;AKSESORI-LIGHT-UP-YOUR-DAY&amp;quot;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    },&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    {&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;      &amp;quot;name&amp;quot;: &amp;quot;Aksesori Light Up Your Day&amp;quot;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    },&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    {&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;      &amp;quot;description&amp;quot;: &amp;quot;-&amp;quot;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    },&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    {&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;      &amp;quot;code&amp;quot;: &amp;quot;AKSESORIS-APRIL-2009&amp;quot;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    },&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;...&lt;/span&gt;&lt;p /&gt;What I&amp;#39;m trying to get is:&lt;p /&gt;&lt;span style="font-family: courier new,monospace;"&gt;{ &amp;quot;categories&amp;quot;: [&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;  { &amp;quot;code&amp;quot;: &amp;quot;AKSESORI-LIGHT-UP-YOUR-DAY&amp;quot;,&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;     &amp;quot;name&amp;quot;: &amp;quot;Aksesori Light Up Your Day&amp;quot;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;      &amp;quot;description&amp;quot;: &amp;quot;Very cool&amp;quot; },&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;  { &amp;quot;code&amp;quot;: .........&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt; &lt;/span&gt;&lt;br /&gt;Contrast this with the &lt;b&gt;XML Output&lt;/b&gt;, which I get the following correct output right from first try:&lt;p /&gt;&lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;categories&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;  &amp;lt;category&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;code&amp;gt;AKSESORI-LIGHT-UP-YOUR-DAY&amp;lt;/code&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;name&amp;gt;Aksesori Light Up Your Day&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;description&amp;gt;-&amp;lt;/description&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;  &amp;lt;/category&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;  &amp;lt;category&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;code&amp;gt;AKSESORIS-APRIL-2009&amp;lt;/code&amp;gt;&lt;/span&gt;&lt;br /&gt; ...&lt;p /&gt;An additional plus is that &lt;b&gt;XML Output&lt;/b&gt; already performs a bit of &lt;i&gt;output pretty formatting&lt;/i&gt;, which I appreciate very much. (JSON Output outputs everything in a single line)&lt;p /&gt; Those two &lt;b&gt;Output steps&lt;/b&gt; gets the same &lt;b&gt;input data&lt;/b&gt;.&lt;p /&gt;Any ideas ?&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-213690938424748479?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/213690938424748479/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2011/12/i-don-json-output-in-pentaho-data.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/213690938424748479?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/213690938424748479?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2011/12/i-don-json-output-in-pentaho-data.html" title="I don&amp;#39;t &amp;quot;get&amp;quot; JSON Output in Pentaho Data Integration (PDI) / Kettle" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;CUYFSXs6fSp7ImA9WhdaFk4.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-1977874726078051983</id><published>2011-10-26T05:45:00.001-07:00</published><updated>2011-10-26T05:45:18.515-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-26T05:45:18.515-07:00</app:edited><title>Seam Framework Java EE Library version 3.1.0.Beta4 Released</title><content type="html">&lt;div class='posterous_autopost'&gt;&lt;p class="wikiPara"&gt; As per usual, let&amp;#39;s get the links out of the way first: &lt;/p&gt; &lt;p class="wikiPara"&gt; &lt;a href="https://sourceforge.net/projects/jboss/files/Seam/3/3.1.0.Beta4/" class="regularLink" target=""&gt;Download &lt;b&gt;Seam 3.1.0.Beta4&lt;/b&gt;&lt;/a&gt; &lt;/p&gt; &lt;p class="wikiPara"&gt; &lt;a href="http://docs.jboss.org/seam/3/latest/reference/en-US/html/" class="regularLink" target=""&gt;Reference Documentation&lt;/a&gt; &lt;/p&gt; &lt;p class="wikiPara"&gt; &lt;a href="http://docs.jboss.org/seam/3/latest/api/" class="regularLink" target=""&gt;API Documentation&lt;/a&gt; &lt;/p&gt; &lt;p class="wikiPara"&gt; &lt;a href="http://issues.jboss.org/browse/SEAM" class="regularLink" target=""&gt;Report Issues&lt;/a&gt; &lt;/p&gt; &lt;p class="wikiPara"&gt; For Maven users, there is a new version of the Seam Bill of Materials: &lt;/p&gt; &lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;&amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;org.jboss.seam&amp;lt;/groupId&amp;gt; &amp;lt;artifactId&amp;gt;seam-bom&amp;lt;/artifactId&amp;gt; &amp;lt;version&amp;gt;3.1.0.Beta4&amp;lt;/version&amp;gt; &amp;lt;type&amp;gt;pom&amp;lt;/type&amp;gt; &amp;lt;scope&amp;gt;import&amp;lt;/scope&amp;gt; &amp;lt;/dependency&amp;gt;&lt;/pre&gt;&lt;/div&gt; &lt;/div&gt; &lt;p class="wikiPara"&gt; I know that we promised a CR1 release for Seam 3.1 at about this time, however the Seam QA team have done their jobs a little too well and identified a number of issues with the Beta3 release which we wanted to get fixed before we go to a candidate release. The great news for this release is that we&amp;#39;ve fixed 68 issues - you can view the issue list here: &lt;/p&gt; &lt;p class="wikiPara"&gt; &lt;a href="https://issues.jboss.org/secure/IssueNavigator.jspa?mode=hide&amp;amp;requestId=12315988" class="regularLink" target=""&gt;https://issues.jboss.org/secure/IssueNavigator.jspa?mode=hide&amp;amp;requestId=12315988&lt;/a&gt; &lt;/p&gt; &lt;p class="wikiPara"&gt; Included in this release is a number of new features, improved documentation and a brand new Arquillian-based structure for our test suites to make it easier to test each module on multiple containers. We&amp;#39;ve also squashed a great deal of bugs, improved stability, plus made a number of other minor improvements. &lt;/p&gt; &lt;p class="wikiPara"&gt; As we still have quite a few open issues remaining for the Seam 3.1 release, we will likely release another beta in the next couple of weeks. We want this release to be rock solid, so please try out the beta and let us know if you find any problems.&lt;/p&gt;&lt;p class="wikiPara"&gt;&lt;i&gt;(Article copied verbatim from &lt;a href="http://in.relation.to/Bloggers/Seam31Beta4Released"&gt;in.relation.to&lt;/a&gt;)&lt;/i&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="wikiPara"&gt;To learn more about &lt;b&gt;Java Web Development&lt;/b&gt; using &lt;b&gt;Java EE 6&lt;/b&gt;, I highly recommend &lt;a href="http://www.amazon.com/gp/product/0137081855/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=springjavaee-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0137081855" target="_blank"&gt;&lt;b&gt;The Java EE 6 Tutorial: Basic Concepts (4th Edition)&lt;/b&gt; (Java Series) by Eric Jendrock, Ian Evans, Devika Gollapudi and Kim Haase&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-1977874726078051983?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/1977874726078051983/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2011/10/seam-framework-java-ee-library-version.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/1977874726078051983?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/1977874726078051983?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2011/10/seam-framework-java-ee-library-version.html" title="Seam Framework Java EE Library version 3.1.0.Beta4 Released" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;C0ADSXo6fCp7ImA9WhdbFEo.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-2021023723891641436</id><published>2011-09-30T04:43:00.000-07:00</published><updated>2011-10-12T19:09:38.414-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-12T19:09:38.414-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Java Web Development" /><title>m2e/m2eclipse-wtp 0.14.0 Released: Eclipse IDE Integration for Java EE 6 / Web Application Maven projects</title><content type="html">&lt;div class="jive-rendered-content"&gt;
&lt;b&gt;Maven
 Integration for Eclipse WTP 0.14.0, a.k.a m2eclipse-wtp, a.k.a m2e-wtp&lt;/b&gt; 
is out the door. This new release brings its share of new features and 
enhancements, as well as a bunch of bug fixes. The complete release 
notes are available &lt;a class="jive-link-external-small" href="https://issues.sonatype.org/secure/ReleaseNote.jspa?projectId=10310&amp;amp;version=11250"&gt;here&lt;/a&gt;. &lt;br /&gt;
&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
m2e-wtp
 0.14.0 works with Eclipse Helios and Indigo, requires at least m2e 1.0 
and mavenarchiver plugin &amp;gt; 0.14.0 (0.15.0 should be automatically 
installed). As usual, m2e-wtp can be installed from :&lt;br /&gt;
&lt;ul&gt;
&lt;li style="text-align: start;"&gt; the Maven Discovery mechanism : Window &amp;gt; Preferences &amp;gt; Maven &amp;gt; Discovery &amp;gt; Open catalog&lt;/li&gt;
&lt;li style="text-align: start;"&gt; the &lt;a class="jive-link-external-small" href="http://marketplace.eclipse.org/content/maven-integration-eclipse-wtp"&gt;Eclipse Marketplace&lt;/a&gt; : Help &amp;gt; Eclipse Marketplace&lt;/li&gt;
&lt;li style="text-align: start;"&gt; the update site : &lt;b&gt;&lt;a class="jive-link-external-small" href="http://download.jboss.org/jbosstools/updates/m2eclipse-wtp/"&gt;http://download.jboss.org/jbosstools/updates/m2eclipse-wtp/&lt;/a&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
So &lt;span id="internal-source-marker_0.6966659519821405"&gt;what's new and noteworthy in 0.14.0? Let's see :&lt;/span&gt;&lt;br /&gt;
&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;

&lt;span style="color: #666699;"&gt;New support for Application Client projects&lt;/span&gt;&lt;/h3&gt;
Application Client packaging has been introduced with the new &lt;a class="jive-link-external-small" href="http://maven.apache.org/plugins/maven-acr-plugin/"&gt;maven-acr-plugin&lt;/a&gt;. Support for app-client type dependencies has been &lt;a class="jive-link-external-small" href="http://jira.codehaus.org/browse/MEAR-137"&gt;added in maven-ear-plugin 2.6&lt;/a&gt;.
 Since Application Client projects are natively supported in WTP, we 
added a new configurator for app-client projects. When an app-client 
project is imported / configured via m2e, the Application Client Facet 
will be automatically installed, its version inferred from the contents 
of META-INF/application-client.xml. Filtering of the deployment 
descriptor is supported.&lt;br /&gt;
&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-xml"&gt;&lt;span class="jive-xml-tag"&gt;&amp;lt;plugin&amp;gt;&lt;/span&gt;
&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.maven.plugins&lt;span class="jive-xml-tag"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;maven-acr-plugin&lt;span class="jive-xml-tag"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;1.0&lt;span class="jive-xml-tag"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;extensions&amp;gt;&lt;/span&gt;true&lt;span class="jive-xml-tag"&gt;&amp;lt;/extensions&amp;gt;&lt;/span&gt;
&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;configuration&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;archive&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;manifest&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;mainClass&amp;gt;&lt;/span&gt;foo.bar.appclient.Main&lt;span class="jive-xml-tag"&gt;&amp;lt;/mainClass&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;/manifest&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;/archive&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;filterDeploymentDescriptor&amp;gt;&lt;/span&gt;true&lt;span class="jive-xml-tag"&gt;&amp;lt;/filterDeploymentDescriptor&amp;gt;&lt;/span&gt;
&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;/configuration&amp;gt;&lt;/span&gt;
&lt;span class="jive-xml-tag"&gt;&amp;lt;/plugin&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href="http://community.jboss.org/servlet/JiveServlet/showImage/38-4192-17064/appclient.png"&gt;&lt;img alt="appclient.png" class="jive-image-thumbnail jive-image" height="252" src="http://community.jboss.org/servlet/JiveServlet/downloadImage/38-4192-17064/450-252/appclient.png" width="450" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;

&lt;span style="color: #666699;"&gt;New support for Web Fragment projects&lt;/span&gt;&lt;/h3&gt;
If
 a project contains a META-INF/web-fragment.xml in it's compilation 
output folder, the Web Fragment Facet is automatically installed upon 
maven project configuration (the Utility Facet is removed if necessary).
 Note that, as per the Java EE6 spec - and WTP is very picky about it-, 
Web Fragment projects *must* use Java 1.6. Failure to comply will fail 
the configuration and an error marker will be displayed.&lt;br /&gt;
&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href="http://community.jboss.org/servlet/JiveServlet/showImage/38-4192-17065/webfragment.png"&gt;&lt;img alt="webfragment.png" class="jive-image-thumbnail jive-image" height="252" src="http://community.jboss.org/servlet/JiveServlet/downloadImage/38-4192-17065/450-252/webfragment.png" width="450" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;

&lt;span style="color: #666699;"&gt;The use of target/m2e-wtp/web-resources is now optional&lt;/span&gt;&lt;/h3&gt;
&lt;div id="wiki-content"&gt;
Remember, &lt;code&gt;target/m2e-wtp/web-resources/&lt;/code&gt;&lt;a class="jive-link-external-small" href="https://github.com/sonatype/m2eclipse-wtp/wiki/What-is-this-web-resources-folder%3F"&gt; is used to allow the deployment of automatically generated web resources with WTP&lt;/a&gt;.&lt;/div&gt;
&lt;div id="template"&gt;
On some occasions however, having &lt;code&gt;target/m2e-wtp/web-resources/&lt;/code&gt; might cause some troubles (incompatibilities with WTP editors, &lt;a class="jive-link-external-small" href="https://issues.sonatype.org/browse/MECLIPSEWTP-136"&gt;IBM RAD&lt;/a&gt;, &lt;a class="jive-link-external-small" href="https://issues.sonatype.org/browse/MECLIPSEWTP-180"&gt;using Servlet.getRealPath(...)&lt;/a&gt; in your code). &lt;br /&gt;
As a workaround, you can choose to not use &lt;code&gt;target/m2e-wtp/web-resources/&lt;/code&gt;
 and generate the pom.properties and MANIFEST.MF files in your source 
directory instead (It'll be your responsibility to add these files to 
your SCM ignore list).&lt;br /&gt;
In order to remove &lt;code&gt;target/m2e-wtp/web-resources/&lt;/code&gt; from the list of deployed folders, you need to change some preferences :&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;on
 your project only : right-click on the project &amp;gt; Properties &amp;gt; 
Maven &amp;gt; WTP : check "Enable Project Specific Settings" and uncheck 
"Maven Archiver generates files under the build directory"&lt;/li&gt;
&lt;li&gt;on 
the whole workspace : Window &amp;gt; Preferences &amp;gt; Maven &amp;gt; WTP : 
uncheck "Maven Archiver generates files under the build directory"&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href="http://community.jboss.org/servlet/JiveServlet/showImage/38-4192-17067/war-preferences.png"&gt;&lt;img alt="war-preferences.png" class="jive-image-thumbnail jive-image" height="400" src="http://community.jboss.org/servlet/JiveServlet/downloadImage/38-4192-17067/450-400/war-preferences.png" width="450" /&gt;&lt;/a&gt;&lt;br /&gt;
Please note that &lt;b&gt;this setting will be overridden if web resource filtering is in use&lt;/b&gt;, that is if the maven-war-plugin &lt;a class="jive-link-external-small" href="http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html"&gt;configuration&lt;/a&gt; declares &lt;code&gt;&amp;lt;webResources&amp;gt;&lt;/code&gt; or sets &lt;code&gt;&amp;lt;filterDeploymentDescriptor&amp;gt;&lt;/code&gt;
 to true. The reason is simple : you don't want to see your source files
 overwritten by the filtering mechanism (and it would also lead to some 
not-so-funny build loops). &lt;br /&gt;
&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;

&lt;span style="color: #666699;"&gt;Custom file name mapping for web project dependencies&lt;/span&gt;&lt;/h3&gt;
Since the maven-war-plugin allows file name customization for librairies and TLDs, based on patterns (&lt;a class="jive-link-external-small" href="http://maven.apache.org/plugins/maven-war-plugin/examples/file-name-mapping.html"&gt;http://maven.apache.org/plugins/maven-war-plugin/examples/file-name-mapping.html)&lt;/a&gt;, we added the the same feature in m2e-wtp. That will allow you to use a version-less name mapping for dependencies, like :&lt;br /&gt;
&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre ___default_attr="xml" class="jive_text_macro jive_macro_code"&gt;&lt;div class="line" id="LC16"&gt;
&lt;span class="nt"&gt;&amp;lt;plugin&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line" id="LC17"&gt;
&amp;nbsp; &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.maven.plugins&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line" id="LC18"&gt;
&amp;nbsp; &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;maven-war-plugin&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line" id="LC19"&gt;
&amp;nbsp; &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;2.1.1&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line" id="LC20"&gt;
&amp;nbsp; &lt;span class="nt"&gt;&amp;lt;configuration&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line" id="LC21"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="nt"&gt;&amp;lt;outputFileNameMapping&amp;gt;&lt;/span&gt;@{groupId}@-@{artifactId}@.@{extension}@&lt;span class="nt"&gt;&amp;lt;/outputFileNameMapping&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line" id="LC22"&gt;
&lt;span class="nt"&gt;&amp;nbsp; &amp;lt;/configuration&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line" id="LC23"&gt;
&lt;span class="nt"&gt;&amp;lt;/plugin&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/pre&gt;
&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
The
 trick here is, in order to support non default filename mappings of 
dependencies listed in the Maven Library, the artifact is copied to the 
build directory (the target/ folder by default) under its new name. So 
if you happen to run a clean build of your project, wiping out that 
directory, you will need to manually run "Maven &amp;gt; Update Project 
configuration" on your project.&lt;br /&gt;
&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;

&lt;span style="color: #666699;"&gt;Option to not publish overlay changes automatically&lt;/span&gt;&lt;/h3&gt;
In
 order to support publishing of overlay changes automatically, m2e-wtp 
aggressively cleared the cache of the servers your application is 
deployed to. However, The overlay feature still being in an experimental
 state, we decided to be more conservative with regard to server 
publishing, so a new "Automatically republish servers on overlay 
modification" preference has been added to &lt;b&gt;Window &amp;gt; Preferences &amp;gt; Server &amp;gt; Overlays&lt;/b&gt;. &lt;br /&gt;
&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href="http://community.jboss.org/servlet/JiveServlet/showImage/38-4192-17066/overlay-republishing-preference.png"&gt;&lt;img alt="overlay-republishing-preference.png" class="jive-image-thumbnail jive-image" height="394" src="http://community.jboss.org/servlet/JiveServlet/downloadImage/38-4192-17066/450-394/overlay-republishing-preference.png" width="450" /&gt;&lt;/a&gt;&lt;br /&gt;
Overlays support is not bound to Maven, that's why it's under the Server preferences.&lt;br /&gt;
&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;

&lt;span style="color: #666699;"&gt;Support for the new tag="defaultRootSource" introduced in WTP 3.3.1&lt;/span&gt;&lt;/h3&gt;
When
 several source folders are declared in the 
.settings/org.eclipse.wst.common.component file, WTP prior to 3.3.1 
(Indigo SR1) tended to generate files (web.xml, faces-config.xml, ...) 
in the first folder it found. Since web projects define &lt;i&gt;target/m2e-wtp/web-resources&lt;/i&gt; as the first source folder (&lt;i&gt;target/m2e-wtp/ear-resources/&lt;/i&gt;
 for EAR projects), that would cause some issues. In WTP 3.3.1, a new 
tag has been introduced, designed to indicate which source folder should
 be used by default, when files need to be looked for / generated. 
m2e-wtp now adds this tag when WTP 3.3.1 is installed : &lt;br /&gt;
&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-xml"&gt;&lt;span class="jive-xml-tag"&gt;&amp;lt;project-modules id="moduleCoreId" project-version="1.5.0"&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;wb-module deploy-name="web-0.0.1-SNAPSHOT"&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;property name="context-root" value="multi-web"/&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;property name="java-output-path" value="/multi-web/target/classes"/&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;/wb-module&amp;gt;&lt;/span&gt;
&lt;span class="jive-xml-tag"&gt;&amp;lt;/project-modules&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;

&lt;span style="color: #666699;"&gt;A bit of documentation&lt;/span&gt;&lt;/h3&gt;
As many projects, unfortunately, m2e-wtp doesn't shine in the documentation area. I've been using the github Wiki (&lt;a class="jive-link-external-small" href="https://github.com/sonatype/m2eclipse-wtp/wiki" target="_blank"&gt;https://github.com/sonatype/m2eclipse-wtp/wiki&lt;/a&gt;)
 to start a relatively modest FAQ. I'm planning on adding more content 
in the near future, but I'm also hoping the community at large will want
 to contribute some docs of its own. You just need a github account to 
be able to edit the Wiki.&lt;br /&gt;
&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
As always, if you find any issue, please open a bug report at &lt;a class="jive-link-external-small" href="https://issues.sonatype.org/browse/MECLIPSEWTP"&gt;https://issues.sonatype.org/browse/MECLIPSEWTP&lt;/a&gt; (and don't forget to attach some test projects). &lt;br /&gt;
&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
Happy coding.&lt;br /&gt;
&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
Fred.&lt;br /&gt;
&lt;a class="jive-link-external-small" href="https://twitter.com/#%21/fbricon"&gt;https://twitter.com/#!/fbricon&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
(the article above is copied verbatim from &lt;a href="http://planet.jboss.org/post/m2e_clipse_wtp_0_14_0_new_noteworthy"&gt;Planet JBoss&lt;/a&gt;)&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
Hendy's personal note:&lt;br /&gt;To learn more about &lt;b&gt;Java Web Development&lt;/b&gt; using &lt;b&gt;Eclipse&lt;/b&gt; &lt;b&gt;IDE&lt;/b&gt; and &lt;b&gt;Java EE 6&lt;/b&gt;, I highly recommend&amp;nbsp;&lt;a href="http://www.amazon.com/gp/product/0137081855/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=springjavaee-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0137081855" target="_blank"&gt;&lt;b&gt;The Java EE 6 Tutorial: Basic Concepts (4th Edition)&lt;/b&gt;&amp;nbsp;(Java Series) by Eric Jendrock, Ian Evans, Devika Gollapudi and Kim Haase&lt;/a&gt;.&lt;/blockquote&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-2021023723891641436?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/2021023723891641436/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2011/09/m2em2eclipse-wtp-0140-released-eclipse.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/2021023723891641436?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/2021023723891641436?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2011/09/m2em2eclipse-wtp-0140-released-eclipse.html" title="m2e/m2eclipse-wtp 0.14.0 Released: Eclipse IDE Integration for Java EE 6 / Web Application Maven projects" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>4</thr:total></entry><entry gd:etag="W/&quot;C0ENQXgycSp7ImA9WhdbFEo.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-3080773582456808088</id><published>2011-09-19T09:15:00.001-07:00</published><updated>2011-10-12T19:08:10.699-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-12T19:08:10.699-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Java EE Development" /><title>JBoss Tools 3.3.0.M3 Released: Eclipse Plug-ins for Java EE 6 + JSF 2.0 Web Development</title><content type="html">&lt;div class='posterous_autopost'&gt;&lt;p&gt;It&amp;#39;s time for a new fresh milestone update of JBoss Tools:&lt;/p&gt;&lt;p&gt;&lt;a href="http://community.jboss.org/servlet/JiveServlet/showImage/38-4159-17004/grease_jboss_tools.png"&gt;&lt;img class="jive-image" src="http://community.jboss.org/servlet/JiveServlet/downloadImage/38-4159-17004/450-165/grease_jboss_tools.png" height="165" alt="grease_jboss_tools.png" width="450" style="display: block; margin-left: auto; margin-right: auto;" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;h4 style="color: #333333; font-weight: bold; padding-top: 10px; padding-right: 0pt; padding-bottom: 4px; padding-left: 0pt; font-size: 13pt; text-align: center; margin: 0pt;"&gt;3.3 M3 (Greased Lightning)&lt;/h4&gt;&lt;p style="text-align: center; padding: 0pt; margin: 0pt;"&gt; [&lt;a href="http://www.jboss.org/tools/download/dev" class="jive-link-external-small" target="_top"&gt;Download&lt;/a&gt;] [&lt;a href="http://download.jboss.org/jbosstools/updates/development/indigo/" class="jive-link-external-small"&gt;Update Site&lt;/a&gt;] [&lt;a href="http://docs.jboss.org/tools/whatsnew" class="jive-link-external-small" target="_top"&gt;What&amp;#39;s New&lt;/a&gt;] [&lt;a href="http://www.jboss.com/index.html?module=bb&amp;amp;op=viewforum&amp;amp;f=201" class="jive-link-external-small" target="_top"&gt;Forums&lt;/a&gt;] [&lt;a href="http://jira.jboss.com/jira/browse/JBIDE" class="jive-link-external-small" target="_top"&gt;JIRA&lt;/a&gt;] [&lt;a href="http://twitter.com/jbosstools" class="jive-link-external-small" target="_top"&gt;Twitter&lt;/a&gt;]&lt;/p&gt; &lt;p style="height: 8pt; padding: 0px;"&gt; &lt;/p&gt;&lt;p style="height: 8pt; padding: 0px;"&gt; &lt;/p&gt;&lt;p&gt;&lt;b&gt;JBoss Tools&lt;/b&gt; is a set of &lt;b&gt;plugins for Eclipse Java IDE&lt;/b&gt; that complements, enhances and goes beyond the support that exist for JBoss and related technologies in the default Eclipse distribution. For this release we continue to move &lt;b&gt;Maven, CDI, Java EE 6&lt;/b&gt; support forward and also add in a few new &amp;quot;surprise&amp;quot; features. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;To know more about &lt;b&gt;Java EE 6&lt;/b&gt;, I highly recommend &lt;a href="http://www.amazon.com/gp/product/0137081855/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=springjavaee-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0137081855" target="_blank"&gt;&lt;b&gt;The Java EE 6 Tutorial: Basic Concepts (4th Edition)&lt;/b&gt; (Java Series) by Eric Jendrock, Ian Evans, Devika Gollapudi and Kim Haase&lt;/a&gt;. &lt;/p&gt; &lt;p&gt;&lt;br /&gt; &lt;/p&gt; &lt;h2&gt;Installation&lt;/h2&gt;&lt;p style="height: 8pt; padding: 0px;"&gt; &lt;/p&gt;&lt;p&gt;As always, get and install &lt;a href="http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/indigor" class="jive-link-external-small"&gt;&lt;span class="jive-link-external-small"&gt;Eclipse 3.7 (Indigo) JEE bundle&lt;/span&gt;&lt;/a&gt; - with the JEE bundle you majority of the dependencies letting you save bandwidth:&lt;/p&gt; &lt;p style="height: 8pt; padding: 0px;"&gt; &lt;/p&gt;&lt;p&gt;Once you have installed Eclipse, you either find us on&lt;a href="http://marketplace.eclipse.org/content/jboss-tools-indigo" class="jive-link-external-small"&gt; Eclipse Marketplace under &amp;quot;JBoss Tools (Indigo)&amp;quot;&lt;/a&gt; or use our update site directly.&lt;/p&gt; &lt;p style="height: 8pt; padding: 0px;"&gt; &lt;/p&gt;&lt;p&gt;The updatesite URL to use from Help &amp;gt; Install New Software... is:&lt;/p&gt;&lt;p style="height: 8pt; padding: 0px;"&gt; &lt;/p&gt;&lt;p /&gt; &lt;p&gt;&lt;a href="http://download.jboss.org/jbosstools/updates/development/indigo/" class="jive-link-external-small"&gt;http://download.jboss.org/jbosstools/updates/development/indigo/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family: arial, helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3&gt;Maven Profile Selection&lt;/h3&gt;&lt;p&gt;In this release we&amp;#39;ve therefore included an UI which allows you to easily set/change the profiles on single and multiple projects. &lt;/p&gt;&lt;p style="height: 8pt; padding: 0px;"&gt; &lt;/p&gt;&lt;p&gt;This is especially something that becomes useful when you use Arquillian where it is a common practice to use Maven profiles to toggle the various dependency sets for each server you wish to test against.&lt;/p&gt;&lt;p style="height: 8pt; padding: 0px;"&gt; &lt;/p&gt;&lt;p&gt;It works by you selecting the relevant project(s), press &lt;strong&gt;Ctrl+Alt+P&lt;/strong&gt; or use &lt;strong&gt;Maven &amp;gt; Select Maven Profiles... &lt;/strong&gt;and a dialog box appears allowing you to enable/disable the available profiles for the project(s):&lt;/p&gt; &lt;p style="height: 8pt; padding: 0px;"&gt; &lt;/p&gt;&lt;p&gt;&lt;a href="http://community.jboss.org/servlet/JiveServlet/showImage/38-4159-16994/maven-profile-selection-single-project.jpg"&gt;&lt;img class="jive-image-thumbnail jive-image" src="http://community.jboss.org/servlet/JiveServlet/downloadImage/38-4159-16994/450-298/maven-profile-selection-single-project.jpg" height="298" alt="maven-profile-selection-single-project.jpg" width="450" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="height: 8pt; padding: 0px;"&gt; &lt;/p&gt;&lt;h3&gt;Easier Remote Debugging&lt;/h3&gt;&lt;p&gt;Ever been tired of having to manually configure ports, projects and source path lookups for debugging on Remote Applications in Eclipse ?&lt;/p&gt;&lt;p style="height: 8pt; padding: 0px;"&gt; &lt;/p&gt;&lt;p&gt;We are, especially after we learned that JVM&amp;#39;s running on Hotspot provides API to discover such applications and allow for easy configuration of your debugger. In this release we&amp;#39;ve thus added a command available from &lt;strong&gt;Debug As... &amp;gt; Remote Java Application&lt;/strong&gt;... in the context menu on any set of resources.&lt;/p&gt;&lt;p style="height: 8pt; padding: 0px;"&gt; &lt;/p&gt;&lt;p&gt;Once you select this command, we use the Hotspot API to discover the remote running applications, allows you to select which you application want to connect to and then we do the tedious work of configuring the ports, names and source code lookups (including maven dependencies if applicable) for your Remote debugging. &lt;/p&gt;&lt;p style="height: 8pt; padding: 0px;"&gt; &lt;/p&gt;&lt;p&gt;&lt;a href="http://community.jboss.org/servlet/JiveServlet/showImage/38-4159-16996/remote-debugging2.png"&gt;&lt;img class="jive-image-thumbnail jive-image" src="http://community.jboss.org/servlet/JiveServlet/downloadImage/38-4159-16996/450-206/remote-debugging2.png" height="206" alt="remote-debugging2.png" width="450" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;No need for manual tweaking anymore.&lt;/p&gt;&lt;p style="height: 8pt; padding: 0px;"&gt; &lt;/p&gt;&lt;p&gt;Thanks to &lt;a href="http://community.jboss.org/people/aslak" class="jive-link-profile-small"&gt;Aslak Knutsen&lt;/a&gt; for bringing us the idea and initial code to make this happen!&lt;/p&gt; &lt;p style="height: 8pt; padding: 0px;"&gt; &lt;/p&gt;&lt;h3&gt;Running Server Detection&lt;/h3&gt;&lt;p&gt;The server adapters now attempt to detect if a server is already running to avoid port conflicts and UI inconcistencies. If a server is detected running you are shown a dialog allowing you to choose to either have the server adapter assume it is already running or force the launch anyway.&lt;/p&gt;&lt;p style="height: 8pt; padding: 0px;"&gt; &lt;/p&gt;&lt;p&gt;&lt;a href="http://community.jboss.org/servlet/JiveServlet/showImage/38-4159-17003/server-already-running.png"&gt;&lt;img class="jive-image" src="http://community.jboss.org/servlet/JiveServlet/downloadImage/38-4159-17003/450-197/server-already-running.png" height="197" alt="server-already-running.png" width="450" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;CDI &amp;amp; Seam Solder&lt;/h3&gt;&lt;p&gt;The CDI tooling adds a bunch of quickfixes to have JBoss Tools fix common issues. To aid in searching and navigating your CDI application, Find References (&lt;strong&gt;Ctrl+Shift+G&lt;/strong&gt;) will now show the full list of injection points and EL usage of your beans and Seam Solder and Config annotations and XML now have easy hyperlink navigation to it&amp;#39;s declarations.&lt;/p&gt;&lt;h3&gt;@ManagedBean&amp;#39;s &lt;/h3&gt;&lt;p&gt;The JSF tooling now detects @ManagedBean annotations. This avoids false warnings/errors when importing JSF 2 examples. Do consider using @Named instead for better integration into the JavaEE stack. &lt;/p&gt;&lt;p style="height: 8pt; padding: 0px;"&gt; &lt;/p&gt;&lt;h3&gt;SAR Projects&lt;/h3&gt;&lt;p&gt;For a long time we have been asked about providing support for SAR style projects for use on older versions of JBoss AS. This style of project packaging is now supported both in pure WTP style projects and via Maven.&lt;/p&gt;&lt;p style="height: 8pt; padding: 0px;"&gt; &lt;/p&gt;&lt;h3&gt;GWT Tools are back&lt;/h3&gt;&lt;p&gt;Since last time, Google released their GWT eclipse plugin in a version that supports Eclipse 3.7 allowing us to reenable the GWT Tools.&lt;/p&gt;&lt;p style="height: 8pt; padding: 0px;"&gt; &lt;/p&gt;&lt;h3&gt;And more...&lt;/h3&gt;&lt;p&gt;There are additional bugfixes and more features to browse over at &lt;a href="http://docs.jboss.org/tools/whatsnew/" class="jive-link-external-small"&gt;What&amp;#39;s New &amp;amp; Noteworthy&lt;/a&gt;&lt;/p&gt; &lt;p style="height: 8pt; padding: 0px;"&gt; &lt;/p&gt;&lt;p&gt;Like the new features ? Leave a comment to let us know!&lt;/p&gt;&lt;p style="height: 8pt; padding: 0px;"&gt; &lt;/p&gt;&lt;p&gt;And by all means, &lt;/p&gt;&lt;p&gt;Have fun!&lt;/p&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;To know more about &lt;b&gt;Java EE 6&lt;/b&gt;, I highly recommend &lt;a href="http://www.amazon.com/gp/product/0137081855/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=springjavaee-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0137081855" target="_blank"&gt;&lt;b&gt;The Java EE 6 Tutorial: Basic Concepts (4th Edition)&lt;/b&gt; (Java Series) by Eric Jendrock, Ian Evans, Devika Gollapudi and Kim Haase&lt;/a&gt;. &lt;/p&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;(Article reblogged from &lt;a href="http://community.jboss.org/en/tools/blog/2011/09/19/adding-some-grease-to-jboss-tools-33-m3"&gt;JBoss Tools blog&lt;/a&gt;)&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-3080773582456808088?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/3080773582456808088/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2011/09/jboss-tools-330m3-released-eclipse-plug.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/3080773582456808088?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/3080773582456808088?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2011/09/jboss-tools-330m3-released-eclipse-plug.html" title="JBoss Tools 3.3.0.M3 Released: Eclipse Plug-ins for Java EE 6 + JSF 2.0 Web Development" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;C0ENQXgzeSp7ImA9WhdbFEo.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-1239566363291291025</id><published>2011-08-03T20:08:00.001-07:00</published><updated>2011-10-12T19:08:10.681-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-12T19:08:10.681-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Java EE Development" /><title>How to Fix Ant Build Error: "Could not load a dependent class com/jcraft/jsch/Logger. It is not enough to have Ant's optional JARs"</title><content type="html">&lt;div class='posterous_autopost'&gt;If you get an &lt;b&gt;error message&lt;/b&gt; like this while running a &lt;b&gt;problematic Ant build script file&lt;/b&gt; :&lt;p /&gt;&lt;div style="margin-left: 40px;"&gt;remote.flush:&lt;p /&gt;BUILD FAILED&lt;br /&gt;/home/ceefour/git/magento-id/build.xml:13: The following error occurred while executing this line:&lt;br /&gt; /home/ceefour/git/magento-id/build.xml:22: Problem: failed to create task or type sshexec&lt;br /&gt;Cause: Could not load a dependent class com/jcraft/jsch/Logger&lt;br /&gt;       It is not enough to have Ant&amp;#39;s optional JARs&lt;br /&gt;       you need the JAR files that the optional tasks depend upon.&lt;br /&gt;        Ant&amp;#39;s optional task dependencies are listed in the manual.&lt;br /&gt;Action: Determine what extra JAR files are needed, and place them in one of:&lt;br /&gt;        -/home/opt/eclipse_web/plugins/org.apache.ant_1.8.2.v20110505-1300/lib&lt;br /&gt;         -/home/ceefour/.ant/lib&lt;br /&gt;        -a directory added on the command line with the -lib argument&lt;p /&gt;Do not panic, this is a common problem.&lt;br /&gt;The commonest cause is a missing JAR.&lt;p /&gt;This is not a bug; it is a configuration problem&lt;br /&gt; &lt;/div&gt;&lt;br /&gt;It means your &lt;b&gt;Ant build script file&lt;/b&gt; using &lt;b&gt;optional Ant libraries&lt;/b&gt; and need to tell &lt;b&gt;Ant&lt;/b&gt; where to find them.&lt;p /&gt;In my case, it needs &lt;b&gt;jsch.jar&lt;/b&gt; aka &lt;b&gt;libjsch-java&lt;/b&gt; package in &lt;b&gt;Debian/Ubuntu Linux&lt;/b&gt;.&lt;p /&gt; First you need to install &lt;b&gt;ant-optional&lt;/b&gt; package for Ant &lt;b&gt;optional libraries support &lt;/b&gt;:&lt;br /&gt;&lt;span style="font-family: courier new,monospace;"&gt;sudo apt-get install ant-optional&lt;/span&gt;&lt;p /&gt;Then the &lt;b&gt;libjsch-java Debian/Ubuntu package&lt;/b&gt;:&lt;br /&gt; &lt;span style="font-family: courier new,monospace;"&gt;sudo apt-get install libjsch-java&lt;/span&gt;&lt;p /&gt; Then put it in correct directories so that Ant can find them :&lt;p /&gt;&lt;code&gt;&lt;/code&gt;&lt;span style="font-family: courier new,monospace;"&gt;sudo ln -s /usr/share/java/jsch.jar /usr/share/ant/lib/&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;mkdir -vp ~/.ant/lib&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;ln -s /usr/share/java/jsch.jar ~/.ant/lib/&lt;/span&gt;&lt;p /&gt; Ubuntu&amp;#39;s &lt;b&gt;Ant&lt;/b&gt; look for libraries in &lt;span style="font-family: courier new,monospace;"&gt;/usr/share/ant/lib&lt;/span&gt; folder, while Eclipse IDE&amp;#39;s Ant look for &lt;b&gt;optional Ant libraries&lt;/b&gt; in &lt;span style="font-family: courier new,monospace;"&gt;$HOME/.ant/lib&lt;/span&gt; folder.&lt;p /&gt; Note that for &lt;b&gt;Eclipse IDE&lt;/b&gt;, you may need to refresh &lt;b&gt;Eclipse Ant Plug-in&amp;#39;s Runtime Classpath&lt;/b&gt;, by going to 	 	 	 	 Window &amp;gt; Preferences &amp;gt; Ant &amp;gt; Runtime, and clicking &amp;quot;Restore Defaults&amp;quot;.&lt;br /&gt;Make sure that the required libraries are now listed under &amp;quot;Global Entries&amp;quot;.&lt;p /&gt;&lt;b&gt;Ant build system&lt;/b&gt; is frequently used in typical &lt;i&gt;Java EE 6 enterprise application development&lt;/i&gt;. I highly recommend &lt;a href="http://www.amazon.com/gp/product/0137081855/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=springjavaee-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0137081855" target="_blank"&gt;&lt;b&gt;The Java EE 6 Tutorial: Basic Concepts (4th Edition)&lt;/b&gt;&lt;/a&gt; for a practical guide to the &lt;b&gt;Java EE 6 technology&lt;/b&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-1239566363291291025?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/1239566363291291025/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2011/08/how-to-fix-ant-build-error-not-load.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/1239566363291291025?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/1239566363291291025?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2011/08/how-to-fix-ant-build-error-not-load.html" title="How to Fix Ant Build Error: &amp;quot;Could not load a dependent class com/jcraft/jsch/Logger. It is not enough to have Ant&amp;#39;s optional JARs&amp;quot;" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0ENQXgyfSp7ImA9WhdbFEo.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-2943691307815683483</id><published>2011-07-12T07:20:00.001-07:00</published><updated>2011-10-12T19:08:10.695-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-12T19:08:10.695-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Java EE Development" /><title>JBoss AS 7.0 Final Version Released, Lighting Fast &amp; Configurable Java EE 6 Web Application Server</title><content type="html">&lt;div class='posterous_autopost'&gt;There have been many highs in my career and many of those have happened since I joined JBoss and &lt;a href="http://community.jboss.org/blogs/mark.little/2010/12/12/nearly-two-years-on" class="jive-link-blog-small"&gt;took over from Sacha&lt;/a&gt;. But today has to be in my top 1 or 2 ever! Today we can officially announce the release of &lt;a href="http://www.jboss.org/as7" class="jive-link-external-small"&gt;JBossAS 7.0 Final&lt;/a&gt;! And it&amp;#39;s EE6 Web Profile compliant too, so check out the &lt;a href="http://www.jboss.org/as7" class="jive-link-external-small"&gt;project pages&lt;/a&gt;. It&amp;#39;s &lt;a href="http://community.jboss.org/blogs/mark.little/2010/12/16/the-jbossas-team-rock" class="jive-link-blog-small"&gt;taken us a while to get here&lt;/a&gt; and we&amp;#39;ve taken some pretty drastic and &lt;a href="http://community.jboss.org/blogs/mark.little/2010/12/24/jbossas-600-goes-final" class="jive-link-blog-small"&gt;innovative steps&lt;/a&gt; along the way. Sometimes those decisions haven&amp;#39;t been ease to make and we&amp;#39;ve thought long and hard about them. For instance, I recall Jason Greene, Scott Stark and I discussing for ages the various ramifications of continuing with the then current micro container architecture versus radical changes. The decision to change wasn&amp;#39;t easy, but even then well over a year ago, we believed it was the right one to make. And now, with the &lt;a href="http://community.jboss.org/blogs/mark.little/2011/06/04/jbossas-7-is-coming" class="jive-link-blog-small"&gt;new micro services container&lt;/a&gt;, it&amp;#39;s proven itself! Some risks are worth taking.&lt;p&gt;But not every problem on our path has been technical or come from within Red Hat. Without going into details, let&amp;#39;s just say that at times it seemed that processes and red tape were being thrown in our way. However, we got past these and the results speak for themselves: &lt;a href="http://community.jboss.org/blogs/mark.little/2011/07/05/independence-day" class="jive-link-blog-small"&gt;the fastest, most configurable and adaptable EE6 implementation (Web Profile) out there&lt;/a&gt;. And full EE6 is next on the roadmap, with JBossAS 7.1 due out soon. So if you haven&amp;#39;t already tried it I encourage you to download it and give it a try.&lt;/p&gt;&lt;p&gt;I want to take this opportunity to thank everyone who has been involved in the development of &lt;a href="http://www.jboss.org/as7.html" class="jive-link-external-small"&gt;JBossAS 7.0&lt;/a&gt;. This includes a diverse group of people including the projects, our QE teams, docs, support, product management, program management, marketing and many others. It would be impossible to single out those individuals who have stood out during the last 18 months since everyone has been a rockstar. However, I do want to mention Jason Greene again: any team is influenced both negatively or positively by it&amp;#39;s leader and Jason has lead most positively by example throughout. And of course Bruno Georges, the engineering manager, who took over the role just over a year ago and mustered his troops so well! See what I mean? It&amp;#39;s really hard to call out one person without immediately thinking of all of the others involved! A great team effort.&lt;/p&gt;&lt;p /&gt; &lt;div&gt; To know more about Java EE 6, I highly recommend &lt;a href="http://www.amazon.com/gp/product/0137081855/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=springjavaee-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0137081855" target="_blank"&gt;&lt;b&gt;The Java EE 6 Tutorial: Basic Concepts (4th Edition)&lt;/b&gt; (Java Series) by Eric Jendrock, Ian Evans, Devika Gollapudi and Kim Haase&lt;/a&gt;. &lt;/div&gt; &lt;p /&gt; &lt;div&gt; I also recommend &lt;a href="http://www.amazon.com/gp/product/0596158025/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=gauldong-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0596158025" target="_blank"&gt;&lt;b&gt;Enterprise JavaBeans 3.1&lt;/b&gt; by Andrew Lee Rubinger and Bill Burke&lt;/a&gt; for a thorough explanation on updated EJB 3.1 technology (including &lt;b&gt;interceptors&lt;/b&gt;).  You can &lt;a href="http://astore.amazon.com/springjavaee-20" target="_blank"&gt;find more &lt;b&gt;Java EE 6 Resources&lt;/b&gt; here&lt;/a&gt;.&lt;/div&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;(Article copied mostly verbatim from &lt;a href="http://community.jboss.org/blogs/mark.little/2011/07/12/jbossas-70-is-here"&gt;Mark Little&amp;#39;s announcement&lt;/a&gt;)&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-2943691307815683483?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/2943691307815683483/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2011/07/jboss-as-70-final-version-released.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/2943691307815683483?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/2943691307815683483?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2011/07/jboss-as-70-final-version-released.html" title="JBoss AS 7.0 Final Version Released, Lighting Fast &amp;amp; Configurable Java EE 6 Web Application Server" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0ENQXk5eSp7ImA9WhdbFEo.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-8145362589715077283</id><published>2011-06-23T11:23:00.001-07:00</published><updated>2011-10-12T19:08:10.721-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-12T19:08:10.721-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Java EE Development" /><title>Hot Deploy &amp; F5/Refresh-Driven Web Application Development Are Ancient Compared to Eclipse RAP!</title><content type="html">&lt;div class='posterous_autopost'&gt;&lt;div class='p_embed p_image_embed'&gt; &lt;a href="http://posterous.com/getfile/files.posterous.com/spring-java-ee/tsPoCwisnIMd65kiMCChyQ2Ncle3p6suLHYNBmM597yYIZGXL22Sjfdfyo03/eclipse-RAP-riena-hot-deploy-w.png"&gt;&lt;img alt="Eclipse-rap-riena-hot-deploy-w" height="400" src="http://posterous.com/getfile/files.posterous.com/spring-java-ee/q5hLiU84RbLISejy0hc7v8HixtdiN0iwadK789ApZ60h7RjAzOXqsfOEgpdx/eclipse-RAP-riena-hot-deploy-w.png.scaled.500.jpg" width="500" /&gt;&lt;/a&gt; &lt;/div&gt; &lt;p&gt;Most &lt;b&gt;web applications developer&lt;/b&gt; would be very familiar with &lt;b&gt;F5/Refresh-Driven&lt;/b&gt; development. You know, make a little change and press &lt;b&gt;F5&lt;/b&gt; in the &lt;b&gt;web browser&lt;/b&gt; and you can view the updated &lt;b&gt;page&lt;/b&gt;. This was the good old PHP days.&lt;p /&gt; &lt;b&gt;Java EE web application developers&lt;/b&gt; &lt;i&gt;used to&lt;/i&gt; not that lucky. While some changes like &lt;b&gt;JSP pages, JSF facelets,&lt;/b&gt; etc. take effect immediately (and thus, &amp;quot;&lt;b&gt;refresh-driven&amp;quot;),&lt;/b&gt; in some cases they have to &amp;quot;&lt;b&gt;redeploy&amp;quot;.&lt;/b&gt; This usually means developer changes a &lt;b&gt;Java class backing bean&lt;/b&gt; or an &amp;quot;important&amp;quot; file like web.xml. Redeploy means undeploying the web app from the Java EE container or application server, then redeploying the web app or WAR again. IDEs like the excellent &lt;b&gt;Eclipse IDE Indigo&lt;/b&gt; (yay!) automate this but a redeploy can take anything between a few seconds to... &lt;b&gt;minutes!&lt;/b&gt; I think typical web apps would deploy in about 20-30 seconds so that is &lt;b&gt;painful&lt;/b&gt;.&lt;p /&gt; &lt;a href="http://www.zeroturnaround.com/jrebel/"&gt;JRebel from ZeroTurnaround&lt;/a&gt; (which just won the &lt;a href="http://blogs.oracle.com/java/entry/jax_innovation_awards_2011"&gt;Most Innovative Java Technology in JAX Innovation Awards 2011&lt;/a&gt;, congratulations guys!) really helps here, by allowing most common changes to not cause a full redeploy, but just... &lt;b&gt;hot deploy&lt;/b&gt;! It&amp;#39;s like JSP/JSF but for the rest of Java app, Spring beans, etc. JRebel is a commercial plug-in but is definitely worth it.&lt;p /&gt; But I&amp;#39;d argue &lt;a href="http://www.eclipse.org/rap/"&gt;&lt;b&gt;Eclipse RAP&lt;/b&gt;&lt;/a&gt; should won the Most Innovative Java Technology title... Here&amp;#39;s why!&lt;p /&gt;(&lt;b&gt;Eclipse Rich Ajax Platform/RAP&lt;/b&gt; is framework to &lt;b&gt;develop AJAX-powered web applications&lt;/b&gt; easily based on &lt;i&gt;Eclipse RCP programming&lt;/i&gt; model, see &lt;a href="http://www.amazon.com/gp/product/0321603788/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=eclipsedriven-20&amp;amp;linkCode=as2&amp;amp;camp=217145&amp;amp;creative=399349&amp;amp;creativeASIN=0321603788"&gt;&lt;b&gt;Eclipse Rich Client Platform (2nd Edition)&lt;/b&gt;&lt;/a&gt; for more information.)&lt;p /&gt; I&amp;#39;ve just noticed something today. I know I should&amp;#39;ve noticed this long ago, but when you launch an &lt;b&gt;Eclipse RAP rich internet application&lt;/b&gt; from &lt;b&gt;Eclipse IDE&lt;/b&gt; using &lt;b&gt;Debug (F11 key)&lt;/b&gt;, &lt;b&gt;ALL&lt;/b&gt; your code changes take effect &lt;b&gt;immediately&lt;/b&gt;! No exceptions!&lt;p /&gt; &lt;b&gt;No need to even refresh the web browser!&lt;/b&gt;&lt;p /&gt;Change the code for a menu item or a view or an action, save the .java file, go to the browser and click it... &lt;b&gt;your new code is there!&lt;/b&gt;&lt;p /&gt;&lt;/p&gt;&lt;blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"&gt; &amp;quot;No refresh? But how can it be!&amp;quot;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Part of the magic is due to &lt;b&gt;OSGi Dynamic Module System&lt;/b&gt;, that is brilliantly integrated as part of the &lt;b&gt;Eclipse platform&lt;/b&gt; itself.&lt;p /&gt;So when you save a Java file, Eclipse IDE will compile your class (and only your class, due to incremental builder feature, so it&amp;#39;s &lt;b&gt;very&lt;/b&gt; &lt;i&gt;fas&lt;/i&gt;t!), then update the OSGi bundle or Eclipse plug-in in the Eclipse RAP application. And &lt;b&gt;only&lt;/b&gt; your bundle/plug-in is updated/refreshed in the application, so again, even if it&amp;#39;s a different process it&amp;#39;s also &lt;b&gt;very&lt;/b&gt; &lt;i&gt;fast&lt;/i&gt;. The whole process typically takes &lt;i&gt;less than a second&lt;/i&gt; on a typical developer workstation, even on moderately complex apps! Most of the time the process is already done before you have a chance to hit Alt+Tab. ;-)&lt;p /&gt; The other part of the magic is even though Eclipse RAP application comes with &lt;b&gt;full AJAX features&lt;/b&gt; by default (it&amp;#39;s not an option, it&amp;#39;s actually a requirement), most of the business logic is server-side Java. So even if the most of the render JavaScript/HTML presentation layer in the web browser, when you perform an action for example by clicking a menu item, this will trigger a server request...&lt;p /&gt; &lt;b&gt;Which means your updated code! Yay! :)&lt;/b&gt;&lt;p /&gt;Also important feature of Eclipse RAP is that for &lt;b&gt;background/long-running jobs&lt;/b&gt; or &lt;b&gt;&amp;quot;server push&amp;quot;&lt;/b&gt; operations, Eclipse RAP supports several approaches: &lt;a href="http://www.eclipse.org/forums/index.php/m/638245/?srch=push#msg_638245"&gt;Eclipse Jobs API or session-long UICallback&lt;/a&gt;.&lt;p /&gt; This is pretty much automatic if you&amp;#39;re already an Eclipse RCP programmer utilizing Jobs API. There&amp;#39;s no need to do workarounds and hacks like traditional AJAX web development or learn yet another new API (and programming model) just for server push.&lt;p /&gt; To learn more about &lt;b&gt;Eclipse platform programming&lt;/b&gt;, I highly recommend &lt;a href="http://www.amazon.com/gp/product/0321603788/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=eclipsedriven-20&amp;amp;linkCode=as2&amp;amp;camp=217145&amp;amp;creative=399349&amp;amp;creativeASIN=0321603788"&gt;&lt;b&gt;Eclipse Rich Client Platform (2nd Edition)&lt;/b&gt;&lt;/a&gt;. It&amp;#39;s really good for learning Eclipse RCP/RAP development, most of the things that apply to RCP also applies to RAP. In fact, you can &lt;i&gt;single-source&lt;/i&gt; an application to two target platforms (RCP for desktop, RAP for web) simultaneously. :-)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-8145362589715077283?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/8145362589715077283/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2011/06/hot-deploy-f5refresh-driven-web.html#comment-form" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/8145362589715077283?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/8145362589715077283?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2011/06/hot-deploy-f5refresh-driven-web.html" title="Hot Deploy &amp;amp; F5/Refresh-Driven Web Application Development Are Ancient Compared to Eclipse RAP!" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>5</thr:total></entry><entry gd:etag="W/&quot;C0ENQXk7cSp7ImA9WhdbFEo.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-6706636309411019940</id><published>2011-06-23T05:03:00.001-07:00</published><updated>2011-10-12T19:08:10.709-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-12T19:08:10.709-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Java EE Development" /><title>Eclipse Virgo IDE Tooling 1.0.0.M01 Released</title><content type="html">&lt;div class='posterous_autopost'&gt; &lt;p&gt;Martin Lippert from SpringSource &lt;a href="http://www.springsource.org/node/3161"&gt;announced&lt;/a&gt;:&lt;br /&gt;&lt;/p&gt;&lt;blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"&gt; &lt;p&gt;I am happy to announce that we &lt;b&gt;released&lt;/b&gt; the first &lt;b&gt;milestone build&lt;/b&gt; of the &lt;b&gt;Virgo IDE tooling&lt;/b&gt;. For installation instructions, please take a look at the this wiki page:&lt;br /&gt; &lt;a href="http://wiki.eclipse.org/Virgo/Tooling"&gt;http://wiki.eclipse.org/Virgo/Tooling&lt;/a&gt;&lt;/p&gt;&lt;p&gt;This is the first milestone build after the code contribution from SpringSource and there aren&amp;#39;t that much changes with regards to features or bugs in there compared to the latest &lt;b&gt;dm server tooling &lt;/b&gt;releases. But this will change from now on... :-)&lt;/p&gt; &lt;p&gt;Enjoy!&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://eclipse.org/virgo/"&gt;&lt;b&gt;Eclipse Virgo Web Server / Kernel&lt;/b&gt;&lt;/a&gt; is an &lt;b&gt;Enterprise OSGi web server&lt;/b&gt;, capable of serving &lt;b&gt;dynamic OSGi web applications&lt;/b&gt; via &lt;b&gt;OSGi Web Bundles (WABs)&lt;/b&gt;. It works with &lt;a href="http://www.eclipse.org/gemini/"&gt;&lt;b&gt;Eclipse Gemini&lt;/b&gt;&lt;/a&gt; project to provide &lt;b&gt;Java EE 6&lt;/b&gt; capabilities to &lt;b&gt;server-side OSGi applications&lt;/b&gt;.&lt;/p&gt; &lt;p&gt;For more in-depth explanation on using &lt;b&gt;OSGi&lt;/b&gt; for &lt;b&gt;enterprise applications&lt;/b&gt;, I highly recommend &lt;a href="http://www.amazon.com/gp/product/1933988916/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=eclipsedriven-20&amp;amp;linkCode=as2&amp;amp;camp=217145&amp;amp;creative=399349&amp;amp;creativeASIN=1933988916"&gt;&lt;b&gt;OSGi in Action: Creating Modular Applications in Java&lt;/b&gt;&lt;/a&gt;.&lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-6706636309411019940?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/6706636309411019940/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2011/06/eclipse-virgo-ide-tooling-100m01.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/6706636309411019940?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/6706636309411019940?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2011/06/eclipse-virgo-ide-tooling-100m01.html" title="Eclipse Virgo IDE Tooling 1.0.0.M01 Released" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0ENQXk6fCp7ImA9WhdbFEo.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-7853068778806014333</id><published>2011-06-21T08:21:00.001-07:00</published><updated>2011-10-12T19:08:10.714-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-12T19:08:10.714-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Java EE Development" /><title>Groovy-Eclipse 2.5.0 Plugin Released</title><content type="html">&lt;div class='posterous_autopost'&gt;&lt;span style="border-collapse: collapse; font-size: 13px; font-family: arial, sans-serif;"&gt;The SpringSource Tools Team is proud to &lt;b&gt;release &lt;a href="http://docs.codehaus.org/display/GROOVY/Eclipse+Plugin"&gt;Groovy-Eclipse plugin&lt;/a&gt; 2.5.0&lt;/b&gt;.&lt;/span&gt;&lt;p /&gt;&lt;div&gt;&lt;span style="border-collapse: collapse; font-size: 13px; font-family: arial, sans-serif;"&gt;In this release, we are most proud of our new &lt;a href="http://blog.springsource.com/2011/05/08/better-dsl-support-in-groovy-eclipse/" target="_blank" style="color: rgb(34, 68, 187);"&gt;DSL Descriptors&lt;/a&gt; (DSLDs) feature, which provides scriptable support for custom Domain Specific Languages in the &lt;b&gt;Groovy Editor&lt;/b&gt;. Additionally, this release includes &lt;b&gt;Groovy 1.8&lt;/b&gt; as an optional add on, better content assist and type inferencing, and a Groovier outline view. &lt;p /&gt; See all details on the &lt;a href="http://docs.codehaus.org/display/GROOVY/Groovy-Eclipse+2.5.0+New+and+Noteworthy" target="_blank" style="color: rgb(34, 68, 187);"&gt;New and Noteworthy page&lt;/a&gt;, and please send your comments to &lt;a href="http://xircles.codehaus.org/manage_email/eclipse-plugin-user@groovy.codehaus.org" target="_blank" style="color: rgb(34, 68, 187);"&gt;the mailing list&lt;/a&gt;. Enjoy!&lt;/span&gt; &lt;/div&gt;&lt;p /&gt;&lt;div&gt;&lt;span style="border-collapse: collapse; font-size: 13px; font-family: arial, sans-serif;"&gt;&lt;i&gt;Copied verbatim from &lt;a href="http://contraptionsforprogramming.blogspot.com/2011/05/groovy-eclipse-250-released.html"&gt;release announcement&lt;/a&gt;.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-7853068778806014333?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/7853068778806014333/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2011/06/groovy-eclipse-250-plugin-released.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/7853068778806014333?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/7853068778806014333?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2011/06/groovy-eclipse-250-plugin-released.html" title="Groovy-Eclipse 2.5.0 Plugin Released" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0ENQXgzcCp7ImA9WhdbFEo.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-2520369416372544510</id><published>2011-06-09T04:15:00.001-07:00</published><updated>2011-10-12T19:08:10.688-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-12T19:08:10.688-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Java EE Development" /><title>Enterprise OSGi Applications in GlassFish - the definitive guide (well almost)</title><content type="html">&lt;div class='posterous_autopost'&gt;&lt;div class='p_embed p_image_embed'&gt; &lt;img alt="Enterprise-osgi-glassfish" height="86" src="http://posterous.com/getfile/files.posterous.com/spring-java-ee/4CFGeynErpBwKKHnZOim1azdFowfFadeX7jufvu83AfS7uezTDcL3lb0BH00/enterprise-osgi-glassfish.png" width="100" /&gt; &lt;/div&gt; &lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt; Thanks to &lt;a href="http://www.java.net/blog/ss141213/"&gt;Sahoo&lt;/a&gt;, our &lt;b&gt;OSGi applications expert&lt;/b&gt; and one of our most active participant on the &lt;a href="http://java.net/projects/glassfish/lists/users/archive"&gt;mailing list&lt;/a&gt;, we now have an all-in-one &lt;a href="http://wikis.sun.com/download/attachments/209655166/GF-OSGi-Features-1.0.pdf"&gt;&lt;b&gt;Enterprise OSGi Applications in GlassFish&lt;/b&gt; &lt;b&gt;guide&lt;/b&gt;&lt;/a&gt; document packed with useful content (a &lt;em&gt;first edition&lt;/em&gt; of the &lt;b&gt;OSGi &amp;amp; GlassFish &lt;em&gt;definitive guide&lt;/em&gt;&lt;/b&gt; in a sense ;) &lt;/p&gt;&lt;p&gt;This document focuses on the &lt;a href="http://www.amazon.com/gp/product/1933988916/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=springjavaee-20&amp;amp;linkCode=as2&amp;amp;camp=217153&amp;amp;creative=399349&amp;amp;creativeASIN=1933988916"&gt;&lt;b&gt;OSGi Enterprise&lt;/b&gt;&lt;/a&gt; features of GlassFish, also known as &lt;em&gt;hybrid applications&lt;/em&gt;. This includes WAB packaging, JPA bundles, &lt;b&gt;EJB&lt;/b&gt; as &lt;b&gt;OSGi&lt;/b&gt; bundle or service, type-safe and dynamic injection of OSGi Services using &lt;b&gt;Java EE 6&lt;/b&gt;&amp;#39;s CDI, exposing HTTP/JTA/JDBC/JMS as OSGi services, tooling and more. &lt;/p&gt; &lt;p&gt; You can find this document and more linked off of the &lt;a href="http://wikis.sun.com/display/GlassFish/OSGi"&gt;main OSGi page&lt;/a&gt; on the GlassFish wiki.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;To learn more about &lt;b&gt;OSGi in the Enterprise&lt;/b&gt;, I highly recommend the recently published &lt;a href="http://www.amazon.com/gp/product/1933988916/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=springjavaee-20&amp;amp;linkCode=as2&amp;amp;camp=217153&amp;amp;creative=399349&amp;amp;creativeASIN=1933988916"&gt;&lt;b&gt;OSGi in Action: Creating Modular Applications in Java&lt;/b&gt;&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;(Article copied almost verbatim from &lt;a href="http://blogs.oracle.com/theaquarium/entry/osgi_glassfish_the_definitive_guide"&gt;The Aquarium&lt;/a&gt;)&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-2520369416372544510?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/2520369416372544510/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2011/06/enterprise-osgi-applications-in.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/2520369416372544510?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/2520369416372544510?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2011/06/enterprise-osgi-applications-in.html" title="Enterprise OSGi Applications in GlassFish - the definitive guide (well almost)" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUENQ3Y_cCp7ImA9WhZRGUk.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-828207820838952067</id><published>2011-04-16T02:43:00.001-07:00</published><updated>2011-04-16T02:54:52.848-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-16T02:54:52.848-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Java EE Development" /><title>Using Shiro for Authorization via CDI Interceptors then Easily Test with Arquillian</title><content type="html">&lt;span class="Apple-style-span" style="font-family: arial; font-size: x-small;"&gt;Did you know&amp;nbsp;&lt;a href="http://shiro.apache.org/" target="_blank"&gt;&lt;b&gt;Apache&lt;/b&gt;&amp;nbsp;&lt;b&gt;Shiro&lt;/b&gt;&lt;/a&gt;&amp;nbsp;is an&amp;nbsp;&lt;i&gt;easy-to-use&lt;/i&gt;&amp;nbsp;&lt;b&gt;security framework&lt;/b&gt;&amp;nbsp;for&amp;nbsp;&lt;b&gt;authentication&lt;/b&gt;&amp;nbsp;and&amp;nbsp;&lt;b&gt;authorization&lt;/b&gt;&amp;nbsp;in&amp;nbsp;&lt;b&gt;Java applications&lt;/b&gt;?&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
Did you know&amp;nbsp;&lt;b&gt;&lt;a href="http://www.slideshare.net/johaneltes/java-ee6-cdi" target="_blank"&gt;CDI (Java Context and Dependency Injection) Interceptors&lt;/a&gt;&lt;/b&gt;&amp;nbsp;(and&amp;nbsp;&lt;b&gt;&lt;a href="http://seamframework.org/Weld" target="_blank"&gt;Seam Weld&lt;/a&gt;&lt;/b&gt;) can make your&amp;nbsp;&lt;b&gt;programming&lt;/b&gt;&amp;nbsp;life easier?&lt;/div&gt;
&lt;div&gt;
Did you know&amp;nbsp;&lt;b&gt;&lt;a href="http://www.jboss.org/arquillian" target="_blank"&gt;JBoss&amp;nbsp;Arquillian&lt;/a&gt;&lt;/b&gt;&amp;nbsp;makes testing&amp;nbsp;&lt;b&gt;@Inject-enhanced&lt;/b&gt;&amp;nbsp;&lt;b&gt;Java code&lt;/b&gt;&amp;nbsp;in a&amp;nbsp;&lt;b&gt;CDI container&lt;/b&gt;&amp;nbsp;very easy?&lt;br clear="all" /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: medium;"&gt;&lt;b&gt;Making It Work Together&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
Okay, enough with the buzzwords. And sorry for the confusing article title, but really this is about an&amp;nbsp;&lt;b&gt;example&lt;/b&gt;&amp;nbsp;of integrating 4 separate cool (and practical!) stuff:&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;Shiro&lt;/b&gt;&amp;nbsp;for security (authentication and authorization)&lt;/li&gt;
&lt;li&gt;Use of&amp;nbsp;&lt;b&gt;CDI interceptors&lt;/b&gt;&amp;nbsp;so that you don't have to sprinkle your business logic code with orthogonal concerns&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Integration testing&lt;/b&gt;&amp;nbsp;(actually it is&amp;nbsp;&lt;b&gt;unit testing&lt;/b&gt;&amp;nbsp;inside an integration container) your application in&amp;nbsp;&lt;b&gt;Arquillian&lt;/b&gt;, demonstrating that it is just as easy as plain JUnit tests. "Look ma, no manual wiring!"(tm)&lt;/li&gt;
&lt;li&gt;How&amp;nbsp;&lt;b&gt;&lt;a href="http://maven.apache.org/" target="_blank"&gt;Maven project management&amp;nbsp;build tool&lt;/a&gt;&lt;/b&gt;&amp;nbsp;helps in doing the tasks above easier, no more searching for stuff and configuring classpaths&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;span style="font-size: medium;"&gt;&lt;b&gt;The Goal&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
The goal is making this very simple JavaBean class:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;public class ContactManager {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;String name = "Hendy Irawan";&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="white-space: pre-wrap;"&gt;&lt;span style="font-family: 'courier new', monospace;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;public String getName() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;return name;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="white-space: pre-wrap;"&gt;&lt;span style="font-family: 'courier new', monospace;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;public void setName(String name) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&lt;a href="http://this.name/" target="_blank"&gt;this.name&lt;/a&gt;&amp;nbsp;= name;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
...&amp;nbsp;&lt;b&gt;"enterprise-ready"&lt;/b&gt;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
How? By making sure it handles authentication and authorization of secured operations&amp;nbsp;&lt;b&gt;without changing a single character of the above code at all!&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
"You've got to be kidding me!" No, I'm not. The trick is that I will add the following exactly before that code:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;@Secured @NamedResource("contact")&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
And the bean&amp;nbsp;&lt;b&gt;will&lt;/b&gt;&amp;nbsp;get secured. The best part is you can do it with any bean you want, not just the above.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: medium;"&gt;&lt;b&gt;Introducing Shiro The Guardian&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The awesome framework that will perform the job as our security guy is&amp;nbsp;&lt;b&gt;Apache Shiro&lt;/b&gt;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Summon Shiro in the&amp;nbsp;&lt;b&gt;Maven project's pom.xml&lt;/b&gt;&amp;nbsp;:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;groupId&amp;gt;org.apache.shiro&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;groupId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;artifactId&amp;gt;shiro-core&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;artifactId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;version&amp;gt;1.1.0&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Shiro is very configurable, but for this example I'll just use a basic INI style configuration with the following contents:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;[users]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;# user 'root' with password 'secret' and the 'admin' role&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;root = secret, admin&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;# user 'guest' with the password 'guest' and the 'guest' role&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;guest = guest, guest&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;hendy = hendy, user&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;[roles]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;# 'admin' role has all permissions, indicated by the wildcard '*'&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;admin = *&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;guest = view:*&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;user = view:*, edit:*&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I think the above is pretty easy to understand. Create the Shiro SecurityManager that loads the above configuration with:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace; white-space: pre-wrap;"&gt;import org.apache.shiro.&lt;wbr&gt;&lt;/wbr&gt;SecurityUtils;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;import org.apache.shiro.config.&lt;wbr&gt;&lt;/wbr&gt;IniSecurityManagerFactory;
import org.apache.shiro.mgt.&lt;wbr&gt;&lt;/wbr&gt;SecurityManager;
import org.apache.shiro.subject.&lt;wbr&gt;&lt;/wbr&gt;Subject;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'courier new', monospace;"&gt;import org.slf4j.Logger;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'courier new', monospace; white-space: pre-wrap;"&gt;...&lt;/span&gt;&lt;div&gt;
&lt;span style="white-space: pre-wrap;"&gt;&lt;span style="font-family: 'courier new', monospace;"&gt;final String iniFile = "classpath:shiro.ini";
&lt;a href="http://logger.info/" target="_blank"&gt;logger.info&lt;/a&gt;("Initializing Shiro INI SecurityManager using " + iniFile);
securityManager = new IniSecurityManagerFactory(&lt;wbr&gt;&lt;/wbr&gt;iniFile).getInstance();
SecurityUtils.&lt;wbr&gt;&lt;/wbr&gt;setSecurityManager(&lt;wbr&gt;&lt;/wbr&gt;securityManager);&lt;/span&gt;&lt;/span&gt;&lt;span style="white-space: pre-wrap;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
It's now possible to check the permission by doing:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import org.apache.shiro.&lt;wbr&gt;&lt;/wbr&gt;SecurityUtils;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import org.apache.shiro.subject.&lt;wbr&gt;&lt;/wbr&gt;Subject;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import org.slf4j.Logger;&lt;br /&gt;...&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;Subject subject = SecurityUtils.getSubject();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;try {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp;subject.checkPermission("&lt;wbr&gt;&lt;/wbr&gt;edit:contact");&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;} catch (Exception e) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp;logger.error("Access denied - {}: {}", e.getClass().getName(), e.getMessage());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp;throw e;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: medium;"&gt;&lt;b&gt;Wiring It All with CDI&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I don't want to manually assign objects by doing setSomedependency(object) all over the place. I want to use&amp;nbsp;&lt;b&gt;CDI dependency injection&lt;/b&gt;:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;@Inject&amp;nbsp;Subject subject;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
which is provided by:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;@Produces&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;public Subject getSubject() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;return SecurityUtils.getSubject();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You may argue that it's just as concise as:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;Subject subject =&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'courier new', monospace;"&gt;SecurityUtils.getSubject();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
However that code is not flexible, because it is tied directly to Shiro API. The use of dependency injection makes it easier if you want to change the Subject implementation to another (for example, during testing, a mock object).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: medium;"&gt;&lt;b&gt;Grab the JARs&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="white-space: pre-wrap;"&gt;A&lt;/span&gt;dd the JBoss repository (btw, it's recommended to add this as a profile in your&amp;nbsp;&lt;b&gt;~/.m2/settings.xml&lt;/b&gt;&amp;nbsp;instead of adding directly to the project POM):&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;lt;repositories&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;repository&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;id&amp;gt;jboss-public-repository-&lt;wbr&gt;&lt;/wbr&gt;group&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;name&amp;gt;JBoss Public Maven Repository Group&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;url&amp;gt;&lt;a href="https://repository.jboss.org/nexus/content/groups/public/" target="_blank"&gt;https://repository.jboss.&lt;wbr&gt;&lt;/wbr&gt;org/nexus/content/groups/&lt;wbr&gt;&lt;/wbr&gt;public/&lt;/a&gt;&amp;lt;/url&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;layout&amp;gt;default&amp;lt;/layout&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;releases&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;   &lt;/span&gt;&amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;   &lt;/span&gt;&amp;lt;updatePolicy&amp;gt;never&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;updatePolicy&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;/releases&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;snapshots&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;   &lt;/span&gt;&amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;   &lt;/span&gt;&amp;lt;updatePolicy&amp;gt;never&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;updatePolicy&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;/snapshots&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;/repository&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;lt;/repositories&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="white-space: pre-wrap;"&gt;H&lt;/span&gt;ere's the Maven dependencies:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;groupId&amp;gt;javax.enterprise&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;groupId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;artifactId&amp;gt;cdi-api&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;artifactId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;version&amp;gt;1.0-SP4&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;groupId&amp;gt;org.jboss.spec.javax.&lt;wbr&gt;&lt;/wbr&gt;interceptor&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;artifactId&amp;gt;jboss-&lt;wbr&gt;&lt;/wbr&gt;interceptors-api_1.1_spec&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;artifactId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;version&amp;gt;1.0.0.Final&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
By the way, if you use&amp;nbsp;&lt;b&gt;&lt;a href="http://m2eclipse.sonatype.org/" target="_blank"&gt;M2Eclipse plugin in Eclipse IDE&lt;/a&gt;&lt;/b&gt;, you don't have to worry about memorizing those because you can just right-click Project &amp;gt; Maven &amp;gt; Add Dependency and merrily search away the Maven repositories.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: medium;"&gt;&lt;b&gt;Using CDI Interceptors to Add Security Layer&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Instead of putting the security code in the business logic (or in this case, entity) beans themselves, I'd like to use&amp;nbsp;&lt;b&gt;declarative security&lt;/b&gt;. First create an&amp;nbsp;&lt;b&gt;annotation&lt;/b&gt;&amp;nbsp;that will serve as&amp;nbsp;&lt;b&gt;interceptor binding&lt;/b&gt;:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import java.lang.annotation.&lt;wbr&gt;&lt;/wbr&gt;ElementType;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import java.lang.annotation.&lt;wbr&gt;&lt;/wbr&gt;Inherited;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import java.lang.annotation.&lt;wbr&gt;&lt;/wbr&gt;Retention;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import java.lang.annotation.&lt;wbr&gt;&lt;/wbr&gt;RetentionPolicy;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import java.lang.annotation.Target;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import javax.interceptor.&lt;wbr&gt;&lt;/wbr&gt;InterceptorBinding;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;@Inherited&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;@Target({ElementType.TYPE, ElementType.METHOD})&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;@Retention(RetentionPolicy.&lt;wbr&gt;&lt;/wbr&gt;RUNTIME)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;@InterceptorBinding&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;public @interface Secured {&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Use it to secure the bean that needs it:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;@Named&amp;nbsp;&lt;b&gt;@Secured&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;public class ContactManager { ...&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now implement the interceptor itself:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import javax.inject.Inject;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import javax.interceptor.&lt;wbr&gt;&lt;/wbr&gt;AroundInvoke;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import javax.interceptor.Interceptor;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import javax.interceptor.&lt;wbr&gt;&lt;/wbr&gt;InvocationContext;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import org.apache.shiro.mgt.&lt;wbr&gt;&lt;/wbr&gt;SecurityManager;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import org.apache.shiro.subject.&lt;wbr&gt;&lt;/wbr&gt;Subject;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import org.slf4j.Logger;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import org.slf4j.LoggerFactory;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;@Secured @Interceptor&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;public class SecurityInterceptor {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;@Inject&amp;nbsp;Subject subject;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;@Inject&amp;nbsp;SecurityManager securityManager;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;Logger logger = LoggerFactory.getLogger(&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor.class);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="white-space: pre-wrap;"&gt;&lt;span style="font-family: 'courier new', monospace;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;@AroundInvoke&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;public Object interceptGet(InvocationContext ctx) throws Exception {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&lt;a href="http://logger.info/" target="_blank"&gt;logger.info&lt;/a&gt;("Securing {} {}", new Object[] { ctx.getMethod(), ctx.getParameters() });&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;logger.debug("Principal is: {}", subject.getPrincipal());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;final Class&amp;lt;? extends Object&amp;gt; runtimeClass = ctx.getTarget().getClass();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;logger.debug("Runtime extended classes: {}", runtimeClass.getClasses());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;logger.debug("Runtime implemented interfaces: {}", runtimeClass.getInterfaces());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;logger.debug("Runtime annotations ({}): {}", runtimeClass.getAnnotations().&lt;wbr&gt;&lt;/wbr&gt;length, runtimeClass.getAnnotations())&lt;wbr&gt;&lt;/wbr&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="white-space: pre-wrap;"&gt;&lt;span style="font-family: 'courier new', monospace;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;final Class&amp;lt;?&amp;gt; declaringClass = ctx.getMethod().&lt;wbr&gt;&lt;/wbr&gt;getDeclaringClass();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;logger.debug("Declaring class: {}", declaringClass);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;logger.debug("Declaring extended classes: {}", declaringClass.getClasses());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;logger.debug("Declaring annotations ({}): {}", declaringClass.getAnnotations(&lt;wbr&gt;&lt;/wbr&gt;).length, declaringClass.getAnnotations(&lt;wbr&gt;&lt;/wbr&gt;));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="white-space: pre-wrap;"&gt;&lt;span style="font-family: 'courier new', monospace;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;String entityName;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;try {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;   &lt;/span&gt;NamedResource namedResource = runtimeClass.getAnnotation(&lt;wbr&gt;&lt;/wbr&gt;NamedResource.class);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;   &lt;/span&gt;entityName = namedResource.value();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;   &lt;/span&gt;logger.debug("Got @NamedResource={}", entityName);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;} catch (NullPointerException e) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;   &lt;/span&gt;entityName = declaringClass.getSimpleName()&lt;wbr&gt;&lt;/wbr&gt;.toLowerCase(); // TODO: should be lowerFirst camelCase&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;   &lt;/span&gt;logger.warn("@NamedResource not annotated, inferred from declaring classname: {}", entityName);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="white-space: pre-wrap;"&gt;&lt;span style="font-family: 'courier new', monospace;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;String action = "admin";&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;if (ctx.getMethod().getName().&lt;wbr&gt;&lt;/wbr&gt;matches("get[A-Z].*"))&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;   &lt;/span&gt;action = "view";&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;if (ctx.getMethod().getName().&lt;wbr&gt;&lt;/wbr&gt;matches("set[A-Z].*"))&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;   &lt;/span&gt;action = "edit";&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;String permission = String.format("%s:%s", action, entityName);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&lt;a href="http://logger.info/" target="_blank"&gt;logger.info&lt;/a&gt;("Checking permission '{}' for user '{}'", permission, subject.getPrincipal());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;try {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;   &lt;/span&gt;subject.checkPermission(&lt;wbr&gt;&lt;/wbr&gt;permission);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;} catch (Exception e) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;   &lt;/span&gt;logger.error("Access denied - {}: {}", e.getClass().getName(), e.getMessage());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;   &lt;/span&gt;throw e;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;return ctx.proceed();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
At this point you may think: "OMG! so much code just to check authorization. Can't you shorten the code a little bit?"&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
And&amp;nbsp;&lt;b&gt;that&lt;/b&gt;&amp;nbsp;is&amp;nbsp;&lt;i&gt;exactly&lt;/i&gt;&amp;nbsp;why you don't want to litter your business code with security or other concerns. So you can write as complex or long code as you want in the interceptor and not worry about it when you write the business logic.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You may also find bugs in the implementation above or change the requirements (e.g. to use&amp;nbsp;&lt;b&gt;Spring Security&lt;/b&gt;&amp;nbsp;instead of&amp;nbsp;&lt;b&gt;Apache Shiro&lt;/b&gt;). No sweat, just fix the interceptor (this is just&amp;nbsp;&lt;b&gt;one&lt;/b&gt;&amp;nbsp;alternative, read below why), and all the beans that use it will have it right after save the interceptor .java source file (since Eclipse IDE will auto-build your project, right? ;-).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The last step is activating the interceptor itself in the&amp;nbsp;&lt;b&gt;META-INF/beans.xml&lt;/b&gt;&amp;nbsp;file:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;lt;beans xmlns="&lt;a href="http://java.sun.com/xml/ns/javaee" target="_blank"&gt;http://java.sun.com/&lt;wbr&gt;&lt;/wbr&gt;xml/ns/javaee&lt;/a&gt;" xmlns:xsi="&lt;a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank"&gt;http://www.w3.org/&lt;wbr&gt;&lt;/wbr&gt;2001/XMLSchema-instance&lt;/a&gt;"&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;xsi:schemaLocation="&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;a href="http://java.sun.com/xml/ns/javaee" target="_blank"&gt;http://java.sun.com/xml/ns/&lt;wbr&gt;&lt;/wbr&gt;javaee&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;a href="http://docs.jboss.org/cdi/beans_1_0.xsd" target="_blank"&gt;http://docs.jboss.org/cdi/&lt;wbr&gt;&lt;/wbr&gt;beans_1_0.xsd&lt;/a&gt;"&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;interceptors&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;b&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;class&amp;gt;id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor&amp;lt;/class&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;/interceptors&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;lt;/beans&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Interceptors will be ignored by CDI container unless it is listed in&amp;nbsp;&lt;b&gt;beans.xml&lt;/b&gt;. Now I said that to change the implementation of the interceptor is just one way you can change the behavior of an interceptor binding annotation. Another perfectly valid way is just to activate a different interceptor class that implements the same interceptor binding, for example:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;lt;interceptors&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;class&amp;gt;id.co.bippo.security.&lt;b&gt;Sp&lt;wbr&gt;&lt;/wbr&gt;ring&lt;/b&gt;SecurityInterceptor&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;class&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;lt;/interceptors&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
You may notice I defined another annotation that is&amp;nbsp;&lt;b&gt;@NamedResource&lt;/b&gt;&amp;nbsp;:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;@Inherited&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;@Target({ElementType.TYPE})&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;@Retention(RetentionPolicy.&lt;wbr&gt;&lt;/wbr&gt;RUNTIME)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;public @interface NamedResource {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;String value();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
My security implementation will check the permission using the value set by @NamedResource annotation, with the lowercase-name of the class used as fallback. The following:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;@Named @Secured @NamedResource("contact")&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;public class ContactManager { ...&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Tells the security interceptor to check the permission using "contact" as the resource name, not "contactmanager" inflected from the class name&amp;nbsp;&lt;span style="font-family: 'courier new', monospace;"&gt;ContactManager&lt;/span&gt;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: medium;"&gt;&lt;b&gt;From Great Power Comes Great Responsibility&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Traditionally, running CDI unit tests using JUnit, outside a Java EE container means you either have to:&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Instantiate and configure a CDI implementation; or...&lt;/li&gt;
&lt;li&gt;Do it the old school POJO way --&amp;gt;&amp;nbsp;&lt;span style="font-family: 'courier new', monospace;"&gt;someObject.setDependency(&lt;wbr&gt;&lt;/wbr&gt;toAnother);&lt;/span&gt;&amp;nbsp;all over the unit test&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Unfortunately option #2 breaks down when you use other features than dependency injection, like interceptors.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
And option #1 is just boring for your highly valuable time.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: medium;"&gt;&lt;b&gt;Arquillian Tames The Game&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Of course, the movie won't be exciting unless you have a cool protagonist as your buddy:&amp;nbsp;&lt;b&gt;&lt;a href="http://www.jboss.org/arquillian" target="_blank"&gt;JBoss Arquillian&lt;/a&gt;&lt;/b&gt;. Let it handle the boring responsibility of dealing with the container and JUnit/TestNG integration, while you&amp;nbsp;&lt;b&gt;keep the power of easy unit testing and full CDI (and more!) features&lt;/b&gt;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Summon the mighty Arquillian inside your pom.xml :&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;lt;properties&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;project.build.sourceEncoding&amp;gt;&lt;wbr&gt;&lt;/wbr&gt;UTF-8&amp;lt;/project.build.&lt;wbr&gt;&lt;/wbr&gt;sourceEncoding&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;arquillian.version&amp;gt;1.0.0.&lt;wbr&gt;&lt;/wbr&gt;Alpha5&amp;lt;/arquillian.version&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;junit.version&amp;gt;4.8.2&amp;lt;/junit.&lt;wbr&gt;&lt;/wbr&gt;version&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;lt;/properties&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;!-- Test Dependencies --&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;groupId&amp;gt;junit&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;artifactId&amp;gt;junit&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;version&amp;gt;${junit.version}&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;version&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;groupId&amp;gt;org.jboss.arquillian&amp;lt;&lt;wbr&gt;&lt;/wbr&gt;/groupId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;artifactId&amp;gt;arquillian-junit&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;artifactId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;version&amp;gt;${arquillian.version}&lt;wbr&gt;&lt;/wbr&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;lt;profiles&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;lt;profile&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;id&amp;gt;weld-se-embedded-11&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;dependencies&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;groupId&amp;gt;org.jboss.&lt;wbr&gt;&lt;/wbr&gt;arquillian.container&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;artifactId&amp;gt;arquillian-weld-&lt;wbr&gt;&lt;/wbr&gt;se-embedded-1.1&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;version&amp;gt;${arquillian.&lt;wbr&gt;&lt;/wbr&gt;version}&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;groupId&amp;gt;org.jboss.weld&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;groupId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;artifactId&amp;gt;weld-core&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;artifactId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;groupId&amp;gt;org.jboss.weld&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;groupId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;artifactId&amp;gt;weld-api&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;artifactId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;groupId&amp;gt;org.glassfish.web&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;groupId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;artifactId&amp;gt;el-impl&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;artifactId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;version&amp;gt;2.2&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;scope&amp;gt;runtime&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;dependency&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;groupId&amp;gt;ch.qos.logback&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;groupId&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;artifactId&amp;gt;logback-classic&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;artifactId&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;version&amp;gt;0.9.28&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;scope&amp;gt;runtime&amp;lt;/scope&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/dependency&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;dependencyManagement&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;dependencies&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;groupId&amp;gt;org.jboss.weld&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;groupId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;artifactId&amp;gt;weld-core-bom&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;artifactId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;version&amp;gt;1.1.0.Final&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;version&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;type&amp;gt;pom&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;scope&amp;gt;import&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;   &lt;/span&gt;&amp;lt;groupId&amp;gt;org.slf4j&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;   &lt;/span&gt;&amp;lt;artifactId&amp;gt;slf4j-api&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;artifactId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;   &lt;/span&gt;&amp;lt;version&amp;gt;1.6.1&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;   &lt;/span&gt;&amp;lt;groupId&amp;gt;org.slf4j&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;   &lt;/span&gt;&amp;lt;artifactId&amp;gt;slf4j-ext&amp;lt;/&lt;wbr&gt;&lt;/wbr&gt;artifactId&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;   &lt;/span&gt;&amp;lt;version&amp;gt;1.6.1&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/dependencyManagement&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;lt;/profile&amp;gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;lt;/profiles&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The above POM snippet will:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;depend on&amp;nbsp;&lt;b&gt;JUnit&lt;/b&gt;&amp;nbsp;4.8.2&lt;/li&gt;
&lt;li&gt;depend on&amp;nbsp;&lt;b&gt;Arquillian&lt;/b&gt;&amp;nbsp;1.0.0.Alpha5 (don't be deceived by the "alpha" qualifier. it's excellently usable already!)&lt;/li&gt;
&lt;li&gt;declare a&amp;nbsp;&lt;b&gt;weld-se-embedded-11&lt;/b&gt;&amp;nbsp;Maven profile that runs tests under Weld SE Embedded 1.1.0.Final CDI container. Note that Arquillian supports&amp;nbsp;&lt;a href="http://docs.jboss.org/arquillian/reference/latest/en-US/html/container.reference.html" target="_blank"&gt;a whole host of other container configurations&lt;/a&gt;&amp;nbsp;including GlassFish, JBoss, OpenWebBeans, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
I also made sure to use&amp;nbsp;&lt;b&gt;&lt;a href="http://www.slf4j.org/" target="_blank"&gt;SLF4J&lt;/a&gt;&lt;/b&gt;&amp;nbsp;1.6.1 and the powerful&amp;nbsp;&lt;b&gt;&lt;a href="http://logback.qos.ch/" target="_blank"&gt;Logback&lt;/a&gt;&lt;/b&gt;, but this is optional and you can replace it with slf4j-simple or log4j if you want.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: medium;"&gt;&lt;b&gt;Coding The Test&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Fortunately, with a minor change, the test code is just plain&amp;nbsp;&lt;b&gt;JUnit 4 test case&lt;/b&gt;&amp;nbsp;conventions you all know and love. (OK, some of you may love TestNG better, thankfully Arquillian also supports it)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import javax.inject.Inject;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import junit.framework.Assert;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import org.apache.shiro.authc.&lt;wbr&gt;&lt;/wbr&gt;UsernamePasswordToken;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import org.apache.shiro.authz.&lt;wbr&gt;&lt;/wbr&gt;AuthorizationException;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import org.apache.shiro.subject.&lt;wbr&gt;&lt;/wbr&gt;Subject;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import org.jboss.arquillian.api.&lt;wbr&gt;&lt;/wbr&gt;Deployment;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import org.jboss.arquillian.junit.&lt;wbr&gt;&lt;/wbr&gt;Arquillian;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import org.jboss.shrinkwrap.api.&lt;wbr&gt;&lt;/wbr&gt;ShrinkWrap;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import org.jboss.shrinkwrap.api.spec.&lt;wbr&gt;&lt;/wbr&gt;JavaArchive;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import org.junit.Test;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import org.junit.rules.&lt;wbr&gt;&lt;/wbr&gt;ExpectedException;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;import org.junit.runner.RunWith;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;@RunWith(Arquillian.class)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;public class ContactManagerTest {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;@Inject ContactManager cm;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;@Inject Subject subject;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="white-space: pre-wrap;"&gt;&lt;span style="font-family: 'courier new', monospace;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;/**&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;nbsp;* Since Arquillian actually creates JAR files under the covers, the @Deployment&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;nbsp;* is your way of controlling what is included in that Archive. Note, each&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;nbsp;* class utilized in your test case - whether directly or indirectly - must&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;nbsp;* be added to the deployment archive.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;&amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;@Deployment&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;public static JavaArchive createTestArchive()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;return ShrinkWrap.create(JavaArchive.&lt;wbr&gt;&lt;/wbr&gt;class, "test.jar")&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;.addPackage("id.co.bippo.&lt;wbr&gt;&lt;/wbr&gt;security")&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;//.addClasses(new Class[] {ContactManager.class, SecurityInterceptor.class, SecurityFacade.class})&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;.addAsManifestResource("META-&lt;wbr&gt;&lt;/wbr&gt;INF/beans.xml");&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;@Test&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;public void guestCanView() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;subject.login(new UsernamePasswordToken("guest", "guest"));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;Assert.assertEquals("Hendy Irawan", cm.getName());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="white-space: pre-wrap;"&gt;&lt;span style="font-family: 'courier new', monospace;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;@Test(expected=&lt;wbr&gt;&lt;/wbr&gt;AuthorizationException.class)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;public void guestCannotEdit() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;subject.login(new UsernamePasswordToken("guest", "guest"));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;cm.setName("Pak Boss");&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;Assert.assertEquals("Pak Boss", cm.getName());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="white-space: pre-wrap;"&gt;&lt;span style="font-family: 'courier new', monospace;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;@Test&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;public void userCanEdit() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;subject.login(new UsernamePasswordToken("hendy", "hendy"));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;cm.setName("Pak Boss");&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt;  &lt;/span&gt;Assert.assertEquals("Pak Boss", cm.getName());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;span style="white-space: pre-wrap;"&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="white-space: pre-wrap;"&gt;&lt;span style="font-family: 'courier new', monospace;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
There are only two things that make this JUnit test different than vanilla JUnit tests:&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Annotate the test class with&amp;nbsp;&lt;b&gt;@RunWith(Arquillian.&lt;wbr&gt;&lt;/wbr&gt;class)&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Implement the public static&amp;nbsp;&lt;b&gt;@Deployment&lt;/b&gt;&amp;nbsp;method. Declare all the classes (or packages) and files/resources that you need in the to test what you will deploy. It may take some time to get used to but after that you'll realize that it's so powerful. For example you can test how the beans behave with different beans.xml configuration! (putting the&amp;nbsp;&lt;b&gt;"C"ontext&lt;/b&gt;&amp;nbsp;back in&amp;nbsp;&lt;b&gt;CDI&lt;/b&gt;!)&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: medium;"&gt;&lt;b&gt;Launch The Test Away&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Testing the project with Arqullian is as simple as:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;mvn test -Pweld-se-embedded-11&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Notice the profile argument. It means it's very easy to test your application in different containers at will just by changing the profile! Neatness to the Extreme! I'd say it's&amp;nbsp;&lt;i&gt;the&lt;/i&gt;&amp;nbsp;definition of neatness.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;------------------------------&lt;wbr&gt;&lt;/wbr&gt;-------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;T E S T S&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;------------------------------&lt;wbr&gt;&lt;/wbr&gt;-------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;Running id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;ContactManagerTest&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16 Apr 11 16:03:14 org.jboss.arquillian.impl.&lt;wbr&gt;&lt;/wbr&gt;client.container.&lt;wbr&gt;&lt;/wbr&gt;ContainerRegistryCreator getActivatedConfiguration&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;INFO: Could not read active container configuration: null&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:14 [main] INFO &amp;nbsp;org.jboss.weld.Version - WELD-000900 1.1.0 (Final)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:14 [main] INFO &amp;nbsp;org.jboss.weld.Bootstrap - WELD-000101 Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] WARN &amp;nbsp;o.j.i.util.&lt;wbr&gt;&lt;/wbr&gt;InterceptionTypeRegistry - Class 'javax.ejb.PostActivate' not found, interception based on it is not enabled&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] WARN &amp;nbsp;o.j.i.util.&lt;wbr&gt;&lt;/wbr&gt;InterceptionTypeRegistry - Class 'javax.ejb.PrePassivate' not found, interception based on it is not enabled&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] INFO &amp;nbsp;id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityFacade - Initializing Shiro INI SecurityManager using classpath:shiro.ini&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] INFO &amp;nbsp;i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Securing public java.lang.String id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;ContactManager.getName() []&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Principal is: null&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Runtime extended classes: {}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Runtime implemented interfaces: interface java.io.Serializable&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Runtime annotations (2): [@id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;Secured(), @id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;NamedResource(value=contact)]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Declaring class: class id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;ContactManager&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Declaring extended classes: {}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Declaring annotations (3): [@id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;Secured(), @javax.inject.Named(value=), @id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;NamedResource(value=contact)]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Got @NamedResource=contact&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] INFO &amp;nbsp;i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Checking permission 'view:contact' for user 'null'&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] ERROR i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Access denied - org.apache.shiro.authz.&lt;wbr&gt;&lt;/wbr&gt;UnauthenticatedException: This subject is anonymous - it does not have any identifying principals and authorization operations require an identity to check against. &amp;nbsp;A Subject instance will acquire these identifying principals automatically after a successful login is performed be executing org.apache.shiro.subject.&lt;wbr&gt;&lt;/wbr&gt;Subject.login(&lt;wbr&gt;&lt;/wbr&gt;AuthenticationToken) or when 'Remember Me' functionality is enabled by the SecurityManager. &amp;nbsp;This exception can also occur when a previously logged-in Subject has logged out which makes it anonymous again. &amp;nbsp;Because an identity is currently not known due to any of these conditions, authorization is denied.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] INFO &amp;nbsp;o.a.s.s.m.&lt;wbr&gt;&lt;/wbr&gt;AbstractValidatingSessionManag&lt;wbr&gt;&lt;/wbr&gt;er - Enabling session validation scheduler...&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] INFO &amp;nbsp;i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Securing public java.lang.String id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;ContactManager.getName() []&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Principal is: guest&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Runtime extended classes: {}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Runtime implemented interfaces: interface java.io.Serializable&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Runtime annotations (2): [@id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;Secured(), @id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;NamedResource(value=contact)]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Declaring class: class id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;ContactManager&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Declaring extended classes: {}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Declaring annotations (3): [@id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;Secured(), @javax.inject.Named(value=), @id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;NamedResource(value=contact)]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Got @NamedResource=contact&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] INFO &amp;nbsp;i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Checking permission 'view:contact' for user 'guest'&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] INFO &amp;nbsp;i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Securing public void id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;ContactManager.setName(java.&lt;wbr&gt;&lt;/wbr&gt;lang.String) [Pak Boss]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Principal is: guest&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Runtime extended classes: {}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Runtime implemented interfaces: interface java.io.Serializable&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Runtime annotations (2): [@id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;Secured(), @id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;NamedResource(value=contact)]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Declaring class: class id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;ContactManager&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Declaring extended classes: {}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Declaring annotations (3): [@id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;Secured(), @javax.inject.Named(value=), @id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;NamedResource(value=contact)]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Got @NamedResource=contact&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] INFO &amp;nbsp;i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Checking permission 'edit:contact' for user 'guest'&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] ERROR i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Access denied - org.apache.shiro.authz.&lt;wbr&gt;&lt;/wbr&gt;UnauthorizedException: Subject does not have permission [edit:contact]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] INFO &amp;nbsp;i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Securing public java.lang.String id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;ContactManager.getName() []&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Principal is: hendy&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Runtime extended classes: {}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Runtime implemented interfaces: interface java.io.Serializable&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Runtime annotations (2): [@id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;Secured(), @id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;NamedResource(value=contact)]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Declaring class: class id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;ContactManager&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Declaring extended classes: {}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Declaring annotations (3): [@id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;Secured(), @javax.inject.Named(value=), @id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;NamedResource(value=contact)]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Got @NamedResource=contact&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] INFO &amp;nbsp;i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Checking permission 'view:contact' for user 'hendy'&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] INFO &amp;nbsp;i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Securing public void id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;ContactManager.setName(java.&lt;wbr&gt;&lt;/wbr&gt;lang.String) [Pak Boss]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Principal is: hendy&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Runtime extended classes: {}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Runtime implemented interfaces: interface java.io.Serializable&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Runtime annotations (2): [@id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;Secured(), @id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;NamedResource(value=contact)]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Declaring class: class id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;ContactManager&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Declaring extended classes: {}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Declaring annotations (3): [@id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;Secured(), @javax.inject.Named(value=), @id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;NamedResource(value=contact)]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Got @NamedResource=contact&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] INFO &amp;nbsp;i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Checking permission 'edit:contact' for user 'hendy'&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] INFO &amp;nbsp;i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Securing public java.lang.String id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;ContactManager.getName() []&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Principal is: hendy&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Runtime extended classes: {}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Runtime implemented interfaces: interface java.io.Serializable&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Runtime annotations (2): [@id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;Secured(), @id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;NamedResource(value=contact)]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Declaring class: class id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;ContactManager&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Declaring extended classes: {}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Declaring annotations (3): [@id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;Secured(), @javax.inject.Named(value=), @id.co.bippo.security.&lt;wbr&gt;&lt;/wbr&gt;NamedResource(value=contact)]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] DEBUG i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Got @NamedResource=contact&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;16:03:15 [main] INFO &amp;nbsp;i.c.b.security.&lt;wbr&gt;&lt;/wbr&gt;SecurityInterceptor - Checking permission 'view:contact' for user 'hendy'&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.621 sec&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;Results :&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;Tests run: 5, Failures: 0, Errors: 0, Skipped: 0&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: medium;"&gt;&lt;b&gt;The Example Project&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now I'd argue that wasn't hard... compared to all the manual work that Java developers had to go through if doing it conventionally.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To make it even easier for everybody to see it in action with their own eyes, this complete example code is freely available, runnable (and forkable!) as&amp;nbsp;&lt;b&gt;&lt;a href="https://github.com/ceefour/arquillian-shiro-example" target="_blank"&gt;arquillian-shiro-example project on GitHub&lt;/a&gt;&lt;/b&gt;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Simply:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;git clone git://&lt;a href="http://github.com/ceefour/arquillian-shiro-example.git" target="_blank"&gt;github.com/ceefour/&lt;wbr&gt;&lt;/wbr&gt;arquillian-shiro-example.git&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;cd arquillian-shiro-example&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'courier new', monospace;"&gt;mvn test -Pweld-se-embedded-11&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
And watch the magic unfold.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: medium;"&gt;&lt;b&gt;Conclusion&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Java EE 6&lt;/b&gt;&amp;nbsp;and its supporting technologies (like&amp;nbsp;&lt;b&gt;CDI&lt;/b&gt;) and tools (like Arquillian and Maven, note they are not specific to Java EE at all) continue to help developers become more productive by reducing unnecessary technical tasks.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To know more about Java EE 6, I highly recommend&amp;nbsp;&lt;a href="http://www.amazon.com/gp/product/0137081855/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=springjavaee-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0137081855" target="_blank"&gt;&lt;b&gt;The Java EE 6 Tutorial: Basic Concepts (4th Edition)&lt;/b&gt;&amp;nbsp;(Java Series) by Eric Jendrock, Ian Evans, Devika Gollapudi and Kim Haase&lt;/a&gt;.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I also recommend&amp;nbsp;&lt;a href="http://www.amazon.com/gp/product/0596158025/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=gauldong-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0596158025" target="_blank"&gt;&lt;b&gt;Enterprise JavaBeans 3.1&lt;/b&gt;&amp;nbsp;by Andrew Lee Rubinger and Bill Burke&lt;/a&gt;&amp;nbsp;for a thorough explanation on updated EJB 3.1 technology (including&amp;nbsp;&lt;b&gt;interceptors&lt;/b&gt;). &amp;nbsp;You can&amp;nbsp;&lt;a href="http://astore.amazon.com/springjavaee-20" target="_blank"&gt;find more&amp;nbsp;&lt;b&gt;Java EE 6 Resources&lt;/b&gt;&amp;nbsp;here&lt;/a&gt;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Do you think CDI / Arquillian / Shiro / Maven or this article helpful to you? Let me know what you have in mind. :-)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-828207820838952067?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/828207820838952067/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2011/04/using-shiro-for-authorization-via-cdi.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/828207820838952067?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/828207820838952067?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2011/04/using-shiro-for-authorization-via-cdi.html" title="Using Shiro for Authorization via CDI Interceptors then Easily Test with Arquillian" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0ENQXk5fyp7ImA9WhdbFEo.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-8332187746122024528</id><published>2011-04-13T07:15:00.001-07:00</published><updated>2011-10-12T19:08:10.727-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-12T19:08:10.727-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Java EE Development" /><title>Fixing EJB 3.1 + CDI + JSF 2.0 problem: javax.el.ELException: ...xhtml: The class ...WeldProxy does not have the property ...</title><content type="html">&lt;div class='posterous_autopost'&gt;Yesterday I got hit by a very frustrating &lt;b&gt;problem&lt;/b&gt; in &lt;b&gt;developing&lt;/b&gt; a &lt;b&gt;Java EE 6 web application&lt;/b&gt; under &lt;b&gt;Oracle GlassFish 3.1 Application Server&lt;/b&gt;, using &lt;b&gt;EJB 3.1&lt;/b&gt;, &lt;b&gt;CDI&lt;/b&gt;, and &lt;b&gt;JSF 2.0 EL expression&lt;/b&gt;.&lt;div&gt; &lt;br /&gt;&lt;div&gt;The &lt;b&gt;error message&lt;/b&gt;:&lt;br /&gt;&lt;/div&gt;&lt;p /&gt;&lt;div&gt; 	 	 	 &lt;blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"&gt; &lt;b&gt;SEVERE: Error Rendering View[/pages/refills.xhtml]&lt;br /&gt;&lt;/b&gt;&lt;i&gt;javax.el.ELException: /pages/refills.xhtml: The class &amp;#39;&lt;a href="http://com.abispulsa.bisnis.service.org"&gt;com.abispulsa.bisnis.service.org&lt;/a&gt;$jboss$weld$bean-com$abispulsa$bisnis$jsf-SessionBean-RefillManager_$$_WeldProxy&amp;#39; does not have the property &amp;#39;summary&amp;#39;.&lt;br /&gt;&lt;/i&gt;	at com.sun.faces.facelets.compiler.TextInstruction.write(TextInstruction.java:88)&lt;/blockquote&gt; &lt;/div&gt;&lt;p /&gt;&lt;div&gt;It happens with this very simple &lt;b&gt;JSF 2.0 Facelets&lt;/b&gt; tag:&lt;/div&gt;&lt;p /&gt;&lt;div&gt;&amp;lt;p&amp;gt;Records: #{refillManager.summary}&amp;lt;/p&amp;gt;&lt;/div&gt; &lt;p /&gt;&lt;div&gt;Where &lt;b&gt;refillManager&lt;/b&gt; is a &lt;b&gt;EJB 3.1 bean&lt;/b&gt;:&lt;/div&gt;&lt;p /&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-family: courier new, monospace;"&gt;import javax.ejb.Stateless;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span style="font-family: courier new, monospace;"&gt;import javax.inject.Named;&lt;/span&gt;&lt;/div&gt;&lt;p /&gt; &lt;div&gt;&lt;span style="font-family: courier new, monospace;"&gt;import com.abispulsa.refill.PendingHandler;&lt;/span&gt;&lt;/div&gt;&lt;p /&gt;&lt;div&gt;&lt;span style="font-family: courier new, monospace;"&gt;@Named(&amp;quot;refillManager&amp;quot;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;@Stateless&lt;/div&gt; &lt;div&gt;&lt;span style="font-family: courier new, monospace;"&gt;public class RefillManager implements PendingHandler {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p /&gt;&lt;div&gt;Google Searches exposed many different issues, but nothing useful for my problem.&lt;/div&gt; &lt;p /&gt;&lt;div&gt;What I know is that it&amp;#39;s caused by &lt;b&gt;@Stateless&lt;/b&gt;, when I remove it and simply use &lt;b&gt;CDI&lt;/b&gt; with &lt;b&gt;@ApplicationScoped&lt;/b&gt;, it works perfectly. Of course at that point I lose &lt;b&gt;declarative JPA transactions&lt;/b&gt;.&lt;/div&gt; &lt;div&gt;(note: You can use declarative transactions without EJB using &lt;a href="http://www.seamframework.org/Seam3/PersistenceModule"&gt;Seam Persistence CDI extensions&lt;/a&gt;).&lt;/div&gt;&lt;p /&gt;&lt;div&gt;To add to the frustration, I can&amp;#39;t seem to reproduce the problem with another EJB + CDI bean. The others work fine!&lt;/div&gt; &lt;p /&gt;&lt;/div&gt;&lt;div&gt;I found the solution while reading the excellent &lt;b&gt;Java EE 6 Book&lt;/b&gt; &lt;b&gt;&lt;a href="http://www.amazon.com/gp/product/0596158025/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=springjavaee-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0596158025"&gt;Enterprise JavaBeans 3.1 from O&amp;#39;Reilly&lt;/a&gt;&lt;/b&gt;. It is &lt;b&gt;@javax.ejb.LocalBean&lt;/b&gt; !&lt;/div&gt; &lt;p /&gt;Cause of the problem is @Stateless/@Stateful session bean that &lt;b&gt;implements an interface&lt;/b&gt;, but not marked it as @javax.ejb.LocalBean.&lt;div&gt;@LocalBeans designates that a session bean exposes a no-interface view.&lt;p /&gt; If a bean implements interface(s), it seems EJB only exposes those interfaces, meaning JSF 2.0 EL will not be able to access getter/setters that are not part of the declared interfaces (although they&amp;#39;re accessible using the concrete class).&lt;p /&gt; This may also happen to &lt;a href="http://scala-enterprise.blogspot.com/2010/10/named-beans-in-ejb-31-using-scala.html"&gt;objects from &amp;quot;rich&amp;quot; languages like Groovy or Scala&lt;/a&gt;.&lt;p /&gt;&lt;b&gt;Solution:&lt;/b&gt;&lt;p /&gt;Annotate the class with &lt;b&gt;@javax.ejb.LocalBean&lt;/b&gt;.&lt;p /&gt;&lt;div&gt;&lt;b&gt;Example:&lt;/b&gt;&lt;p /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;import javax.ejb.LocalBean;&lt;/div&gt;&lt;div&gt;import javax.ejb.Stateless;&lt;/div&gt; &lt;div&gt;import javax.inject.Named;&lt;/div&gt;&lt;p /&gt;&lt;div&gt;import com.abispulsa.refill.PendingHandler;&lt;/div&gt; &lt;p /&gt;&lt;div&gt;@Named(&amp;quot;refillManager&amp;quot;)&lt;/div&gt;&lt;div&gt;@Stateless&lt;/div&gt; &lt;div&gt;&lt;b&gt;@LocalBean&lt;/b&gt;&lt;/div&gt;&lt;div&gt;public class RefillManager implements PendingHandler {&lt;/div&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;b&gt;Alternatives:&lt;/b&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Use EJB + JSF ManagedBean in XML, not CDI.&lt;/li&gt;&lt;li&gt;Use CDI + Seam Persistence / Solder, not EJB. (I guess prefer this one)&lt;/li&gt;&lt;/ol&gt;Also, when all else fails: Undeploy, restart GlassFish, redeploy.&lt;p /&gt;&lt;div&gt;If you want to develop enterprise web applications using the latest Java EE 6 and EJB 3.1 technology be sure to get &lt;b&gt;&lt;a href="http://www.amazon.com/gp/product/0596158025/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=springjavaee-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0596158025"&gt;Enterprise JavaBeans 3.1 book from O&amp;#39;Reilly&lt;/a&gt;&lt;/b&gt;.&lt;/div&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-8332187746122024528?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/8332187746122024528/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2011/04/fixing-ejb-31-cdi-jsf-20-problem.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/8332187746122024528?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/8332187746122024528?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2011/04/fixing-ejb-31-cdi-jsf-20-problem.html" title="Fixing EJB 3.1 + CDI + JSF 2.0 problem: javax.el.ELException: ...xhtml: The class ...WeldProxy does not have the property ..." /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CkYMQXs9eSp7ImA9WhZRFkk.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-3755773643232186200</id><published>2011-04-12T13:25:00.001-07:00</published><updated>2011-04-12T13:29:40.561-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-12T13:29:40.561-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Java Web Development" /><category scheme="http://www.blogger.com/atom/ns#" term="Java EE Development" /><title>JSF 2.0 Cookbook [Java EE 6 Book]</title><content type="html">&lt;div class="posterous_autopost"&gt;
&lt;div class="p_embed p_image_embed"&gt;
&lt;a href="http://www.amazon.com/gp/product/1847199526/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=springjavaee-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1847199526"&gt;&lt;img alt="Jsf-2" height="300" src="http://posterous.com/getfile/files.posterous.com/spring-java-ee/Eo5wVIPP6v0vWbtImuJhB08ZxLtpC9laueCaN1F0cH1cCOPJglkRAuZlRzVr/jsf-2.0-cookbook-java-ee-book.jpg" width="243" /&gt;&lt;/a&gt; &lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Looking for a &lt;b&gt;JSF 2.0 book&lt;/b&gt; that covers &lt;b&gt;Java EE 6 web development&lt;/b&gt;?&amp;nbsp;&lt;a href="http://www.amazon.com/gp/product/1847199526/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=springjavaee-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1847199526"&gt;&lt;b&gt;JSF 2.0 Cookbook from Packt Publishing&lt;/b&gt;&lt;/a&gt;&amp;nbsp;might be what you're looking for.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;blockquote class="gmail_quote" style="border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; margin-bottom: 0px; margin-left: 0.8ex; margin-right: 0px; margin-top: 0px; padding-left: 1ex;"&gt;
The &lt;b&gt;JSF 2.0 Cookbook&lt;/b&gt; contains step-by-step instructions for JSF users to build desktop-style interfaces in their own &lt;b&gt;web applications&lt;/b&gt;. The book is designed so that you can refer to it chapter by chapter, or you can look at the list of recipes and read them in no particular order. This book is for two types of audience: Newcomers who know the basics of JSF but are yet to develop real JSF applications. &lt;b&gt;JSF developers&lt;/b&gt; who have previous experience but are lacking best practices and a standard way of implementing functionality.&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class="posterous_autopost"&gt;
&lt;br /&gt;&lt;/div&gt;
Written by Anghel Leonard:&lt;/div&gt;
&lt;div class="posterous_autopost"&gt;
&lt;br /&gt;&lt;blockquote class="gmail_quote" style="border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; margin-bottom: 0px; margin-left: 0.8ex; margin-right: 0px; margin-top: 0px; padding-left: 1ex;"&gt;
The author is a senior &lt;b&gt;Java developer&lt;/b&gt; with more than 12 years of experience in &lt;b&gt;Java SE, Java EE&lt;/b&gt;, and the related &lt;b&gt;frameworks&lt;/b&gt;. He has written and published more than 20 articles about Java technologies and more than 100 tips and tricks. He has also written two books about &lt;b&gt;XML and Java&lt;/b&gt; (one for beginners and one for advanced developers). During this time, he has developed web applications using the latest technologies on the market. In the past two years, he has focused on&lt;b&gt; developing RIA projects&lt;/b&gt; for GIS fields. He is interested to bring on web as much desktop as possible, therefore GIS applications represents a real challenge for him.&lt;/blockquote&gt;
&lt;div&gt;
&lt;br /&gt;
Some reviews:&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote class="gmail_quote" style="border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; margin-bottom: 0px; margin-left: 0.8ex; margin-right: 0px; margin-top: 0px; padding-left: 1ex;"&gt;
I give Anghel Leonard's JSF 2.0 Cookbook ([...]) a qualified &lt;b&gt;recommendation&lt;/b&gt;, but with a couple of caveats. Certainly he succeeds in providing &lt;b&gt;JSF recipes &lt;/b&gt;that, taken as a whole, are worthwhile for the typical developer to know.&lt;/blockquote&gt;
&lt;br /&gt;
&lt;blockquote class="gmail_quote" style="border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; margin-bottom: 0px; margin-left: 0.8ex; margin-right: 0px; margin-top: 0px; padding-left: 1ex;"&gt;
I would also like to recommend this book to anybody who is interested in what can be achieved &lt;b&gt;server side&lt;/b&gt;, very quickly and with little prior knowledge. JSF 2.0 cookbook explains well how JSF can be used in conjunction other &lt;b&gt;technologies&lt;/b&gt;.&amp;nbsp;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;blockquote class="gmail_quote" style="border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; margin-bottom: 0px; margin-left: 0.8ex; margin-right: 0px; margin-top: 0px; padding-left: 1ex;"&gt;
This book covers the new features of JSF 2 in the form of about 100 hundred recipes. In my opinion these recipes give a &lt;b&gt;good&lt;/b&gt; overview of the new capabilities of the &lt;b&gt;latest version of JSF&lt;/b&gt;.&amp;nbsp;&lt;/blockquote&gt;
&lt;div&gt;
&lt;br /&gt;
You can &lt;a href="http://www.amazon.com/gp/product/1847199526/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=springjavaee-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1847199526"&gt;&lt;b&gt;buy JSF 2.0 Cookbook here on Amazon.com&lt;/b&gt;&lt;/a&gt;.&lt;/div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-3755773643232186200?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/3755773643232186200/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2011/04/jsf-20-cookbook-java-ee-book.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/3755773643232186200?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/3755773643232186200?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2011/04/jsf-20-cookbook-java-ee-book.html" title="JSF 2.0 Cookbook [Java EE 6 Book]" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0ENQXk7fCp7ImA9WhdbFEo.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-5173785473601751829</id><published>2011-04-08T04:03:00.001-07:00</published><updated>2011-10-12T19:08:10.704-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-12T19:08:10.704-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Java EE Development" /><title>Using Jackrabbit JCR 2.2.5 with SLF4J 1.6.1 and Logback Classic</title><content type="html">&lt;div class='posterous_autopost'&gt;Recently I was hit by a bug where it is impossible to use &lt;b&gt;Jackrabbit 2.2.5&lt;/b&gt; with &lt;b&gt;SLF4J 1.6.1&lt;/b&gt; due to a conflicting dependency error.&lt;br /&gt;For some reason, SLF4J 1.5.11 is still loaded.&lt;p /&gt;It turned that this is because Jackrabbit 2.2.5 &lt;a href="http://stackoverflow.com/questions/3519978/logging-framework-incompatibility/4321268#4321268"&gt;depends on Apache Tika 0.8 which in turn depends on edu.ucar:netcdf:4.2 which bundles SLF4J 1.5&lt;/a&gt;. This error &lt;a href="https://issues.apache.org/jira/browse/TIKA-556"&gt;has since been fixed for Tika 0.9&lt;/a&gt;, so this should not be a problem for future Jackrabbit 2.3 versions.&lt;p /&gt; To fix it, you need to exclude edu.ucar:netcdf:4.2 and replace the dependency with edu.ucar:netcdf:4.2-min as follows:&lt;p /&gt;&lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;groupId&amp;gt;org.apache.tika&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;artifactId&amp;gt;tika-parsers&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;version&amp;gt;0.8&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;exclusions&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;        &amp;lt;exclusion&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;            &amp;lt;!-- NOTE: Version 4.2 has bundled slf4j --&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;            &amp;lt;groupId&amp;gt;edu.ucar&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;            &amp;lt;artifactId&amp;gt;netcdf&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;        &amp;lt;/exclusion&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;/exclusions&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;!-- Patched version 4.2-min does not bundle slf4j --&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;groupId&amp;gt;edu.ucar&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;artifactId&amp;gt;netcdf&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;version&amp;gt;4.2-min&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;p /&gt;Here&amp;#39;s a complete &lt;b&gt;Maven dependencies in pom.xml&lt;/b&gt; for Jackrabbit 2.2.5 and using SLF4J 1.6.1 with &lt;b&gt;Logback classic logging implementation&lt;/b&gt;:&lt;p /&gt; &lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;!-- The JCR API --&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;dependency&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;groupId&amp;gt;javax.jcr&amp;lt;/groupId&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;artifactId&amp;gt;jcr&amp;lt;/artifactId&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;version&amp;gt;2.0&amp;lt;/version&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;/dependency&amp;gt; &lt;/span&gt;&lt;p /&gt; &lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;!-- Jackrabbit content repository --&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;dependency&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;groupId&amp;gt;org.apache.jackrabbit&amp;lt;/groupId&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;artifactId&amp;gt;jackrabbit-core&amp;lt;/artifactId&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;version&amp;gt;2.2.5&amp;lt;/version&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;/dependency&amp;gt; &lt;/span&gt;&lt;p /&gt; &lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;groupId&amp;gt;org.apache.tika&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;artifactId&amp;gt;tika-parsers&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;version&amp;gt;0.8&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;exclusions&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;        &amp;lt;exclusion&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;            &amp;lt;!-- NOTE: Version 4.2 has bundled slf4j --&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;            &amp;lt;groupId&amp;gt;edu.ucar&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;            &amp;lt;artifactId&amp;gt;netcdf&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;        &amp;lt;/exclusion&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;/exclusions&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;!-- Patched version 4.2-min does not bundle slf4j --&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;groupId&amp;gt;edu.ucar&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;artifactId&amp;gt;netcdf&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;version&amp;gt;4.2-min&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;p /&gt; &lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;!-- Use Logback for logging --&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;dependency&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;groupId&amp;gt;org.slf4j&amp;lt;/groupId&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;artifactId&amp;gt;slf4j-api&amp;lt;/artifactId&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;version&amp;gt;1.6.1&amp;lt;/version&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;/dependency&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;dependency&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;groupId&amp;gt;org.slf4j&amp;lt;/groupId&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;artifactId&amp;gt;jcl-over-slf4j&amp;lt;/artifactId&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;version&amp;gt;1.6.1&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;/dependency&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;dependency&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;groupId&amp;gt;ch.qos.logback&amp;lt;/groupId&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;artifactId&amp;gt;logback-classic&amp;lt;/artifactId&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;version&amp;gt;0.9.28&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;    &amp;lt;scope&amp;gt;runtime&amp;lt;/scope&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt; &lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-5173785473601751829?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/5173785473601751829/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2011/04/using-jackrabbit-jcr-225-with-slf4j-161.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/5173785473601751829?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/5173785473601751829?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2011/04/using-jackrabbit-jcr-225-with-slf4j-161.html" title="Using Jackrabbit JCR 2.2.5 with SLF4J 1.6.1 and Logback Classic" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEIDR3kyfSp7ImA9WhZSGUQ.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-3301278728549710837</id><published>2011-04-05T01:36:00.001-07:00</published><updated>2011-04-05T01:36:16.795-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-05T01:36:16.795-07:00</app:edited><title>Transitive Dependency Management in Groovy Grape / @Grab via @GrabExclude</title><content type="html">&lt;div class='posterous_autopost'&gt;&lt;b class="gmail_sendername"&gt;Sébastien Launay&lt;/b&gt; provided a better solution for &lt;a href="http://spring-java-ee.blogspot.com/2011/04/fixing-slow-grab-dependencies-issue.html"&gt;Fixing Slow @Grab Dependencies Issue with Groovy/Grape Scripts&lt;/a&gt;.&lt;p /&gt; I didn&amp;#39;t know that &lt;b&gt;Groovy&lt;/b&gt;&amp;#39;s &lt;b&gt;Grape / @Grab&lt;/b&gt; supports &lt;b&gt;transitive dependency management features&lt;/b&gt; (that &lt;b&gt;Apache Ivy&lt;/b&gt; underneath is actually very good at). (where are the @Grab/@GrabExclude docs???) So this is very new to me.&lt;p /&gt; Below is his post copied verbatim:&lt;p /&gt;. . .&lt;br /&gt;&lt;div class="post hentry"&gt;&lt;a href="http://spring-java-ee.blogspot.com/2011/04/fixing-slow-grab-dependencies-issue.html"&gt;&lt;/a&gt;&lt;h3 class="post-title entry-title"&gt; &lt;/h3&gt;&lt;/div&gt;Actually I think a more sexier way would be to &lt;b&gt;provide explicitly the version of groovy&lt;/b&gt; or even &lt;b&gt;exclude the dependency &lt;/b&gt;it as it is provided by the application classloader. &lt;p /&gt;So the following examples work and do not need to create a file: &lt;p /&gt;&lt;span style="font-family: courier new,monospace;"&gt;@Grab(group=&amp;quot;org.codehaus.&lt;/span&gt;&lt;span style="font-family: courier new,monospace;"&gt;groovy.modules.http-builder&amp;quot;, &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;  module=&amp;quot;http-builder&amp;quot;, version=&amp;quot;0.5.1&amp;quot;) &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;@Grab(group=&amp;quot;org.codehaus.&lt;/span&gt;&lt;span style="font-family: courier new,monospace;"&gt;groovy&amp;quot;, module=&amp;quot;groovy&amp;quot;, version=&amp;quot;1.7.10&amp;quot;) &lt;/span&gt;&lt;p /&gt;or &lt;p /&gt;&lt;span style="font-family: courier new,monospace;"&gt;@Grab(group=&amp;quot;org.codehaus.&lt;/span&gt;&lt;span style="font-family: courier new,monospace;"&gt;groovy.modules.http-builder&amp;quot;, &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;  module=&amp;quot;http-builder&amp;quot;, version=&amp;quot;0.5.1&amp;quot;) &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;@GrabExclude(&amp;quot;org.codehaus.&lt;/span&gt;&lt;span style="font-family: courier new,monospace;"&gt;groovy:groovy&amp;quot;) &lt;/span&gt;&lt;p /&gt;All of these are &lt;b&gt;workarounds&lt;/b&gt;, the problem IMHO still lies in the usage of a &lt;b&gt;version range dependency&lt;/b&gt;. &lt;p /&gt;I am not sure what happens when the application classloader has let&amp;#39;s say Groovy 1.7.0 and the Grape classloader (asuming there is a nested classloader) provides Groovy 1.8.0, I would say that Grape comes from Groovy 1.7.0 but the target script is compiled and executed with Groovy 1.8.0, am I right? &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-3301278728549710837?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/3301278728549710837/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2011/04/transitive-dependency-management-in.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/3301278728549710837?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/3301278728549710837?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2011/04/transitive-dependency-management-in.html" title="Transitive Dependency Management in Groovy Grape / @Grab via @GrabExclude" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEYFRX87eip7ImA9WhZSFkg.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-9139022826738431253</id><published>2011-04-01T03:01:00.001-07:00</published><updated>2011-04-01T03:01:54.102-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-01T03:01:54.102-07:00</app:edited><title>Fixing Slow @Grab Dependencies Issue with Groovy/Grape Scripts</title><content type="html">&lt;div class='posterous_autopost'&gt;&lt;b&gt;Groovy&lt;/b&gt; &lt;b&gt;scripts&lt;/b&gt; are not only quick to write and powerful but also very flexible because it can download Maven dependencies/artifacts automatically using the &lt;a href="http://groovy.codehaus.org/Grapes+and+grab%28%29"&gt;&lt;b&gt;@Grab&lt;/b&gt; &amp;quot;annotation&amp;quot;&lt;/a&gt;.&lt;p /&gt; However there is currently an issue being discussed:  &lt;a href="http://groovy.329449.n5.nabble.com/Grab-is-Unusably-Slow-tp371278p4274754.html"&gt;@Grab is Unusably Slow in Groovy-User mailing list&lt;/a&gt;.&lt;p /&gt;Fortunately there is a solution (actually, workaround) before the powers that be (either Grapes and/or the http-builder guys) implements a proper solution.&lt;p /&gt; The following is a verbatim copy of &lt;b&gt;Sébastien Launay&lt;/b&gt;&amp;#39;s post:&lt;p /&gt;.&lt;p /&gt;I also got the same issue which is a pain because scripting &lt;b&gt;Rest Web Service&lt;/b&gt; in &lt;b&gt;Groovy&lt;/b&gt; is very powerful especially when it is easy to share with &lt;b&gt;Grape&lt;/b&gt; / &lt;b&gt;@Grab&lt;/b&gt;. &lt;p /&gt;The dynamic &lt;b&gt;(version range) dependency&lt;/b&gt; is &lt;a href="http://svn.codehaus.org/gmod/httpbuilder/tags/0.5.1/pom.xml"&gt;actually defined by &lt;b&gt;http-builder&lt;/b&gt; himself&lt;/a&gt;. IMHO using version range is often a bad practice, at least on production release, because for the same sources the build result can be different when launched again which renders difficult bug analysis and maintenance. &lt;p /&gt;The other thing is that &lt;b&gt;Apache Ivy&lt;/b&gt; &lt;b&gt;configuration&lt;/b&gt; tries all &lt;b&gt;remote repositories&lt;/b&gt; to check for a &lt;b&gt;new version&lt;/b&gt; even if it was resolved before but this is appropriate as it is a &lt;b&gt;dynamic dependency.&lt;/b&gt; This can be tuned in Ivy with the &lt;a href="http://ant.apache.org/ivy/history/2.1.0/settings/caches/ttl.html"&gt;cache TTL feature&lt;/a&gt;. &lt;p /&gt;Indeed, I had the following logs: &lt;p /&gt;&lt;span style="font-family: courier new,monospace;"&gt;== resolving dependencies &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;org.codehaus.groovy.modules.&lt;/span&gt;&lt;div&gt;&lt;span style="font-family: courier new,monospace;"&gt;http-builder#http-builder;0.5.&lt;/span&gt;&lt;span style="font-family: courier new,monospace;"&gt;1-&amp;gt;org.codehaus.groovy#groovy;&lt;/span&gt;&lt;span style="font-family: courier new,monospace;"&gt;[1.5,1.7.99] &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;... &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;downloadGrapes: Checking cache for: dependency: &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;org.codehaus.groovy#groovy;[1.&lt;/span&gt;&lt;span style="font-family: courier new,monospace;"&gt;5,1.7.99] ... &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;default-cache: cached resolved revision expired for &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;div class="im"&gt;&lt;span style="font-family: courier new,monospace;"&gt;org.codehaus.groovy#groovy;[1.&lt;/span&gt;&lt;span style="font-family: courier new,monospace;"&gt;5,1.7.99] &lt;/span&gt;&lt;p /&gt;&lt;/div&gt;The default TTL in Ivy 2.1.0 is 10 seconds, by changing it I got &lt;br /&gt;&lt;b&gt;faster&lt;/b&gt; startup, this can be done by creating the file &lt;a href="http://svn.codehaus.org/groovy/tags/GROOVY_1_7_10/src/main/groovy/grape/defaultGrapeConfig.xml"&gt;~/.groovy/grapeConfig.xml from the one found in svn&lt;/a&gt; and &lt;br /&gt;editing the file to have: &lt;p /&gt;&lt;span style="font-family: courier new,monospace;"&gt;&amp;lt;ivysettings&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;  &amp;lt;property name=&amp;quot;ivy.cache.ttl.default&amp;quot; value=&amp;quot;15m&amp;quot;/&amp;gt; &lt;/span&gt;&lt;br style="font-family: courier new,monospace;" /&gt;&lt;span style="font-family: courier new,monospace;"&gt;... &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-9139022826738431253?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/9139022826738431253/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2011/04/fixing-slow-grab-dependencies-issue.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/9139022826738431253?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/9139022826738431253?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2011/04/fixing-slow-grab-dependencies-issue.html" title="Fixing Slow @Grab Dependencies Issue with Groovy/Grape Scripts" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;Ak4HRn8zcCp7ImA9WhZSFkk.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-6865959085885413927</id><published>2011-04-01T02:08:00.001-07:00</published><updated>2011-04-01T02:08:57.188-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-01T02:08:57.188-07:00</app:edited><title>JBoss Seam version 3.0.0 Final for Java EE 6 Released</title><content type="html">&lt;div class='posterous_autopost'&gt;&lt;p class="wikiPara"&gt; The &lt;b&gt;Seam development&lt;/b&gt; team is pleased to announce the &lt;b&gt;final release&lt;/b&gt; of &lt;b&gt; Seam 3.0&lt;/b&gt;. &lt;i&gt;Seam is a modular collection of portable extensions and tooling for Java EE6.&lt;/i&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="wikiPara"&gt;This latest version represents a significant milestone in Seam&amp;#39;s history, as it is the first release to be based on the standardized component model defined by the &lt;b&gt;CDI (JSR-299 Java Contexts and Dependency Injection)&lt;/b&gt; specification. &lt;/p&gt; &lt;p class="wikiPara"&gt; Seam&amp;#39;s goal is to enable developers to create rich, standards-based internet applications by solving many of the challenges encountered when developing software in today&amp;#39;s connected world. It achieves this by providing an integrated set of feature-centric modules, each targetted at a single area of concern. This modular design also allows users the choice of using individual Seam modules based on the requirements of their project, without forcing them to adopt the overhead of a monolithic framework stack. &lt;/p&gt; &lt;p class="wikiPara"&gt; The following table contains a list of the modules included in the Seam 3.0 release, along with a brief description of their features. &lt;/p&gt; &lt;table border="1"&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="http://www.seamframework.org/Seam3/Solder" class="regularLink" target=""&gt;Solder&lt;/a&gt;&lt;/td&gt; &lt;td&gt;Provides a collection of useful features for portable extension developers, and generally useful annotations and more for CDI-based applications.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="http://www.seamframework.org/Seam3/CatchModule" class="regularLink" target=""&gt;Catch&lt;/a&gt;&lt;/td&gt; &lt;td&gt;Provides a simple infrastructure based on the CDI event bus to allow developers to establish a unified and robust exception handling process.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="http://www.seamframework.org/Seam3/ConfigModule" class="regularLink" target=""&gt;Config&lt;/a&gt;&lt;/td&gt; &lt;td&gt;Provides the capability to configure beans via alternate bean metadata sources, such as an XML-based configuration file.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="http://www.seamframework.org/Seam3/FacesModule" class="regularLink" target=""&gt;Faces&lt;/a&gt;&lt;/td&gt; &lt;td&gt;Further unifies JSF and CDI by providing additional features not defined by the specification, and provides JSF integration with other Seam modules.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="http://www.seamframework.org/Seam3/InternationalModule" class="regularLink" target=""&gt;International&lt;/a&gt;&lt;/td&gt; &lt;td&gt;Provides a set of language and locale-based features to allow complete internationalization of your internet application.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="http://www.seamframework.org/Seam3/PersistenceModule" class="regularLink" target=""&gt;Persistence&lt;/a&gt;&lt;/td&gt; &lt;td&gt;Enables transactions and persistence features for managed beans, and provides a simplified transaction API.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="http://www.seamframework.org/Seam3/RemotingModule" class="regularLink" target=""&gt;Remoting&lt;/a&gt;&lt;/td&gt; &lt;td&gt;Allows web-based applications to interact with the server-side component model via AJAX.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="http://www.seamframework.org/Seam3/RESTModule" class="regularLink" target=""&gt;REST&lt;/a&gt;&lt;/td&gt; &lt;td&gt;Provides JAX-RS integration for your Seam-based application.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="http://www.seamframework.org/Seam3/SecurityModule" class="regularLink" target=""&gt;Security&lt;/a&gt;&lt;/td&gt; &lt;td&gt;Authentication and authorization services for your Java EE6 application.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="http://www.seamframework.org/Seam3/ServletModule" class="regularLink" target=""&gt;Servlet&lt;/a&gt;&lt;/td&gt; &lt;td&gt;Unifies the Servlet and CDI programming models via an event bridge, and provides producers for implicit Servlet objects.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="http://www.seamframework.org/Seam3/ValidationModule" class="regularLink" target=""&gt;Validation&lt;/a&gt;&lt;/td&gt; &lt;td&gt;Provides enhanced validation features based on Hibernate Validator.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="http://www.seamframework.org/Seam3/WicketModule" class="regularLink" target=""&gt;Wicket&lt;/a&gt;&lt;/td&gt; &lt;td&gt;Integrates the CDI programming model and other portable Seam enhancements with Apache Wicket.&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;h2 class="wikiHeadline2"&gt;&lt;a href="http://in.relation.to/Bloggers/Seam300FinalReleased#H-MavenUsers"&gt;Maven Users&lt;/a&gt;&lt;/h2&gt; &lt;p class="wikiPara"&gt; The Seam BOM (Bill Of Materials) is a Maven POM artifact that is provided as a convenience for your Seam application. It declares the versions for all Seam modules and third party libraries that are used in the Seam stack. To use Seam in your Maven-based project, it is first recommended that you define the Seam version you wish to use by declaring the following property value: &lt;/p&gt; &lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;&amp;lt;properties&amp;gt; &amp;lt;seam.version&amp;gt;3.0.0.Final&amp;lt;/seam.version&amp;gt; &amp;lt;/properties&amp;gt;&lt;/pre&gt;&lt;/div&gt; &lt;/div&gt; &lt;p class="wikiPara"&gt; Next, add the following section to your project&amp;#39;s POM file to import the Seam BOM: &lt;/p&gt; &lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;&amp;lt;dependencyManagement&amp;gt; &amp;lt;dependencies&amp;gt; &amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;org.jboss.seam&amp;lt;/groupId&amp;gt; &amp;lt;artifactId&amp;gt;seam-bom&amp;lt;/artifactId&amp;gt; &amp;lt;version&amp;gt;${seam.version}&amp;lt;/version&amp;gt; &amp;lt;type&amp;gt;pom&amp;lt;/type&amp;gt; &amp;lt;scope&amp;gt;import&amp;lt;/scope&amp;gt; &amp;lt;/dependency&amp;gt; &amp;lt;/dependencies&amp;gt; &amp;lt;/dependencyManagement&amp;gt;&lt;/pre&gt;&lt;/div&gt; &lt;/div&gt; &lt;p class="wikiPara"&gt; After this, it is a simple matter of declaring which Seam modules you wish to use in your project. For example, if you wish to use the Seam Catch module in your project, simply add the following dependency: &lt;/p&gt; &lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;&amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;org.jboss.seam.catch&amp;lt;/groupId&amp;gt; &amp;lt;artifactId&amp;gt;seam-catch&amp;lt;/artifactId&amp;gt; &amp;lt;/dependency&amp;gt;&lt;/pre&gt;&lt;/div&gt; &lt;/div&gt; &lt;p class="wikiPara"&gt; &lt;i class="wikiEmphasis"&gt;Please note&lt;/i&gt; that the Seam artifacts are published to the JBoss Community Maven Repository. See &lt;a href="http://www.seamframework.org/Seam3/MavenArtifacts" class="regularLink" target=""&gt;this page&lt;/a&gt; for more details on configuring Maven to use this repository. &lt;/p&gt; &lt;h2 class="wikiHeadline2"&gt;&lt;a href="http://in.relation.to/Bloggers/Seam300FinalReleased#H-GlassfishUsers"&gt;Glassfish Users&lt;/a&gt;&lt;/h2&gt; &lt;p class="wikiPara"&gt; If you use Glassfish 3.1 (or earlier) you must update the version of Weld contained inside your Glassfish installation. Please refer to the instructions at &lt;a href="http://www.seamframework.org/Seam3/Compatibility" class="regularLink" target=""&gt;http://www.seamframework.org/Seam3/Compatibility&lt;/a&gt; for further information. &lt;/p&gt; &lt;h2 class="wikiHeadline2"&gt;&lt;a href="http://in.relation.to/Bloggers/Seam300FinalReleased#H-Downloads"&gt;Downloads&lt;/a&gt;&lt;/h2&gt; &lt;p class="wikiPara"&gt; Seam is available for download as a bundled distribution that includes all the modules, or alternatively as individual downloads for each module. &lt;/p&gt; &lt;p class="wikiPara"&gt; Bundled distribution: &lt;a href="http://sourceforge.net/projects/jboss/files/Seam/3/3.0.0.Final/" class="regularLink" target=""&gt;http://sourceforge.net/projects/jboss/files/Seam/3/3.0.0.Final/&lt;/a&gt; &lt;/p&gt; &lt;p class="wikiPara"&gt; Individual module downloads: &lt;a href="http://www.seamframework.org/Seam3/Downloads" class="regularLink" target=""&gt;http://www.seamframework.org/Seam3/Downloads&lt;/a&gt; &lt;/p&gt; &lt;h2 class="wikiHeadline2"&gt;&lt;a href="http://in.relation.to/Bloggers/Seam300FinalReleased#H-Documentation"&gt;Documentation&lt;/a&gt;&lt;/h2&gt; &lt;p class="wikiPara"&gt; &lt;a href="http://docs.jboss.org/seam/3/latest/reference/en-US/html/" class="regularLink" target=""&gt;Reference Documentation&lt;/a&gt; &lt;/p&gt; &lt;p class="wikiPara"&gt; &lt;a href="http://docs.jboss.org/seam/3/latest/api/" class="regularLink" target=""&gt;API Documentation&lt;/a&gt; &lt;/p&gt; &lt;p class="wikiPara"&gt; Documentation for individual modules can also be found on the &lt;a href="http://seamframework.org/Seam3/Documentation" class="regularLink" target=""&gt;Seam documentation page&lt;/a&gt;. &lt;/p&gt; &lt;h2 class="wikiHeadline2"&gt;&lt;a href="http://in.relation.to/Bloggers/Seam300FinalReleased#H-UserForums"&gt;User Forums&lt;/a&gt;&lt;/h2&gt; &lt;p class="wikiPara"&gt; The Seam 3 user forums can be found at &lt;a href="http://www.seamframework.org/Community/Seam3Users" class="regularLink" target=""&gt;http://www.seamframework.org/Community/Seam3Users&lt;/a&gt;. &lt;/p&gt; &lt;h2 class="wikiHeadline2"&gt;&lt;a href="http://in.relation.to/Bloggers/Seam300FinalReleased#H-IRC"&gt;IRC&lt;/a&gt;&lt;/h2&gt; &lt;p class="wikiPara"&gt; The Seam community is very active on IRC. Join us on the &lt;tt&gt;#seam&lt;/tt&gt; or &lt;tt&gt;#seam-dev&lt;/tt&gt; channels on Freenode to chat with the Seam developers. Find out more on the &lt;a href="http://www.seamframework.org/Seam3/Chat" class="regularLink" target=""&gt;Seam Chat page&lt;/a&gt;. &lt;/p&gt; &lt;h2 class="wikiHeadline2"&gt;&lt;a href="http://in.relation.to/Bloggers/Seam300FinalReleased#H-Tooling"&gt;Tooling&lt;/a&gt;&lt;/h2&gt; &lt;p class="wikiPara"&gt; The Seam distribution comes bundled with &lt;a href="http://seamframework.org/Documentation/SeamForge" class="regularLink" target=""&gt;Seam Forge&lt;/a&gt;, which replaces the seam-gen tool that was part of earlier versions of Seam. Forge is a rapid application development tool for Java EE6, which provides many productivity-enhancing features. &lt;/p&gt; &lt;p class="wikiPara"&gt; &lt;a href="http://www.jboss.org/tools/download" class="regularLink" target=""&gt;JBoss Tools 3.2&lt;/a&gt; also supports Seam 3 development with its excellent CDI tooling. Some of the new features of Seam 3 are not yet covered, but are on the roadmap for JBoss Tools 3.3. You can find an informative walkthrough of the CDI tooling features &lt;a href="http://community.jboss.org/community/tools/blog/2011/01/31/overview-of-context-dependency-injection-tools" class="regularLink" target=""&gt;here&lt;/a&gt;. &lt;/p&gt; &lt;h2 class="wikiHeadline2"&gt;&lt;a href="http://in.relation.to/Bloggers/Seam300FinalReleased#H-GWT"&gt;GWT&lt;/a&gt;&lt;/h2&gt; &lt;p class="wikiPara"&gt; GWT support for CDI is provided by &lt;a href="http://www.jboss.org/errai/Components/CDI-Integration.html" class="regularLink" target=""&gt;Errai&lt;/a&gt;. Please refer to the &lt;a href="http://download.jboss.org/errai/docs/1.2.2/userguide/index.html#cdi" class="regularLink" target=""&gt;Errai reference documentation&lt;/a&gt; for details on integrating your GWT-based application with a CDI-based backend. &lt;/p&gt; &lt;h2 class="wikiHeadline2"&gt;&lt;a href="http://in.relation.to/Bloggers/Seam300FinalReleased#H-Acknowledgements"&gt;Acknowledgements&lt;/a&gt;&lt;/h2&gt; &lt;p class="wikiPara"&gt; The Seam development team consists of a small team of full-time developers, plus a rapidly growing number of community contributors! Many of the modules in Seam 3 are led by community members who love and believe in Open Source software. Their ambition, innovation and ideas have made this important milestone possible! The entire Seam community should recognize and appreciate them for their dedication to the project, which is very much a collective community effort. While there are too many names to mention individually in this post, the full list of Seam contributors can be found &lt;a href="http://docs.jboss.org/seam/3/latest/reference/en-US/html/seam.credits.html#d0e10" class="regularLink" target=""&gt;here&lt;/a&gt;. &lt;br /&gt;&lt;/p&gt;&lt;p class="wikiPara"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="wikiPara"&gt; The above article is copied verbatim from &lt;a href="http://in.relation.to/Bloggers/Seam300FinalReleased"&gt;Seam 3.0.0 Final announcement&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-6865959085885413927?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/6865959085885413927/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2011/04/jboss-seam-version-300-final-for-java.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/6865959085885413927?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/6865959085885413927?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2011/04/jboss-seam-version-300-final-for-java.html" title="JBoss Seam version 3.0.0 Final for Java EE 6 Released" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEADSH4yfCp7ImA9WhZSFUs.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-8262383068147267749</id><published>2011-03-31T03:19:00.001-07:00</published><updated>2011-03-31T03:19:39.094-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-31T03:19:39.094-07:00</app:edited><title>Autocompletion of JSF/CDI Managed Beans in JBoss Tools</title><content type="html">&lt;div class='posterous_autopost'&gt;&lt;div class='p_embed p_image_embed'&gt; &lt;a href="http://posterous.com/getfile/files.posterous.com/spring-java-ee/SDufSuXmGZXrHnBPZCEififFXgR3WIaTciPWniBASUfprUBHygmvPf4QPMMK/jboss-tools-managedbean-cdi.png"&gt;&lt;img alt="Jboss-tools-managedbean-cdi" height="234" src="http://posterous.com/getfile/files.posterous.com/spring-java-ee/wPmNniX4fArklJobFZk1lHkhkKG691xZwpoopTQCRJMs3j6QwDTVGAUrF4Na/jboss-tools-managedbean-cdi.png.scaled.500.jpg" width="500" /&gt;&lt;/a&gt; &lt;/div&gt; &lt;p&gt;Current &lt;b&gt;&lt;a href="http://www.jboss.org/tools"&gt;JBoss Tools&lt;/a&gt; 3.2&lt;/b&gt; (&lt;b&gt;Eclipse IDE&lt;/b&gt; plugin for developing &lt;b&gt;Java EE web applications&lt;/b&gt;) is &lt;a href="https://issues.jboss.org/browse/JBIDE-5045"&gt;not yet able to show &lt;b&gt;JSF 2.0&lt;/b&gt; managed beans annotated with &lt;b&gt;@ManagedBean&lt;/b&gt;&lt;/a&gt;.&lt;/p&gt;&lt;p /&gt;&lt;div&gt;For example, the code below will load just fine with &lt;b&gt;JSF 2.0&lt;/b&gt;, but JBoss Tools will &amp;quot;ignore&amp;quot; it:&lt;/div&gt;&lt;p /&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-family: courier new, monospace;"&gt;import javax.faces.bean.ManagedBean;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;import javax.faces.bean.SessionScoped;&lt;/div&gt;&lt;p /&gt;&lt;div&gt; @ManagedBean(name=&amp;quot;refillManager&amp;quot;)&lt;/div&gt;&lt;div&gt;@SessionScoped&lt;/div&gt; &lt;div&gt;public class RefillManager {&lt;/div&gt;&lt;p /&gt;&lt;/div&gt;&lt;div&gt;When you type the following in the Facelets XHTML template editor, you will not get a code assist hint for refillManager bean :&lt;/div&gt; &lt;p /&gt;&lt;div&gt;&lt;div&gt;&amp;lt;h:dataTable value=&amp;quot;#{refillManager.refills}&amp;quot;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;p /&gt;&lt;div&gt;However there is an alternative, which is actually a better one anyway. (hint: why use JSF-only Managed Beans when you have &lt;b&gt;CDI beans&lt;/b&gt; that you can use everywhere?)&lt;/div&gt; &lt;p /&gt;&lt;div&gt;Use &lt;a href="http://blogs.sun.com/enterprisetechtips/entry/using_cdi_and_dependency_injection"&gt;CDI&amp;#39;s @Named&lt;/a&gt; annotation :&lt;/div&gt;&lt;p /&gt;&lt;div&gt;&lt;div&gt;import java.io.Serializable;&lt;/div&gt; &lt;div&gt;import javax.enterprise.context.SessionScoped;&lt;/div&gt;&lt;div&gt;import javax.inject.Named;&lt;/div&gt; &lt;p /&gt;&lt;div&gt;@SuppressWarnings(&amp;quot;serial&amp;quot;)&lt;/div&gt;&lt;div&gt; @Named(&amp;quot;refillCdi&amp;quot;)&lt;/div&gt;&lt;div&gt;@SessionScoped&lt;/div&gt;&lt;div&gt; public class RefillCdi implements Serializable {&lt;/div&gt;&lt;p /&gt;&lt;div&gt;Now this CDI bean will be detected by JBoss Tools and will show up in autocompletion popup.&lt;/div&gt; &lt;/div&gt;&lt;p /&gt;&lt;div&gt;To activate CDI (Java Context and Dependency Injection) in a &lt;b&gt;Java EE 6&lt;/b&gt; web application, create an empty file named WEB-INF/beans.xml and you&amp;#39;re done. :-) JBoss Tools also has excellent support for CDI.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-8262383068147267749?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/8262383068147267749/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2011/03/autocompletion-of-jsfcdi-managed-beans.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/8262383068147267749?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/8262383068147267749?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2011/03/autocompletion-of-jsfcdi-managed-beans.html" title="Autocompletion of JSF/CDI Managed Beans in JBoss Tools" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUYCSH04eCp7ImA9Wx9aEUk.&quot;"><id>tag:blogger.com,1999:blog-5686544298279829031.post-8173363861468912040</id><published>2011-03-03T01:06:00.001-08:00</published><updated>2011-03-03T01:06:09.330-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-03T01:06:09.330-08:00</app:edited><title>JBoss AS default Administrator username &amp; password</title><content type="html">&lt;div class='posterous_autopost'&gt;As of JBoss Application Server 6.0.0.Final, the default administrator password is : &lt;p /&gt;&lt;div&gt;Username: &lt;b&gt;admin&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Password: &lt;b&gt;admin&lt;/b&gt;&lt;/div&gt;&lt;p /&gt;&lt;div&gt;You can access JBoss AS admin console from:&lt;/div&gt;&lt;div&gt;&lt;a href="http://127.0.0.1:8080/admin-console"&gt;http://127.0.0.1:8080/admin-console&lt;/a&gt;&lt;/div&gt; &lt;p /&gt;&lt;div&gt;Define the Datasources (persistence databases) with JNDI Names in: Servers &amp;gt; JBoss AS 6 (default) &amp;gt; Resources &amp;gt; Datasources &amp;gt; Local Tx Datasources.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5686544298279829031-8173363861468912040?l=spring-java-ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://spring-java-ee.blogspot.com/feeds/8173363861468912040/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://spring-java-ee.blogspot.com/2011/03/jboss-as-default-administrator-username.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/8173363861468912040?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5686544298279829031/posts/default/8173363861468912040?v=2" /><link rel="alternate" type="text/html" href="http://spring-java-ee.blogspot.com/2011/03/jboss-as-default-administrator-username.html" title="JBoss AS default Administrator username &amp;amp; password" /><author><name>Hendy Irawan</name><uri>http://www.blogger.com/profile/05192845149798446052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_NtoTtHZadHE/SOPBu7htv5I/AAAAAAAAAAM/PuboJ3TrIBA/S220/hendy-sitting_square.jpg" /></author><thr:total>1</thr:total></entry></feed>

