<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6662864844320942038</id><updated>2012-02-16T17:15:06.242-08:00</updated><category term='acegi'/><category term='hibernate'/><category term='technology'/><category term='business'/><category term='ant'/><category term='transaction'/><category term='java'/><category term='seam'/><category term='jdk'/><category term='ajax'/><category term='bug'/><category term='intro'/><category term='cloning'/><category term='spring security'/><category term='spring mvc'/><category term='maven'/><category term='serialization'/><category term='ejb 3'/><category term='ideyatech'/><category term='seam gen'/><category term='book'/><category term='jboss tools'/><category term='ideas'/><category term='war'/><category term='validation'/><category term='jboss rules engine'/><category term='custom'/><category term='ejb'/><category term='jpa'/><category term='notice'/><category term='spring'/><category term='joda time'/><category term='drools'/><category term='richfaces'/><category term='ajax4jsf'/><category term='jboss'/><category term='embedded jboss'/><category term='manning'/><category term='eclipse'/><category term='ubuntu'/><category term='testing'/><category term='c++'/><category term='social network'/><title type='text'>Java Jester</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-8713342024391473379</id><published>2008-09-23T08:56:00.000-07:00</published><updated>2008-09-23T09:02:37.746-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='notice'/><title type='text'>Moving my blog to a new location</title><content type='html'>I moved my blog 3 months ago to &lt;a href="http://www.reyjexter.com/"&gt;www.reyjexter.com&lt;/a&gt;. In addition to java and jboss related stuff, I'll also be blogging about django, python and some personal stuffs. Please check&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-8713342024391473379?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/8713342024391473379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=8713342024391473379' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/8713342024391473379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/8713342024391473379'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/09/moving-my-blog-to-new-location.html' title='Moving my blog to a new location'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-6728518685652234775</id><published>2008-05-24T10:43:00.000-07:00</published><updated>2008-05-24T10:49:53.598-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='spring mvc'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><title type='text'>HttpRequestMethodNotSupportedException when testing controller</title><content type='html'>After a spending about 2 days researching on the HttpRequestMethodNotSupportedException thrown when running AbstractController.handleRequest in my test, I decided to view spring source code to see the real cause of this problem.&lt;br /&gt;&lt;br /&gt;The problem was when creating MockHttpServletRequest, it doesn't set a default method name. To solve this problem, I simply added a request method type on the mock request object. See the following code:&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="color: rgb(255, 0, 0);"&gt;request = new MockHttpServletRequest();&lt;br /&gt;request.setMethod("POST");&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-6728518685652234775?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/6728518685652234775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=6728518685652234775' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/6728518685652234775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/6728518685652234775'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/05/httprequestmethodnotsupportedexception.html' title='HttpRequestMethodNotSupportedException when testing controller'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-6630321223541176085</id><published>2008-05-23T07:25:00.000-07:00</published><updated>2008-05-23T09:26:49.349-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='custom'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='acegi'/><category scheme='http://www.blogger.com/atom/ns#' term='spring security'/><title type='text'>Customizing spring security</title><content type='html'>One problem I encountered while trying to configure spring security is customizing it based on my own preferences. The default setup uses &lt;span style="color: rgb(255, 0, 0);"&gt;j_spring_security_login&lt;/span&gt; as the login page and &lt;span style="color: rgb(255, 0, 0);"&gt;j_spring_security_logout&lt;/span&gt; as the logout page. Although the default setup is enough to create a secured application, its not what I wanted. What I want is to configure spring security based on my own preferences, based on my own rules.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;This is the login controller that i customized :&lt;/span&gt;&lt;br /&gt;&lt;blockquote style="color: rgb(255, 0, 0);"&gt;public class LoginController extends AbstractController {&lt;br /&gt;&lt;br /&gt;    @Override&lt;br /&gt;    protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {&lt;br /&gt;        ModelAndView mav = new ModelAndView();&lt;br /&gt;       &lt;br /&gt;        SecurityContext securityContext = SecurityContextHolder.getContext();&lt;br /&gt;        Authentication auth = securityContext.getAuthentication();&lt;br /&gt;        String login = request.getParameter(&amp;quot;login&amp;quot;);&lt;br /&gt;       &lt;br /&gt;        if(login != null &amp;amp;&amp;amp; login.equals(&amp;quot;1&amp;quot;)) {&lt;br /&gt;            GrantedAuthority grantedAuthority = new GrantedAuthorityImpl(&amp;quot;ROLE_ADMIN&amp;quot;);&lt;br /&gt;            UserAuthentication userAuth = new UserAuthentication(&amp;quot;rey&amp;quot;, &amp;quot;q&amp;quot;, new GrantedAuthority[]{grantedAuthority});&lt;br /&gt;            securityContext.setAuthentication(userAuth);&lt;br /&gt;        }&lt;br /&gt;       &lt;br /&gt;        return mav;&lt;br /&gt;    }&lt;br /&gt;}&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;And the applicationContext-security.xml :&lt;/span&gt;&lt;br /&gt;&lt;blockquote style="color: rgb(255, 0, 0);"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;beans xmlns=&amp;quot;http://www.springframework.org/schema/beans&amp;quot;&lt;br /&gt;    xmlns:security=&amp;quot;http://www.springframework.org/schema/security&amp;quot;&lt;br /&gt;    xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&lt;br /&gt;    xsi:schemaLocation=&amp;quot;http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd&lt;br /&gt;                        http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd&amp;quot;&amp;gt;&lt;br /&gt;   &lt;br /&gt;    &amp;lt;security:global-method-security secured-annotations=&amp;quot;enabled&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;/security:global-method-security&amp;gt;&lt;br /&gt;   &lt;br /&gt;    &amp;lt;security:http auto-config=&amp;quot;true&amp;quot; session-fixation-protection=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;!-- &amp;lt;intercept-url pattern=&amp;quot;/**&amp;quot; access=&amp;quot;IS_AUTHENTICATED_ANONYMOUSLY&amp;quot; /&amp;gt; --&amp;gt;&lt;br /&gt;       &lt;br /&gt;        &amp;lt;security:intercept-url pattern=&amp;quot;/login.htm&amp;quot; access=&amp;quot;IS_AUTHENTICATED_ANONYMOUSLY&amp;quot; /&amp;gt;&lt;br /&gt;        &amp;lt;security:intercept-url pattern=&amp;quot;/css/**&amp;quot; access=&amp;quot;IS_AUTHENTICATED_ANONYMOUSLY&amp;quot; /&amp;gt;&lt;br /&gt;        &amp;lt;security:intercept-url pattern=&amp;quot;/images/**&amp;quot; access=&amp;quot;IS_AUTHENTICATED_ANONYMOUSLY&amp;quot; /&amp;gt;&lt;br /&gt;       &lt;br /&gt;       &lt;br /&gt;        &amp;lt;security:intercept-url pattern=&amp;quot;/**&amp;quot; access=&amp;quot;ROLE_ADMIN&amp;quot; /&amp;gt;&lt;br /&gt;        &amp;lt;security:remember-me user-service-ref=&amp;quot;jdbcDaoImpl&amp;quot; /&amp;gt;&lt;br /&gt;        &amp;lt;security:form-login login-page=&amp;quot;/login.htm&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;/security:http&amp;gt;&lt;br /&gt;   &lt;br /&gt;    &amp;lt;security:authentication-provider user-service-ref=&amp;quot;jdbcDaoImpl&amp;quot; /&amp;gt;&lt;br /&gt;   &lt;br /&gt;&amp;lt;/beans&amp;gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-6630321223541176085?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/6630321223541176085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=6630321223541176085' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/6630321223541176085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/6630321223541176085'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/05/customizing-spring-security.html' title='Customizing spring security'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-4915748551748460239</id><published>2008-05-18T02:18:00.000-07:00</published><updated>2008-05-18T02:21:06.951-07:00</updated><title type='text'>Rewriting url without editing apache vhost config</title><content type='html'>You can use &lt;a href="http://tuckey.org/urlrewrite/"&gt;http://tuckey.org/urlrewrite/&lt;/a&gt; to rewrite the url of your java web application. This works when used with any java framework or even  plain servlet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-4915748551748460239?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/4915748551748460239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=4915748551748460239' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/4915748551748460239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/4915748551748460239'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/05/rewriting-url-without-editing-apache.html' title='Rewriting url without editing apache vhost config'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-1455323778429720453</id><published>2008-05-16T11:14:00.001-07:00</published><updated>2008-05-16T11:24:18.292-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='drools'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss rules engine'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='acegi'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><title type='text'>Early Conclusion : JBoss Rules Engine vs Spring Security (aka ACEGI)</title><content type='html'>I was trying to integrate spring security on my application but got a bit disappointed with it. Comparing it to jboss rules engine (drools), I find spring security a bit harder to be understood. The documentation and example is not very clear, most of the example on the documentation covers only xml based configuration and It didnt cover programmatic usage of the library.&lt;br /&gt;&lt;br /&gt;Although its too early to conclude which one is better, right now I feel that jboss rules engine is a better choice since its much easier to use and understand. But anyway I'm gonna continue playing around with spring security because I may have missed something.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-1455323778429720453?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/1455323778429720453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=1455323778429720453' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/1455323778429720453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/1455323778429720453'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/05/early-conclusion-jboss-rules-engine-vs.html' title='Early Conclusion : JBoss Rules Engine vs Spring Security (aka ACEGI)'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-8242409626361225684</id><published>2008-05-15T11:02:00.000-07:00</published><updated>2008-05-15T11:09:59.899-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='transaction'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><title type='text'>rolling back transaction</title><content type='html'>Annotating the method with the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;@Transactional(readOnly=false, propagation=Propagation.NESTED)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;will cause the transaction to wait until all sub transaction is completed. If any of the sub transaction fails, the global transaction will fail as well causing everything to be rolled back&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-8242409626361225684?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/8242409626361225684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=8242409626361225684' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/8242409626361225684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/8242409626361225684'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/05/rolling-back-transaction.html' title='rolling back transaction'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-8444148428606877767</id><published>2008-05-13T10:12:00.000-07:00</published><updated>2008-05-13T10:28:38.724-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='jpa'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><title type='text'>new setup when configuring spring, spring mvc and using hibernate sa jpa provider</title><content type='html'>After spending a couple of hours configuring this kind of setup, I was able to make my application run. Though there are some noticeable changes to when setting up application using struts/spring/hibernate or seam/ejb/jsf, I was able to learn some  few things and they are the following:&lt;br /&gt;&lt;br /&gt;1. using stereo type annotations (@Service, @Repository) is okay but not @Controller because it doesn't offer a very flexible way to configure controllers.&lt;br /&gt;&lt;br /&gt;2. When using hibernate as persistence provider, it uses javassist to modify the java byte code.&lt;br /&gt;&lt;br /&gt;3. persistence.xml should be placed on classes/META-INF not on web/META-INF (for tomcat users) because some very weird thing happens&lt;br /&gt;&lt;br /&gt;4. Using spring mvc is much simpler than struts because the dependencies are not too many and by default a spring application context is already available when initializing a dispatcher servlet.&lt;br /&gt;&lt;br /&gt;5. No need to use load time weaver when using hibernate as persistence provider.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-8444148428606877767?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/8444148428606877767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=8444148428606877767' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/8444148428606877767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/8444148428606877767'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/05/new-setup-when-configuring-spring.html' title='new setup when configuring spring, spring mvc and using hibernate sa jpa provider'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-4930508593710370204</id><published>2008-04-28T10:20:00.001-07:00</published><updated>2008-04-30T05:59:55.032-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='ideyatech'/><title type='text'>Blogging Spring</title><content type='html'>Starting on the 3rd week of may, I'll work for &lt;a href="http://www.ideyatech.com/"&gt;ideyatech&lt;/a&gt;, a company that uses &lt;a href="http://www.springframework.org/"&gt;spring framework&lt;/a&gt; as its main technology. I'll be posting topics about spring and related technologies that is usually used with it.&lt;br /&gt;&lt;br /&gt;Though I'm more of an &lt;a href="http://www.seamframework.org/"&gt;seam&lt;/a&gt; guy now, working with spring will help me see the real difference between ejb/seam and spring. By working with both frameworks, I can determine the pros and cons of each framework and maybe in the future use them at the same time.&lt;br /&gt;&lt;br /&gt;In the following days, I'll be posting more about Spring MVC, Spring Webflow and probably Spring Security (also known as ACEGI Security)&lt;br /&gt;&lt;span style="display: block;" id="formatbar_Buttons"&gt;&lt;span class="down" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-4930508593710370204?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/4930508593710370204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=4930508593710370204' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/4930508593710370204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/4930508593710370204'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/04/blogging-spring.html' title='Blogging Spring'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-5077617015748187950</id><published>2008-04-26T13:22:00.000-07:00</published><updated>2008-04-26T23:40:02.642-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jboss tools'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>JBoss Tools on Ubuntu 8.04</title><content type='html'>I finished the installation of Ubuntu 8.04 last night. I just became a 100% open source developer by completely dumping windows. The installation was not very straight forward because I encountered several problems with eclipse running on Ubuntu. The following are the things I needed to solve while trying to install my Java development tools:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. Eclipse keeps on crashing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This problem was really annoying because eclipse keeps on crashing every 5-10 minutes.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution: &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Just add this at the end of your eclipse.ini (considering that no previous modification to that file was made):&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;-XX:MaxPermSize=90M&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You will need to adjust the size depending on your computers memory.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. Cannot open any file with JBoss Tools HTML Editor&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When opening any file using JBoss Tools HTML Editor, I get a message box with the following error:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;/home/jexter/app/eclipse/plugins/org.mozilla.xulrunner.gtk.linux.x86_1.8.1.3-20070904/xulrunner/libjavaxpcomglue.so: libstdc++.so.5: cannot open shared object file: No such file or directory&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Just install libstdc++5 by simply running this:&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: rgb(255, 0, 0);"&gt;apt-get install libstdc++5&lt;/pre&gt;&lt;br /&gt;Don't forget to update your packages first.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-5077617015748187950?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/5077617015748187950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=5077617015748187950' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/5077617015748187950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/5077617015748187950'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/04/jboss-tools-on-ubuntu-804.html' title='JBoss Tools on Ubuntu 8.04'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-7392618507110027397</id><published>2008-04-16T09:04:00.000-07:00</published><updated>2008-04-16T09:48:10.102-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ajax4jsf'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='richfaces'/><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><category scheme='http://www.blogger.com/atom/ns#' term='seam'/><title type='text'>[BUG] conversation ended, timed out or was processing another request</title><content type='html'>When using seam framework and ajax4jsf, there is a bug when trying to re render an area using aj4:poll. Here is my code:&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="color: rgb(255, 0, 0);"&gt;&amp;lt;h:outputText id="currentDateTime" value="#{currentDatetime}" styleClass="dateTime"&amp;gt;&lt;br /&gt;                &amp;lt;s:convertDateTime pattern="MMMM dd, yyyy - hh:mm:ss a"/&amp;gt;&lt;br /&gt;            &amp;lt;/h:outputText&amp;gt;&lt;br /&gt;       &lt;br /&gt;            &amp;lt;h:form&amp;gt;&lt;br /&gt;                &amp;lt;a4j:poll interval="1000" reRender="currentDateTime" eventsQueue="timerQueue"&amp;gt;&amp;lt;/a4j:poll&amp;gt;&lt;br /&gt;             &amp;lt;/h:form&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The solution is not yet clear as some say they need to tweak the &lt;span style="font-style: italic;"&gt;concurrent-request-timeout&lt;/span&gt; in components.xml and others say that you need to simply make sure that the ajax request is not aschronous by using the eventsQueue property. Although the idea worked for me, some knowledgeable people say that tweaking those things depends on app by app.&lt;br /&gt;&lt;br /&gt;Here are some useful links:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://sfwk.org/Community/ConversationEndedTimedOutOrWasProcessingAnotherRequest"&gt;http://sfwk.org/Community/ConversationEndedTimedOutOrWasProcessingAnotherRequest&lt;/a&gt;&lt;br /&gt;&lt;a href="http://docs.jboss.com/seam/2.0.1.GA/reference/en/html/conversations.html#d0e5208"&gt;http://docs.jboss.com/seam/2.0.1.GA/reference/en/html/conversations.html#d0e5208&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-7392618507110027397?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/7392618507110027397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=7392618507110027397' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/7392618507110027397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/7392618507110027397'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/04/bug-conversation-ended-timed-out-or-was.html' title='[BUG] conversation ended, timed out or was processing another request'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-3100957770350361280</id><published>2008-04-01T10:18:00.001-07:00</published><updated>2008-04-16T09:26:05.341-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ajax4jsf'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='seam'/><title type='text'>Adding ajax to jsf component using Ajax4JSF</title><content type='html'>&lt;a href="https://ajax4jsf.dev.java.net/"&gt;Ajax4JSF&lt;/a&gt; is a library that easily adds ajax functionality to existing jsf components. As oppose to &lt;a href="http://www.icefaces.org/"&gt;Icefaces &lt;/a&gt;which is a set of jsf components that already have built in ajax functionalities, &lt;a href="https://ajax4jsf.dev.java.net/"&gt;Ajax4JSF &lt;/a&gt;offers  a much flexible way  to add ajax functionalities to jsf components.  It offers refreshing of display without the need to refresh the entire form. On the downside, Ajax4JSF is harder to use for very complex jsf components.&lt;br /&gt;&lt;br /&gt;Using Ajax4JSF in seam 2.0 is easy. Just remove the line in your faces-config.xml:&lt;blockquote style="color: rgb(255, 0, 0);"&gt;&amp;lt;view-handler&amp;gt;com.sun.facelets.FaceletViewHandler&amp;lt;/view-handler&amp;gt;&lt;/blockquote&gt;and add the following code on your web.xml just aboe the seam listener definition:&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;context-param&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;        &amp;lt;param-name&amp;gt;org.ajax4jsf.VIEW_HANDLERS&amp;lt;/param-name&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;        &amp;lt;param-value&amp;gt;com.sun.facelets.FaceletViewHandler&amp;lt;/param-value&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    &amp;lt;/context-param&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;/span&gt;You will also need to define the following on you xml schema:&lt;br /&gt;&lt;blockquote style="color: rgb(255, 0, 0);"&gt;xmlns:a4j="https://ajax4jsf.dev.java.net/ajax&lt;/blockquote&gt;The following code is an example of a simple clock functionality that updates its time by polling / reRendering the component. I didnt use a backing bean on this example:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;h:outputText id="currentDateTime" value="#{currentDatetime}" styleClass="dateTime"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;                        &amp;lt;s:convertDateTime pattern="MMMM dd, yyyy - hh:mm:ss a"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;                    &amp;lt;/h:outputText&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;                    &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;                    &amp;lt;h:form&amp;gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;                        &amp;lt;a4j:poll interval="1000" reRender="currentDateTime"&amp;gt;&amp;lt;/a4j:poll&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;                    &amp;lt;/h:form&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-3100957770350361280?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/3100957770350361280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=3100957770350361280' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/3100957770350361280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/3100957770350361280'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/04/adding-ajax-to-jsf-component-using.html' title='Adding ajax to jsf component using Ajax4JSF'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-7524556802050538822</id><published>2008-04-01T08:32:00.000-07:00</published><updated>2008-04-01T08:44:38.440-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss tools'/><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><category scheme='http://www.blogger.com/atom/ns#' term='seam'/><title type='text'>Execute hbm2ddl create-drop when running integration test</title><content type='html'>When using JBoss Tools 2.0.0 GA, the generated test project doesn't allow me to provide a custom persistence.xml. I'm not sure if this is a bug or the feature is not yet included on the given version. The persistence.xml being used when the application is deployed and when running test is the same. So what I did is update the hbm2ddl.auto property of the &lt;span style="color: rgb(255, 0, 0);"&gt;projectname-ejb/META-INF/persistence.xml &lt;/span&gt;to &lt;span style="color: rgb(255, 0, 0);"&gt;create/create-drop&lt;/span&gt; when running test and then when deploying the application, i switch it back to &lt;span style="color: rgb(255, 0, 0);"&gt;update.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Right now I don't want to waste my time just figuring out how to run test that uses a different persistence context. I have already spent 2 days just doing that but nothing happened. Its either I wait for a major JBoss Tools update or I'll try solving the problem again once I get some free time.&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-7524556802050538822?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/7524556802050538822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=7524556802050538822' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/7524556802050538822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/7524556802050538822'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/04/execute-hbm2ddl-create-drop-when.html' title='Execute hbm2ddl create-drop when running integration test'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-2098188978007205293</id><published>2008-03-22T09:36:00.000-07:00</published><updated>2008-03-22T10:08:32.851-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>object reference in java is different in c++</title><content type='html'>The following lines of code did not work as I expected:&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="color: rgb(255, 0, 0);"&gt;Date monthStartDate = null;&lt;br /&gt;Date monthEndDate = null;&lt;br /&gt;dateTimeUtil.fillStartAndEndDate(date, monthStartDate, monthEndDate);&lt;br /&gt;   &lt;br /&gt;getLog().info("START: " + monthStartDate);&lt;br /&gt;getLog().info("END: " + monthEndDate);&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;And the fillStartAndEndDate method:&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="color: rgb(255, 0, 0);"&gt;public void fillStartAndEndDate(Date date, Date start, Date end) {&lt;br /&gt;      DateTime dateTime = new DateTime(date.getTime());&lt;br /&gt;   &lt;br /&gt;      int startDay = dateTime.dayOfMonth().getMinimumValue();&lt;br /&gt;      DateTime startDate = new DateTime(dateTime.getYear(), dateTime.getMonthOfYear(), startDay, 0 ,0 ,0 ,0);&lt;br /&gt;      int endDay = dateTime.dayOfMonth().getMaximumValue();&lt;br /&gt;      DateTime endDate = new DateTime(dateTime.getYear(), dateTime.getMonthOfYear(), endDay, 0 ,0 ,0 ,0);&lt;br /&gt;   &lt;br /&gt;      start = jodaDateTimeToJavaDate(startDate);&lt;br /&gt;      end = jodaDateTimeToJavaDate(endDate);&lt;br /&gt;  }&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The results were the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;START: null&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;END: null&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is one of those very basic things I sometimes overlook. At first, I thought that object reference in java works the same as the object reference in c++. In java, after creating a new instance of the object, the object (start param variable on the example) is not anymore pointing to the same reference which makes the method's local variable have a different value from the one that was originally passed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-2098188978007205293?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/2098188978007205293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=2098188978007205293' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/2098188978007205293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/2098188978007205293'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/03/object-reference-in-java-is-different.html' title='object reference in java is different in c++'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-1450879689570185944</id><published>2008-03-22T06:59:00.000-07:00</published><updated>2008-03-22T09:48:26.836-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ant'/><category scheme='http://www.blogger.com/atom/ns#' term='war'/><category scheme='http://www.blogger.com/atom/ns#' term='seam'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><title type='text'>Manage WAR dependencies in Seam using Maven</title><content type='html'>I've written a pom.xml that will emanage the dependencies using maven. The following is my pom.xml:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;project xmlns="http://maven.apache.org/POM/4.0.0"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   xmlns:artifact="antlib:org.apache.maven.artifact.ant" &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;groupId&amp;gt;com.reyjexter&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;artifactId&amp;gt;exacto&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;name&amp;gt;exacto&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;version&amp;gt;1.0&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;packaging&amp;gt;war&amp;lt;/packaging&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;repositories&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;repository&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;id&amp;gt;jboss&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;name&amp;gt;The JBoss maven repo&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;url&amp;gt;http://repository.jboss.com/maven2/&amp;lt;/url&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;/repository&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;/repositories&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;parent&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;groupId&amp;gt;org.jboss.seam&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;artifactId&amp;gt;root&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;version&amp;gt;2.0.1.GA&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;/parent&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;build&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;finalName&amp;gt;exacto&amp;lt;/finalName&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;plugins&amp;gt;&lt;/span&gt;&lt;br /&gt;     &lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;plugin&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;     &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;     &amp;lt;artifactId&amp;gt;maven-antrun-plugin&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;     &amp;lt;version&amp;gt;1.1&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;     &amp;lt;executions&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;          &amp;lt;execution&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;        &amp;lt;phase&amp;gt;generate-sources&amp;lt;/phase&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;      &amp;lt;configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;        &amp;lt;tasks&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;           &amp;lt;echo&amp;gt;***Deleting WEB-INF/lib dir&amp;lt;/echo&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;           &amp;lt;delete&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;            &amp;lt;fileset dir="web/WEB-INF/lib" includes="**/*.jar"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;           &amp;lt;/delete&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;        &amp;lt;/tasks&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;      &amp;lt;/configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;      &amp;lt;goals&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;       &amp;lt;goal&amp;gt;run&amp;lt;/goal&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;      &amp;lt;/goals&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    &amp;lt;/execution&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;     &amp;lt;/executions&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;/plugin&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;plugin&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;        &amp;lt;artifactId&amp;gt;maven-war-plugin&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;        &amp;lt;version&amp;gt;2.0&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;           &amp;lt;webappDirectory&amp;gt;/web&amp;lt;/webappDirectory&amp;gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;        &amp;lt;/configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;/plugin&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;/plugins&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;/build&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;dependencies&amp;gt;   &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;groupId&amp;gt;org.jboss.seam&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;artifactId&amp;gt;jboss-seam&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;exclusions&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    &amp;lt;exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;     &amp;lt;groupId&amp;gt;dom4j&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;       &amp;lt;artifactId&amp;gt;dom4j&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    &amp;lt;/exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    &amp;lt;exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;     &amp;lt;groupId&amp;gt;javax.el&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;        &amp;lt;artifactId&amp;gt;el-api&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    &amp;lt;/exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    &amp;lt;exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;     &amp;lt;groupId&amp;gt;org.jboss.el&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;        &amp;lt;artifactId&amp;gt;jboss-el&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    &amp;lt;/exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    &amp;lt;exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;      &amp;lt;groupId&amp;gt;jboss&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;         &amp;lt;artifactId&amp;gt;javassist&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    &amp;lt;/exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;/exclusions&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;groupId&amp;gt;org.jboss.seam&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;artifactId&amp;gt;jboss-seam-ui&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;groupId&amp;gt;com.sun.facelets&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;artifactId&amp;gt;jsf-facelets&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;groupId&amp;gt;commons-digester&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;artifactId&amp;gt;commons-digester&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;version&amp;gt;1.8&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;exclusions&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;     &amp;lt;exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;      &amp;lt;groupId&amp;gt;commons-logging&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;       &amp;lt;artifactId&amp;gt;commons-logging&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;     &amp;lt;/exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    &amp;lt;/exclusions&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;groupId&amp;gt;org.jboss.seam&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;artifactId&amp;gt;jboss-seam-debug&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;version&amp;gt;2.0.1.GA&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;groupId&amp;gt;org.richfaces.framework&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;artifactId&amp;gt;richfaces-api&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;version&amp;gt;3.1.3.GA&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;exclusions&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    &amp;lt;exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;     &amp;lt;groupId&amp;gt;commons-collections&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;artifactId&amp;gt;commons-collections&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    &amp;lt;/exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;/exclusions&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;groupId&amp;gt;org.richfaces.framework&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;artifactId&amp;gt;richfaces-impl&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;version&amp;gt;3.1.3.GA&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;exclusions&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    &amp;lt;exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;     &amp;lt;groupId&amp;gt;commons-collections&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;artifactId&amp;gt;commons-collections&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    &amp;lt;/exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;groupId&amp;gt;javax.servlet&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;artifactId&amp;gt;servlet-api&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;/exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;groupId&amp;gt;javax.faces&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;artifactId&amp;gt;jsf-impl&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;/exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;groupId&amp;gt;javax.servlet&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;artifactId&amp;gt;jstl&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;/exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;groupId&amp;gt;javax.faces&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;artifactId&amp;gt;jsf-api&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;/exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;/exclusions&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;groupId&amp;gt;org.richfaces.ui&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;artifactId&amp;gt;richfaces-ui&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;version&amp;gt;3.1.3.GA&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;exclusions&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    &amp;lt;exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;     &amp;lt;groupId&amp;gt;commons-collections&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;artifactId&amp;gt;commons-collections&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    &amp;lt;/exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;groupId&amp;gt;javax.servlet&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;artifactId&amp;gt;servlet-api&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;/exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;groupId&amp;gt;javax.faces&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;artifactId&amp;gt;jsf-impl&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;/exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;groupId&amp;gt;javax.servlet&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;artifactId&amp;gt;jstl&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;/exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;groupId&amp;gt;javax.faces&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;artifactId&amp;gt;jsf-api&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;/exclusion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   &amp;lt;/exclusions&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &amp;lt;/dependencies&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;/project&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The code simply removes the jar libraries from web/WEB-INF/lib and copies the maven dependencies to that folder.&lt;br /&gt;&lt;br /&gt;I'll be posting a different configuration for ear and ejb jar in a couple of days&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-1450879689570185944?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/1450879689570185944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=1450879689570185944' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/1450879689570185944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/1450879689570185944'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/03/manage-war-dependencies-in-seam-using.html' title='Manage WAR dependencies in Seam using Maven'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-8979809456344025726</id><published>2008-03-18T06:35:00.000-07:00</published><updated>2008-03-18T10:19:07.449-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='manning'/><category scheme='http://www.blogger.com/atom/ns#' term='ejb 3'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>New EBJ 3 book</title><content type='html'>Knowledge in EJB is very important when studying seam framework because the framework itself was designed to be tightly coupled with ejb (although pojo's can also be used when developing applications, i think seam works better with ejb).&lt;br /&gt;&lt;br /&gt;A week ago, the book I ordered from amazon arrived. The book entitled "EJB 3 In Action" from manning publishing covers the basics and important parts of ejb framework that is commonly used. Having read the book "Hibernate In Action" book from the same publisher, I think this book will be easily understood by people new to ejb 3.&lt;br /&gt;&lt;br /&gt;Here are fresh from the box screenshots :D&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;td valign="top"&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_rOrq2e7BqFI/R9_InWFC4sI/AAAAAAAAABY/URbDyKQ9IQE/s1600-h/100_0641.jpg"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_rOrq2e7BqFI/R9_InWFC4sI/AAAAAAAAABY/URbDyKQ9IQE/s320/100_0641.jpg" alt="" id="BLOGGER_PHOTO_ID_5179078674766553794" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td valign="top"&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_rOrq2e7BqFI/R9_In2FC4tI/AAAAAAAAABg/udV-8EXQbWI/s1600-h/100_0642.jpg"&gt;&lt;img style="cursor: pointer;" src="http://3.bp.blogspot.com/_rOrq2e7BqFI/R9_In2FC4tI/AAAAAAAAABg/udV-8EXQbWI/s320/100_0642.jpg" alt="" id="BLOGGER_PHOTO_ID_5179078683356488402" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-8979809456344025726?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/8979809456344025726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=8979809456344025726' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/8979809456344025726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/8979809456344025726'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/03/new-ebj-3-book.html' title='New EBJ 3 book'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_rOrq2e7BqFI/R9_InWFC4sI/AAAAAAAAABY/URbDyKQ9IQE/s72-c/100_0641.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-7055440786565416906</id><published>2008-03-10T08:54:00.000-07:00</published><updated>2008-03-10T09:20:27.236-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ejb'/><category scheme='http://www.blogger.com/atom/ns#' term='joda time'/><category scheme='http://www.blogger.com/atom/ns#' term='seam'/><title type='text'>Joda time and Seam / EJB</title><content type='html'>To use joda time libraries in seam project, simply copy joda-time-1.5.jar to PROJECTNAME&lt;projectname&gt;-ear project folder and add the following in your application.xml:&lt;br /&gt;&lt;br /&gt;&lt;module&gt; &amp;lt;module&amp;gt;&lt;br /&gt;     &amp;lt;java&amp;gt;joda-time-1.5.jar&amp;lt;/java&amp;gt;&lt;br /&gt; &amp;lt;/module&amp;gt;&lt;java&gt;&lt;/java&gt;&lt;br /&gt;&lt;/module&gt;&lt;br /&gt;&lt;br /&gt;When restarting jboss app server, the library for some unknown reason is not copied to deploy directory and Exception saying that joda time library cannot be found. Just copy the jar for to &lt;projectname&gt;&lt;/projectname&gt;&lt;/projectname&gt;PROJECTNAME&lt;projectname&gt;&lt;projectname&gt;-ear.ear folder in jboss deploy dir (for  exploded deployment only)&lt;/projectname&gt;&lt;/projectname&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-7055440786565416906?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/7055440786565416906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=7055440786565416906' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/7055440786565416906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/7055440786565416906'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/03/joda-time-and-seam.html' title='Joda time and Seam / EJB'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-4343090959861138231</id><published>2008-03-01T11:14:00.000-08:00</published><updated>2008-03-01T11:21:20.266-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='serialization'/><category scheme='http://www.blogger.com/atom/ns#' term='cloning'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><title type='text'>'Smart cloning' using JBoss serialization</title><content type='html'>I was trying to look for an easier way to clone objects (easier than using java.lang.Cloneable class) and I found out that using the jboss serialization library is easier and faster. The following code shows how to clone an object:&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="color: rgb(255, 0, 0);"&gt;try {&lt;br /&gt;       JBossObjectOutputStream jbossSerializer = new JBossObjectOutputStream(null);&lt;br /&gt;     User newUser = (User) jbossSerializer.smartClone(user);&lt;br /&gt;     System.out.println(newUser);&lt;br /&gt;}&lt;br /&gt;catch(Exception e) {&lt;br /&gt;     System.out.println("EXCEPTION CAUGHT: " + e.getMessage());&lt;br /&gt;}&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;using jboss serialization, you can also clone "Non serializable" objects.&lt;br /&gt;&lt;br /&gt;you will need &lt;a href="http://labs.jboss.com/serialization"&gt;jboss-serialization.jar&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogs.jboss.com/blog/clebert/"&gt;http://blogs.jboss.com/blog/clebert/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-4343090959861138231?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/4343090959861138231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=4343090959861138231' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/4343090959861138231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/4343090959861138231'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/03/smart-cloning-using-jboss-serialization.html' title='&apos;Smart cloning&apos; using JBoss serialization'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-6565941713917768702</id><published>2008-02-27T04:37:00.000-08:00</published><updated>2008-02-27T08:00:26.265-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='seam'/><category scheme='http://www.blogger.com/atom/ns#' term='validation'/><title type='text'>Custom hibernate validator that retrieves information from database in seam</title><content type='html'>Using hibernate validation, we can decouple the validation rules and at the same time make it reusable for future projects. For example we want to validated if the username given already exist on the database and usually we just put our validation logics on the session bean or action (in struts).  At the start of the project this looks ok but as the project progress and some new specification changes, new functionalities are added and some parts of your code gets refactored things get a bit messier.&lt;br /&gt;&lt;br /&gt;Instead of simply dumping all the validation logic on the session bean we can create a custom hibernate validator which later can be used by annotating the getter of the entity property. Below is my code to validate if the username if it already exist on my database.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Username.java - The validator annotation definition&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="color: rgb(255, 0, 0);"&gt;@Target(ElementType.METHOD)&lt;br /&gt;@Retention(RetentionPolicy.RUNTIME)&lt;br /&gt;@Documented&lt;br /&gt;@ValidatorClass(UsernameValidator.class)&lt;br /&gt;public @interface Username {&lt;br /&gt;String message() default "Username already exists";&lt;br /&gt;}&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;UserValidator.java - The validator class implementation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="color: rgb(255, 0, 0);"&gt;public class UsernameValidator implements Validator&lt;username&gt;, Serializable{&lt;br /&gt;&lt;br /&gt;private static final long serialVersionUID = -1458203631809206211L;&lt;br /&gt;&lt;br /&gt;public void initialize(Username parameters) {&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;public boolean isValid(Object value) {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   UserHome userHome = (UserHome) Component.getInstance("userHome");&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   User user = userHome.findUser((String)value);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   // return true if no user with the given value was found&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   if(user == null) {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;       return true;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;// return true if the user retrieved is equals to the current instance in home&lt;br /&gt;if(user.getId() == userHome.getInstance().getId()) {&lt;br /&gt;    return true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// return false if the username exist on our database&lt;br /&gt;return false;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;/username&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;User.java - and finally, the entity class&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;blockquote style="color: rgb(255, 0, 0);"&gt;public class User extends BaseEntity {&lt;br /&gt;&lt;br /&gt;private static final long serialVersionUID = 6148649482941380604L;&lt;br /&gt;private String username;&lt;br /&gt;&lt;br /&gt;@Length(min=3, max=32, message="Username should be 3-32 characters")&lt;br /&gt;@NotNull&lt;br /&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;@Username&lt;/span&gt;&lt;br /&gt;public String getUsername() {&lt;br /&gt;return username;&lt;br /&gt;}&lt;br /&gt;}&lt;/blockquote&gt;The validation code above simply tries to retrieve the user from database. If it returned null it means that no user with the given user name exist to it returns true (meaning the validation is successful). If a user with the given username is found, it checks if the user instance from userHome component is the same so that the validation will still be successful if we try to save it without modifying anything. Returning false will cause the validation process to return error message which can be later display by using &lt;h:messages&gt; in our xhtml.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;References:&lt;br /&gt;&lt;a href="http://www.hibernate.org/hib_docs/validator/reference/en/html_single/"&gt;&lt;br /&gt;hibernate docs&lt;/a&gt;&lt;br /&gt;&lt;a href="http://anonsvn.jboss.org/repos/hibernate/validator/trunk/src/java/org/hibernate/validator/"&gt;hibernate validator source codes&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/h:messages&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-6565941713917768702?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/6565941713917768702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=6565941713917768702' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/6565941713917768702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/6565941713917768702'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/02/custom-hibernate-validator-that.html' title='Custom hibernate validator that retrieves information from database in seam'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-57991473185287779</id><published>2008-02-26T04:01:00.000-08:00</published><updated>2008-02-26T04:16:05.628-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seam'/><title type='text'>RESTful paging using EntityQuery in seam</title><content type='html'>Extending &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;EntityQuery&lt;/span&gt; in seam 2.0.1 GA is not working properly. For some reason, the '&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;firstResult&lt;/span&gt;' is not injected by default and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;isNextExists&lt;/span&gt;() method always return false. The solution i found was to override both &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;setFirstResult&lt;/span&gt;() and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;isNextExists&lt;/span&gt;() method. I manually injected the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;firstResult&lt;/span&gt; request context parameter, created an implementation of isNextExists() and everything seems to be working.  Here is my &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;EntityQuery&lt;/span&gt; subclass:&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="color: rgb(255, 0, 0);"&gt;@Name("&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;userList&lt;/span&gt;")&lt;br /&gt;public class &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;UserList&lt;/span&gt; extends &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;EntityQuery&lt;/span&gt;&lt;user&gt; {&lt;br /&gt;&lt;br /&gt; private static final long &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;serialVersionUID&lt;/span&gt; = 4676553441988735518L;&lt;br /&gt;&lt;br /&gt; public &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;UserList&lt;/span&gt;() {&lt;br /&gt;     &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;setMaxResults&lt;/span&gt;(2);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; @Override&lt;br /&gt; public String &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;getEjbql&lt;/span&gt;() {&lt;br /&gt;     return "select user from User user";&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; @&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;RequestParameter&lt;/span&gt;("&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;firstResult&lt;/span&gt;")&lt;br /&gt; @Override&lt;br /&gt; public void &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;setFirstResult&lt;/span&gt;(Integer &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;firstResult&lt;/span&gt;) {&lt;br /&gt;     if(&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;firstResult&lt;/span&gt;==null) {&lt;br /&gt;         &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;firstResult&lt;/span&gt; = 0;&lt;br /&gt;     }&lt;br /&gt;     super.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;setFirstResult&lt;/span&gt;(&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;firstResult&lt;/span&gt;);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; @Override&lt;br /&gt; public &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;boolean&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;isNextExists&lt;/span&gt;() {&lt;br /&gt;     if(&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;getFirstResult&lt;/span&gt;() + &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;getMaxResults&lt;/span&gt;() &lt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;getResultCount&lt;/span&gt;()) {&lt;br /&gt;         return true;&lt;br /&gt;     }&lt;br /&gt;     return false;&lt;br /&gt; }&lt;br /&gt;}&lt;/user&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;And my &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;xhtml&lt;/span&gt; code:&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;&amp;lt;s:link view="/userList.xhtml" value="Previous" rendered="#{userList.previousExists}"&amp;gt;&lt;br /&gt;     &amp;lt;f:param value="#{userList.previousFirstResult}" name="firstResult" /&amp;gt;&lt;br /&gt;    &amp;lt;/s:link&amp;gt;&lt;br /&gt;  &lt;br /&gt;    &amp;lt;s:link view="/userList.xhtml" value="Next" rendered="#{userList.nextExists}"&amp;gt;&lt;br /&gt;     &amp;lt;f:param value="#{userList.nextFirstResult}" name="firstResult" /&amp;gt;&lt;br /&gt;    &amp;lt;/s:link&amp;gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-57991473185287779?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/57991473185287779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=57991473185287779' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/57991473185287779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/57991473185287779'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/02/restful-paging-using-entityquery-in.html' title='RESTful paging using EntityQuery in seam'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-3655135051163352811</id><published>2008-02-26T00:45:00.000-08:00</published><updated>2008-02-26T02:34:21.311-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='social network'/><category scheme='http://www.blogger.com/atom/ns#' term='technology'/><category scheme='http://www.blogger.com/atom/ns#' term='ideas'/><category scheme='http://www.blogger.com/atom/ns#' term='business'/><title type='text'>Social Network Business Applications / Virtualization Industry</title><content type='html'>I know this topic isn't about j2ee but i'm lately amazed by how system virtualization market have been growing. For the past few weeks, Sun Microsystems acquired Innotek, the creator of virtual box, an open-source counter part of VMWare. Today, Novell just bought PlateSpin (a company that focuses on virtualization systems).&lt;br /&gt;&lt;br /&gt;But what is virtualization anyway? I think it's a way of doing something without the physical existence of the required thing or a way to do business without the existence of the system in the same location.&lt;br /&gt;&lt;br /&gt;One of the ideas that started popping on my mind is what I call "Social Network Business Applications". These are applications that help businesses manage their daily work while at the same time making it "shareable" between different locations.&lt;br /&gt;&lt;br /&gt;Anyway I'll talk more about these ideas later because I still need to think harder about them.&lt;br /&gt;&lt;br /&gt;References: http://en.wikipedia.org/wiki/Virtualization&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-3655135051163352811?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/3655135051163352811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=3655135051163352811' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/3655135051163352811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/3655135051163352811'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/02/system-virtualization-industry.html' title='Social Network Business Applications / Virtualization Industry'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-3032444850799543187</id><published>2008-02-16T21:00:00.000-08:00</published><updated>2008-02-19T02:31:42.892-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='embedded jboss'/><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><category scheme='http://www.blogger.com/atom/ns#' term='seam'/><category scheme='http://www.blogger.com/atom/ns#' term='jdk'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><title type='text'>Integration testing in Seam 2.0.0 GA, JDK 1.6 and JBoss 4.2.2 GA  using JBoss Tools 2.0.0 GA is broken</title><content type='html'>I was trying my first integration test but just using the default generated test class and xml meta data by jboss tools, i get the following error:&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="color: rgb(255, 0, 0);"&gt;ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Instantiated: name=DeploymentFilter state=Described&lt;br /&gt;java.lang.IllegalStateException: Class not found: [Ljava.lang.String;&lt;br /&gt;at org.jboss.metadata.spi.signature.Signature.stringsToClasses(Signature.java:174)&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;i tried the following things:&lt;br /&gt;&lt;br /&gt;1. followed this &lt;a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassNotFoundJava.lang.StringInJDK6"&gt;http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassNotFoundJava.lang.StringInJDK6&lt;/a&gt;&lt;br /&gt;2. downloaded jboss embedded beta&lt;br /&gt;3. upgraded to seam 2.1.0 AI&lt;br /&gt;&lt;br /&gt;none of them worked for me.&lt;br /&gt;&lt;br /&gt;lastly, i tried downloading seam 2.0.1 GA and installed jdk 1.5. i configured the test project's compiler compliance level to 5.0 instead of 6.0 (6.0 default for some reason. maybe because my default jdk is 1.6)  and the result were so much better.&lt;br /&gt;&lt;br /&gt;to remove the error message saying something like this:&lt;br /&gt;&lt;pre style="color: rgb(204, 153, 51);"&gt;Could not instantiate Seam component: authenticator&lt;/pre&gt;drools related libraries needs to be included since we are using the rule based engine and Identity class is part of it.  just include the seam/lib/drools-core.jar, seam/lib/drools-compiler.jar and seam/lib/core.jar.&lt;br /&gt;&lt;br /&gt;after copying the drools related libraries and executing the test, a different kind of error is thrown. this time an error saying that the "security.drl is missing" you will need to copy that file from seam/seam-gen/resource/security.drl and place it to &lt;projectname&gt;projectname-test/bootstrap/deploy/ folder.&lt;br /&gt;&lt;br /&gt;run it again and the test will be successful!&lt;br /&gt;&lt;br /&gt;embedded jboss is needed when testing seam components or ejb's but based on the jboss seam integration testing documenation, the stable version have problems when using jdk 1.6. since there are compatability issues when testing using seam 2.0 GA on jdk 1.6, i think staying with 2.0.1GA and jdk 1.5 is better at the moment.&lt;/projectname&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-3032444850799543187?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/3032444850799543187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=3032444850799543187' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/3032444850799543187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/3032444850799543187'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/02/integration-testing-in-jdk-16-and-jboss.html' title='Integration testing in Seam 2.0.0 GA, JDK 1.6 and JBoss 4.2.2 GA  using JBoss Tools 2.0.0 GA is broken'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-7486509529461933558</id><published>2008-02-15T09:50:00.000-08:00</published><updated>2008-02-15T10:31:01.951-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><category scheme='http://www.blogger.com/atom/ns#' term='seam'/><category scheme='http://www.blogger.com/atom/ns#' term='seam gen'/><title type='text'>Fresh seam project created using Seam 2.0.0 GA, JBoss Tools 2.0.0 GA on JBoss 4.2.2 BUG</title><content type='html'>After creating a new project using JBoss Tools 2.0.0 GA, Seam 2.0.0 GA and tried deploying the application, I encountered this problem:&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="color: rgb(255, 0, 0);"&gt;java.lang.RuntimeException: error while reading /WEB-INF/components.xml&lt;br /&gt;at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:136)&lt;br /&gt;at org.jboss.seam.init.Initialization.create(Initialization.java:86)&lt;br /&gt;at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)&lt;br /&gt;at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)&lt;/blockquote&gt;&lt;br /&gt;and somewhere below the stack trace...&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;Caused by: java.lang.IllegalArgumentException: Exception setting property org.jboss.seam.core.init.jndiPattern on component org.jboss.seam.core.init.  Expression @jndiPattern@ evaluated to null.&lt;br /&gt;at org.jboss.seam.init.Initialization.installComponentFromXmlElement(Initialization.java:407)&lt;br /&gt;at org.jboss.seam.init.Initialization.installComponentsFromXmlElements(Initialization.java:257)&lt;br /&gt;at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:132)&lt;br /&gt;... 138 more&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;i think the problem here was when building the application. the value of @jndiPattern@ in components.properties should replace the same constant name defined in components.xml but for some reason, it did not.&lt;br /&gt;&lt;br /&gt;my simple solution (although not very elegant) is to hardcode the value in components.xml. so instead of using @jndiPattern@ i copied its value from components.properties&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-7486509529461933558?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/7486509529461933558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=7486509529461933558' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/7486509529461933558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/7486509529461933558'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/02/fresh-seam-project-created-using-seam.html' title='Fresh seam project created using Seam 2.0.0 GA, JBoss Tools 2.0.0 GA on JBoss 4.2.2 BUG'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6662864844320942038.post-5164650613315059902</id><published>2008-02-07T07:26:00.000-08:00</published><updated>2008-02-15T10:32:47.550-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='intro'/><title type='text'>Intro</title><content type='html'>I started this blog because I want to keep track of my progress and at the same time share the things I'm learning while studying java ee. At the moment, I'll be concentrating on studying  EJB 3.0, JSF, JBoss Seam Framework and other related technologies to JBoss.&lt;br /&gt;&lt;br /&gt;I've chosen to go for EJB instead of spring because I believe that the topics concerning EJB is broader than that of the spring framework. Also, I feel more security and stability with technologies that follow the standard specifications. EJB does, so I'll go for it.&lt;br /&gt;&lt;br /&gt;I would like to thank my fiancee for creating a very nice logo for me (the one you see at the upper right part of this page). She designed it using the same colors used in the JBoss logo.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6662864844320942038-5164650613315059902?l=reyjexter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reyjexter.blogspot.com/feeds/5164650613315059902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6662864844320942038&amp;postID=5164650613315059902' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/5164650613315059902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6662864844320942038/posts/default/5164650613315059902'/><link rel='alternate' type='text/html' href='http://reyjexter.blogspot.com/2008/02/lorem-ipsum.html' title='Intro'/><author><name>Rey Jexter Bumalay</name><uri>http://www.blogger.com/profile/18369902492426908546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_rOrq2e7BqFI/R6sjJFXcMMI/AAAAAAAAAAQ/P75_PXRzsYY/S220/DSC01363.JPG'/></author><thr:total>0</thr:total></entry></feed>
