<?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-7159775730630790475</id><updated>2011-07-08T05:09:58.666-07:00</updated><category term='community'/><category term='glassfish'/><category term='migration'/><category term='java ee'/><category term='jsf'/><category term='roo'/><category term='jms'/><category term='webservices'/><category term='patterns'/><category term='globalcode'/><category term='ajax'/><category term='spring'/><title type='text'>Not a Single Shot</title><subtitle type='html'>Software Development, Java, Frameworks, Web Services, Tricks, and the like</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://notasingleshot.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7159775730630790475/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://notasingleshot.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>rbellia</name><uri>http://www.blogger.com/profile/16458112425797359023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_JvyYnThlB9Q/S0xijcf4h8I/AAAAAAAABaE/A8BYq3ZpGQM/S220/fromning.bin.jpeg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7159775730630790475.post-234285253106877751</id><published>2010-04-03T15:57:00.000-07:00</published><updated>2010-04-05T08:47:54.492-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java ee'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='glassfish'/><category scheme='http://www.blogger.com/atom/ns#' term='jsf'/><title type='text'>Java EE 6 with Fine Beers - Beer 2</title><content type='html'>This is the 2nd of &lt;a href="http://notasingleshot.blogspot.com/2010/03/java-ee-6-with-fine-beers-introdution.html"&gt;several articles&lt;/a&gt; reporting my experiences while migrating an enterprise&amp;nbsp; application to Glassfish V3.&lt;br /&gt;&lt;br /&gt;This post will cover the issues around migrating JSF 1.2 + RichFaces 3.x applications to Glassfish V3.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #e69138;"&gt;&lt;b&gt;Not so hard to face it&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;We where happy with our JSF / RichFaces applications running in V2. Richfaces delivers high quality RIA components at a very affordable learning curve, for developers familiar to JSF. &lt;br /&gt;&lt;br /&gt;When using Galssfish V2/Java EE 5/JSF/Facelets stack we need to include the Facelets JAR into our web application, and to activate it in faces-config.xml, more specifically with a view handler configuration.&amp;nbsp; Before migrating the application I studied JSF topics in Java EE 6 Tutorial, and found this important statement: &lt;br /&gt;&lt;br /&gt;"&lt;i&gt;As of JavaServer Faces 2.0, Facelets is a part of JavaServer Faces specification and also the &lt;b&gt;preferred&lt;/b&gt; presentation technology&lt;/i&gt;"&lt;br /&gt;&lt;br /&gt;It means that we do not need to include Facelts JAR, nor configure its view handler in faces-config.xml. So I did in the immigrant JSF application, and deployed it to V3. The error I received when I requested the JSF applications by the web browser was:&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;javax.servlet.ServletException: PWC1232: Exceeded maximum depth for nested request dispatches: 20&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It forced me to do some research, and soon I realized that RichFaces 3.x is not compatible to JSF 2.0. We could not wait for RichFaces 4 release - that will be JSF 2 compatible - as we are very dependent on RichFaces components. Pressure meter rising...&lt;br /&gt;&lt;br /&gt;With a further research I found some folks facing the same issue here&lt;br /&gt;&lt;a href="http://forums.sun.com/thread.jspa?threadID=5419682" target="_blank"&gt;http://forums.sun.com/thread.jspa?threadID=5419682&lt;/a&gt;&lt;br /&gt;and a wiki explanation here &lt;br /&gt;&lt;a href="http://wiki.glassfish.java.net/Wiki.jsp?page=JavaServerFacesRI#section-JavaServerFacesRI-IWantToUseMojarra1.2InGlassfishV3" target="_blank"&gt;http://wiki.glassfish.java.net/Wiki.jsp?page=JavaServerFacesRI#section-JavaServerFacesRI-IWantToUseMojarra1.2InGlassfishV3&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Both explain how to do a class loader trick, via sun-web.xml, to force Glassfish V3 to use Mojarra 1.2 (JSF 1.2 reference implementation) and to keep the environment RichFaces-friendly.&lt;br /&gt;&lt;br /&gt;It sounds nice and safe, as long as your WAR module is going to be deployed as an independent application. I discovery that this work around limits Java EE dependency injection when I read:&lt;br /&gt;&lt;a href="http://bleathem.blogspot.com/2010/01/glassfish-v2-and-v3-on-same-host-behind.html" target="_blank"&gt;http://bleathem.blogspot.com/2010/01/glassfish-v2-and-v3-on-same-host-behind.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In my case, the WAR module is deployed inside an EAR, and receive EJBs and Resource injections from sibling modules. So I managed to find more options.&lt;br /&gt;&lt;br /&gt;Fortunatelly I received good news via twitter: RichFaces 3.3.3 beta had just been released, and there was a work around to JSF 2: &lt;br /&gt;&lt;a href="http://community.jboss.org/wiki/RichFaces333andJSF20" target="_blank"&gt;http://community.jboss.org/wiki/RichFaces333andJSF20&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The article teaches how to turn off the view handler with a context-param in web.xml:&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;i&gt;&lt;code&gt; &lt;/code&gt;&lt;/i&gt;&lt;span style="color: black; font-size: large;"&gt;&lt;code&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;param-name: javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; param-value: true&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;/div&gt;It didn't work right away, but at some point in the article's thread we have "&lt;i&gt;Facelets 1.1.15 should still be used because of dependencies in RichFaces from the Tag Handlers classes.&lt;/i&gt;"&lt;br /&gt;Facelets 1.1.15, huh ? Researching a little further it came to me:&lt;br /&gt;&lt;a href="http://community.jboss.org/message/521844#521844"&gt;http://community.jboss.org/message/521844#521844&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This last post elucidates the need to include jsf-facelets-1.1.15.B1.jar into WEB-INF/lib in addition to disable the Facelets View Handler. Notice, however that I didn't include jsf-api.2.x nor jsf-imp.2.x (as the proposed solution does) because it is already present in Glassfish V3.&lt;br /&gt;&lt;br /&gt;And that's what I had to do in order to enjoy RichFaces powerful Ajax components with JSF 2.0 and Glassfish V3. We need to celebrate it with a Brazilian bier, don't we ?&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_JvyYnThlB9Q/S7fEgLg1meI/AAAAAAAABb0/XRgvuBz7LLs/s1600-h/IMG_2984.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://3.bp.blogspot.com/_JvyYnThlB9Q/S7fEgLg1meI/AAAAAAAABb0/XRgvuBz7LLs/s200/IMG_2984.JPG" width="150" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Black Princess Gold&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Type:&lt;/b&gt; Pilsen&lt;br /&gt;&lt;b&gt;Price:&lt;/b&gt; $$&lt;br /&gt;&lt;b&gt;Website:&lt;/b&gt; http://www.cervejablackprincess.com.br&lt;br /&gt;&lt;b&gt;Harmonizes with:&lt;/b&gt; Lamb&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7159775730630790475-234285253106877751?l=notasingleshot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://notasingleshot.blogspot.com/feeds/234285253106877751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://notasingleshot.blogspot.com/2010/04/java-ee-6-with-fine-beers-beer-2.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7159775730630790475/posts/default/234285253106877751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7159775730630790475/posts/default/234285253106877751'/><link rel='alternate' type='text/html' href='http://notasingleshot.blogspot.com/2010/04/java-ee-6-with-fine-beers-beer-2.html' title='Java EE 6 with Fine Beers - Beer 2'/><author><name>rbellia</name><uri>http://www.blogger.com/profile/16458112425797359023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_JvyYnThlB9Q/S0xijcf4h8I/AAAAAAAABaE/A8BYq3ZpGQM/S220/fromning.bin.jpeg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_JvyYnThlB9Q/S7fEgLg1meI/AAAAAAAABb0/XRgvuBz7LLs/s72-c/IMG_2984.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7159775730630790475.post-2456499168550534406</id><published>2010-04-03T10:35:00.000-07:00</published><updated>2010-04-03T10:37:56.987-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='community'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='roo'/><title type='text'>Roo Replay</title><content type='html'>&lt;span class="long_text" id="result_box"&gt;&lt;span style="background-color: white;" title="Durante a demo de Roo no Spring Casual Class eu cometi um erro, ao executar o Roo Shell em um diretório diferente do que havia sido planejado."&gt;During the &lt;/span&gt;&lt;/span&gt;&lt;span class="long_text" id="result_box"&gt;&lt;span style="background-color: white;" title="Durante a demo de Roo no Spring Casual Class eu cometi um erro, ao executar o Roo Shell em um diretório diferente do que havia sido planejado."&gt;Roo &lt;/span&gt;&lt;/span&gt;&lt;span class="long_text" id="result_box"&gt;&lt;span style="background-color: white;" title="Durante a demo de Roo no Spring Casual Class eu cometi um erro, ao executar o Roo Shell em um diretório diferente do que havia sido planejado."&gt;demo at Spring Casual Class I made a mistake, when running Roo Shell in a different directory than had been planned. So&lt;/span&gt;&lt;span style="background-color: white;" title="Conclusão, os artefatos do Roo foram criados onde eu não queria."&gt;, the &lt;/span&gt;&lt;/span&gt;&lt;span class="long_text" id="result_box"&gt;&lt;span style="background-color: white;" title="Conclusão, os artefatos do Roo foram criados onde eu não queria."&gt;Roo &lt;/span&gt;&lt;/span&gt;&lt;span class="long_text" id="result_box"&gt;&lt;span style="background-color: white;" title="Conclusão, os artefatos do Roo foram criados onde eu não queria."&gt;artifacts were created where I did not want. &lt;/span&gt;&lt;span style="background-color: white;" title="Ao perceber o erro saí do Roo Shell, mudei para o diretório correto e avisei: &amp;quot;Vamos ter um replay dos comandos&amp;quot;, aproveitando a oportunidade para reforçar como é realmente rápido construir software com o Roo Shell."&gt;When I noticed the error I quit Roo Shell, moved to the correct directory and warned: "We'll have a replay of the commands", taking the opportunity to reinforce how it's really quick to build software with Roo Shell.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="long_text" id="result_box"&gt;&lt;span style="background-color: white;" title="Do meio da platéia surgiu: &amp;quot;Não vai me dizer que o Roo tem um comando de replay ?&amp;quot;."&gt;And &lt;/span&gt;&lt;/span&gt;&lt;span class="long_text" id="result_box"&gt;&lt;span style="background-color: white;" title="Do meio da platéia surgiu: &amp;quot;Não vai me dizer que o Roo tem um comando de replay ?&amp;quot;."&gt;"Don't tell me that it has a replay command"&lt;/span&gt;&lt;/span&gt;&lt;span class="long_text" id="result_box"&gt;&lt;span style="background-color: white;" title="Do meio da platéia surgiu: &amp;quot;Não vai me dizer que o Roo tem um comando de replay ?&amp;quot;."&gt; came from the middle of the audience. &lt;/span&gt;&lt;span style="background-color: white;" title="Tem sim - eu poderia ter utilizado o arquivo log.roo eo comando script."&gt;Yes I do - I could have used the &lt;b&gt;log.roo&lt;/b&gt; file and &lt;b&gt;script &lt;/b&gt;command. &lt;/span&gt;&lt;span style="background-color: white;" title="Na ocasião preferi fazer tudo de novo pelo Roo Shell, mas comentei brevemente a respeito do &amp;quot;replay&amp;quot;."&gt;At that the time I preferred to do it all again by Roo Shell, but I briefly touched on the "replay". &lt;/span&gt;&lt;span style="background-color: white;" title="Esse recurso, na minha opinião, é um dos mais valiosos, e tem me ajudado bastante durante os projetos, e em minha curva de aprendizado com o Roo. Vamos tratar disso, e aproveitar para deixar registrado o exemplo que utilizei durante o Spring Casual Class"&gt;This feature, in my opinion, is one of the most valuable and has helped me a lot during the projects, and during my learning curve with Roo. Let's talk about it, and also make for the example I used during Spring Casual Class&lt;/span&gt;&lt;span style="background-color: white;" title="."&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="long_text" id="result_box"&gt;&lt;span style="background-color: white;" title="Toda vez que executamos comandos pelo Roo Shell nós temos um histórico, gravado no arquivo log.roo, que fica localizado na raiz do projeto."&gt;Every time we execute commands by Roo Shell we have a history, recorded in the log.roo, which is located in the root of the project. &lt;/span&gt;&lt;span style="background-color: white;" title="Esse arquivo pode ser utilizado com base para repetir comandos executados anteriormente (no mesmo ou em outro projeto)."&gt;This file can be used to repeat previously executed commands (in the same or another project). &lt;/span&gt;&lt;span style="background-color: white;" title="A receita é a seguinte:"&gt;The steps are:&lt;/span&gt;&lt;/span&gt;&lt;span class="long_text" id="result_box"&gt;&lt;span style="background-color: white;" title="."&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="long_text" id="result_box"&gt;&lt;span style="background-color: white;" title="Ao perceber o erro saí do Roo Shell, mudei para o diretório correto e avisei: &amp;quot;Vamos ter um replay dos comandos&amp;quot;, aproveitando a oportunidade para reforçar como é realmente rápido construir software com o Roo Shell."&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="long_text" id="result_box"&gt;&lt;span title="1 - Crie uma cópia do arquivo log.roo com outro nome, mantendo a extensão, e salve-o na raiz do projeto onde deve ser executado."&gt;1 - Create a copy of the &lt;b&gt;log.roo&lt;/b&gt; with another name, keeping the extension and save it in the root of the project which should be executed.&lt;/span&gt;&lt;span title="2 - Edite o arquivo, removendo comandos que não interessam, renomeando campos e classes, conforme a necessidade."&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="long_text" id="result_box"&gt;&lt;span title="2 - Edite o arquivo, removendo comandos que não interessam, renomeando campos e classes, conforme a necessidade."&gt;2 - Edit the file, removing commands that do not matter, renaming fields and classes as needed. &lt;/span&gt;&lt;span title="Também podemos acrescentar novos comandos."&gt;We can also add new commands.&lt;/span&gt;&lt;span title="3 - Abra o Roo Shell e execute: script nome do arquivo de historico"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="long_text" id="result_box"&gt;&lt;span title="3 - Abra o Roo Shell e execute: script nome do arquivo de historico"&gt;3 - Open the Roo Shell and run: &lt;b&gt;script &lt;/b&gt;&lt;i&gt;yourfile.roo&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="long_text" id="result_box"&gt;&lt;span style="background-color: white;" title="Ao perceber o erro saí do Roo Shell, mudei para o diretório correto e avisei: &amp;quot;Vamos ter um replay dos comandos&amp;quot;, aproveitando a oportunidade para reforçar como é realmente rápido construir software com o Roo Shell."&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="long_text" id="result_box"&gt;&lt;span style="background-color: white;" title="Ao perceber o erro saí do Roo Shell, mudei para o diretório correto e avisei: &amp;quot;Vamos ter um replay dos comandos&amp;quot;, aproveitando a oportunidade para reforçar como é realmente rápido construir software com o Roo Shell."&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="long_text" id="result_box"&gt;&lt;span style="background-color: white;" title="Os comandos serão executados em seu projeto eo arquivo log.roo será atualizado com esses últimos comandos."&gt;The commands will run on your project and the file will be updated with log.roo latter commands.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="long_text" id="result_box"&gt;&lt;span style="background-color: white;" title="Os comandos serão executados em seu projeto eo arquivo log.roo será atualizado com esses últimos comandos."&gt;&lt;br /&gt;&lt;/span&gt;&lt;span title="Faça a experiência:"&gt;Try it out:&lt;/span&gt;&lt;span title="1 - Crie um diretório qualquer"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="long_text" id="result_box"&gt;&lt;span title="1 - Crie um diretório qualquer"&gt;1 - Create some directory&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="long_text" id="result_box"&gt;&lt;span title="1 - Crie um diretório qualquer"&gt;&lt;/span&gt;&lt;span style="background-color: white;" title="2 - Salve o conteúdo abaixo nesse diretório com o nome de arquivo casualclass.roo"&gt;2 - Save the content below is such directory as a file named &lt;i&gt;casualclass.roo&lt;/i&gt;&lt;/span&gt;&lt;span style="background-color: white;" title="3 - No diretório execute o Roo Shell e em seguida: script casualclass.roo"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="long_text" id="result_box"&gt;&lt;span style="background-color: white;" title="3 - No diretório execute o Roo Shell e em seguida: script casualclass.roo"&gt;3 - cd to such directory an run Roo Shell, and then type : &lt;b&gt;script &lt;i&gt;casualclass.roo&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: #d9ead3;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;"&gt;project --topLevelPackage globalcode.casualclass&lt;br /&gt;persistence setup --database HYPERSONIC_IN_MEMORY --provider HIBERNATE &lt;br /&gt;entity --class ~.model.DesiredTalks&lt;br /&gt;field string --fieldName description --sizeMin 5 --sizeMax 40 --notNull &lt;br /&gt;field date --fieldName bestDate --type java.util.Date --persistenceType JPA_DATE --future &lt;br /&gt;finder list --class ~.model.&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;"&gt;DesiredTalks&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;"&gt; finder add findDesiredTalksByDescriptionLike&lt;br /&gt;controller all --package ~.web&lt;br /&gt;perform eclipse&lt;br /&gt;quit&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7159775730630790475-2456499168550534406?l=notasingleshot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://notasingleshot.blogspot.com/feeds/2456499168550534406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://notasingleshot.blogspot.com/2010/04/roo-replay.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7159775730630790475/posts/default/2456499168550534406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7159775730630790475/posts/default/2456499168550534406'/><link rel='alternate' type='text/html' href='http://notasingleshot.blogspot.com/2010/04/roo-replay.html' title='Roo Replay'/><author><name>rbellia</name><uri>http://www.blogger.com/profile/16458112425797359023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_JvyYnThlB9Q/S0xijcf4h8I/AAAAAAAABaE/A8BYq3ZpGQM/S220/fromning.bin.jpeg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7159775730630790475.post-5437631183627796763</id><published>2010-03-07T09:27:00.000-08:00</published><updated>2010-03-08T05:27:27.855-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='migration'/><category scheme='http://www.blogger.com/atom/ns#' term='jms'/><category scheme='http://www.blogger.com/atom/ns#' term='java ee'/><category scheme='http://www.blogger.com/atom/ns#' term='glassfish'/><title type='text'>Java EE 6 with Fine Beers - Beer 1</title><content type='html'>This is the first of &lt;a href="http://notasingleshot.blogspot.com/2010/03/java-ee-6-with-fine-beers-introdution.html"&gt;several articles&lt;/a&gt; reporting my experiences while migrating an enterprise&amp;nbsp; application to Glassfish V3.&lt;br /&gt;&lt;br /&gt;This post will cover one specific migration challenge: A partial migration supported by remote JMS connections.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Thank God there is Loose Coupling&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;About one year and half ago, in order to amend a diversity of integrations with on-line services of our business partners, I preferred to modularize the architecture by controlling slave integration modules with JMS. That's the way I designed and how it was implemented:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_JvyYnThlB9Q/S5PrM1jM1lI/AAAAAAAABbc/h9mOefLepWs/s1600-h/remote_JMS1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="127" src="http://1.bp.blogspot.com/_JvyYnThlB9Q/S5PrM1jM1lI/AAAAAAAABbc/h9mOefLepWs/s400/remote_JMS1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Once the slave modules have straightforward responsibilities they were chosen to be moved first to the new home. The plan was to keep the main application in the old Glassfish for a while, using JMS to communicate.&lt;br /&gt;&lt;br /&gt;The question is:&amp;nbsp; How to configure MessageDriven Beans (V3 hosted) to consume from remote (V2 hosted) destinations ?&lt;br /&gt;&lt;br /&gt;I was not able to find all the answers in Glassfish documentation. Indeed it gave me good directions, and it was helpful as reference. Interestingly the solution was clearly found in &lt;b&gt;Java EE 5 tutorial&lt;/b&gt;, that depicts the issue of remote JMS resources using Glassfish:&lt;br /&gt;&lt;a href="http://docs.sun.com/app/docs/doc/819-3669/bnchp?a=view" target="_blank"&gt;An Application Example That Consumes Messages from a Remote Server.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here is the bottom line of the configuration:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_JvyYnThlB9Q/S5PtY7omouI/AAAAAAAABbk/mWL6F3-3gzE/s1600-h/remote_JMS2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="187" src="http://3.bp.blogspot.com/_JvyYnThlB9Q/S5PtY7omouI/AAAAAAAABbk/mWL6F3-3gzE/s400/remote_JMS2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;The original Connection Factory and the original destinations are kept in V2.&lt;/li&gt;&lt;li&gt;A "proxy" connection factory is created in V3, using the same name and referencing the original one, through &lt;b&gt;&lt;i&gt;AddressList&lt;/i&gt;&lt;/b&gt; property.&lt;/li&gt;&lt;li&gt;The JMS destinations used by slaves were duplicated (dummy, same jndi name) in V3.&lt;/li&gt;&lt;li&gt;In Glassfih, MDBs had to configured to use to a specific connection factory (the proxy) with sun-ejb-jar.xml, the proprietary deployment descriptor&lt;/li&gt;&lt;/ul&gt;The proxy connection factory can be created in V3 using CLI (asadmin):&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;create-jms-resource --property &lt;b&gt;AddressList&lt;/b&gt;=&lt;i&gt;&lt;b&gt;V2-host-ip&lt;/b&gt;&lt;/i&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;--restype javax.jms.ConnectionFactory &lt;i&gt;&lt;b&gt;&lt;span style="background-color: #b6d7a8;"&gt;remote-connection-factory-jndi-name&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;The sun-ejb-jar.xml files have to be provided as follow:&lt;br /&gt;&amp;lt;sun-ejb-jar&amp;gt;&lt;br /&gt;&amp;lt;enterprise-beans&amp;gt;&lt;br /&gt;&amp;lt;ejb&amp;gt;&lt;br /&gt;&amp;lt;ejb-name&amp;gt;&lt;b&gt;&lt;i&gt;logical-mdb-name&lt;/i&gt;&lt;/b&gt;&amp;lt;/ejb-name&amp;gt;&lt;br /&gt;&amp;lt;mdb-connection-factory&amp;gt;&lt;br /&gt;&amp;lt;jndi-name&amp;gt;&lt;i style="background-color: #b6d7a8;"&gt;&lt;b&gt;remote-connection-factory-jndi-name&lt;/b&gt;&lt;/i&gt;&amp;lt;/jndi-name&amp;gt;&lt;br /&gt;&amp;lt;/mdb-connection-factory&amp;gt;&lt;br /&gt;&amp;lt;/ejb&amp;gt;&lt;br /&gt;&amp;lt;/enterprise-beans&amp;gt;&lt;br /&gt;&amp;lt;/sun-ejb-jar&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Conclusions&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The main application doesn't need a change, it will continue to use its original JMS resources.&lt;/li&gt;&lt;li&gt;Slave Modules only needed to include configurations in sun-ejb-jar.xml, with no source code changes.&lt;/li&gt;&lt;li&gt;At the time that main application moves to V3 the only thing we need is to remove the AddressList property, turning the proxy connection factory into a real one.&lt;/li&gt;&lt;li&gt;As a positive side effect of this partial migration scenario, we improved scalability, hosting components into different servers.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;Last but Not Least&lt;/b&gt;&lt;br /&gt;As I had promised let's celebrate this migration move with a nice Brazilian beer:&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_JvyYnThlB9Q/S5Pv3WXb0CI/AAAAAAAABbs/o4afcrtRmow/s1600-h/IMG_2986.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://2.bp.blogspot.com/_JvyYnThlB9Q/S5Pv3WXb0CI/AAAAAAAABbs/o4afcrtRmow/s200/IMG_2986.JPG" width="150" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;Eisenbahn&lt;/b&gt;&lt;/i&gt; (Rail Road, in German)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Type&lt;/b&gt;: Pilsen&lt;br /&gt;&lt;b&gt;Price&lt;/b&gt;: $$&lt;br /&gt;&lt;b&gt;Website&lt;/b&gt;: http://www.eisenbahn.com.br&lt;br /&gt;&lt;b&gt;Harmonizes with&lt;/b&gt;:&amp;nbsp; Sea Food, Some kinds of cheese: Brie, Camembert, Gruyère, Emmental&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7159775730630790475-5437631183627796763?l=notasingleshot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://notasingleshot.blogspot.com/feeds/5437631183627796763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://notasingleshot.blogspot.com/2010/03/java-ee-6-with-fine-beers-beer-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7159775730630790475/posts/default/5437631183627796763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7159775730630790475/posts/default/5437631183627796763'/><link rel='alternate' type='text/html' href='http://notasingleshot.blogspot.com/2010/03/java-ee-6-with-fine-beers-beer-1.html' title='Java EE 6 with Fine Beers - Beer 1'/><author><name>rbellia</name><uri>http://www.blogger.com/profile/16458112425797359023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_JvyYnThlB9Q/S0xijcf4h8I/AAAAAAAABaE/A8BYq3ZpGQM/S220/fromning.bin.jpeg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JvyYnThlB9Q/S5PrM1jM1lI/AAAAAAAABbc/h9mOefLepWs/s72-c/remote_JMS1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7159775730630790475.post-7750681969408325567</id><published>2010-03-07T07:21:00.000-08:00</published><updated>2010-04-03T16:10:50.108-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='migration'/><category scheme='http://www.blogger.com/atom/ns#' term='java ee'/><category scheme='http://www.blogger.com/atom/ns#' term='glassfish'/><title type='text'>Java EE 6 with Fine Beers - Introduction</title><content type='html'>&lt;b&gt;Moving Pictures&lt;/b&gt; &lt;br /&gt;I'm going to register experiences of migrating an enterprise application from Glassfish V2 to V3.&lt;br /&gt;&lt;br /&gt;I believe that each successful migration effort has to be celebrated with a Brazilian beer. As I don't upgrade Java EE versions every day, I'm going to toast with gourmet beers. I sincerely expect to be contested by beer connoisseurs in the case I'm wrong.&lt;br /&gt;&lt;br /&gt;It all begun when our infrastructure decided to upgrade servers to a newer set of aligned open source software versions. Guess what, JDK 5 and Glassfish V2 that had served us so well were pointed out to be replaced by Open JDK 6 and Glassfish 2.1.1. That's a picture of what we have to move:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;~ 60 Session Beans (6 SOAP endpoints)&lt;/li&gt;&lt;li&gt;~ 50 JPA Entities&lt;/li&gt;&lt;li&gt;~ 36 Servlets&lt;/li&gt;&lt;li&gt;~ 10 JSF Managed Beans / 14 Facelets view components&lt;/li&gt;&lt;li&gt;An every week increasing number of Messaged Driven Beans&lt;/li&gt;&lt;/ul&gt;I knew the theory: GF 2.1.1 is Java EE 5 compatible, so the migration is supposed to be smoth. And I also knew that theory and practice are the same only in theory. Therefore, the best to be done was to prepare a migration plan. It was December 2009, Java EE 6 had been finished, and Glassfish V3 had been released as final version. At that point I realized that we could take advantage of migration effort and move to V3, unleashing development with Java EE 6 goodies.&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_JvyYnThlB9Q/S5PAL8P-__I/AAAAAAAABbY/3uZ7azZOPP0/s1600-h/IMG_3393.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/_JvyYnThlB9Q/S5PAL8P-__I/AAAAAAAABbY/3uZ7azZOPP0/s400/IMG_3393.JPG" width="300" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;So lets move on to Java EE 6 with Glassfish V3&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_JvyYnThlB9Q/S5PAL8P-__I/AAAAAAAABbY/3uZ7azZOPP0/s1600-h/IMG_3393.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Beer #1 goes to &lt;a href="http://notasingleshot.blogspot.com/2010/03/java-ee-6-with-fine-beers-beer-1.html"&gt;Partial Migration with Remote JMS.&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Beer #2 goes to &lt;a href="http://notasingleshot.blogspot.com/2010/04/java-ee-6-with-fine-beers-beer-2.html"&gt;Mojarra 2.0 with RichFaces &lt;/a&gt;&lt;/li&gt;&lt;li&gt;Beer #3 may goes to Glassfish packaging restrictions&lt;/li&gt;&lt;li&gt;Beer #4 may goes to ...&lt;/li&gt;&lt;/ul&gt;Stay tuned ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7159775730630790475-7750681969408325567?l=notasingleshot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://notasingleshot.blogspot.com/feeds/7750681969408325567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://notasingleshot.blogspot.com/2010/03/java-ee-6-with-fine-beers-introdution.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7159775730630790475/posts/default/7750681969408325567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7159775730630790475/posts/default/7750681969408325567'/><link rel='alternate' type='text/html' href='http://notasingleshot.blogspot.com/2010/03/java-ee-6-with-fine-beers-introdution.html' title='Java EE 6 with Fine Beers - Introduction'/><author><name>rbellia</name><uri>http://www.blogger.com/profile/16458112425797359023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_JvyYnThlB9Q/S0xijcf4h8I/AAAAAAAABaE/A8BYq3ZpGQM/S220/fromning.bin.jpeg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JvyYnThlB9Q/S5PAL8P-__I/AAAAAAAABbY/3uZ7azZOPP0/s72-c/IMG_3393.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7159775730630790475.post-6687969379561823863</id><published>2010-03-07T05:08:00.000-08:00</published><updated>2010-03-08T08:15:46.837-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='community'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='roo'/><title type='text'>Records from Spring Brazil Casual Class</title><content type='html'>On Feb 26 I had the priviledge to collaborate with Spring Brazil Casual Class, and with the launch of &lt;a href="http://springbrasil.ning.com/" target="_blank"&gt;Spring Brazil User Group&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;My role was to demonstrate the use of Spring Roo, as I staded before. &lt;br /&gt;&lt;br /&gt;From Spring Brazil User Group we have the slide casts available in Portuguese:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.slideshare.net/drspockbr/plataforma-spring-e-novidades-spring-3-3299497" target="_blank"&gt;Spring Platform and Spring 3 New Features&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://springbrasil.ning.com/profiles/blogs/slides-sobre-o-spring-roo" target="_blank"&gt;Spring Roo&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.slideshare.net/drspockbr/springsource-tool-suite-tc-server-e-dm-server"&gt;String Tools&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://springbrasil.ning.com/profiles/blogs/andando-nas-nuvens-com-a" target="_blank"&gt;Spring &amp;amp; Cloud&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;Here are some pictures, from my camera:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_JvyYnThlB9Q/S5OfjzVmL6I/AAAAAAAABa8/LaoGKKohLCU/s1600-h/IMG_3354.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/_JvyYnThlB9Q/S5OfjzVmL6I/AAAAAAAABa8/LaoGKKohLCU/s320/IMG_3354.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;This is dr Spock, talking about Spring Platform.&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_JvyYnThlB9Q/S5OgI4ioLNI/AAAAAAAABbA/mAYQzKxNo8w/s1600-h/IMG_3356.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/_JvyYnThlB9Q/S5OgI4ioLNI/AAAAAAAABbA/mAYQzKxNo8w/s320/IMG_3356.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;The audience, thrilled with Roo.&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;(The best feedback was: "Business Analysts cannot know that such tool exists!") &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_JvyYnThlB9Q/S5OhVIUW4EI/AAAAAAAABbI/_wa6xwRT1bc/s1600-h/IMG_3362.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://3.bp.blogspot.com/_JvyYnThlB9Q/S5OhVIUW4EI/AAAAAAAABbI/_wa6xwRT1bc/s320/IMG_3362.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;This is me, showing file system entries generated by Roo&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_JvyYnThlB9Q/S5OiDAp6fPI/AAAAAAAABbM/UTlOK-UvMNE/s1600-h/IMG_3361.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://3.bp.blogspot.com/_JvyYnThlB9Q/S5OiDAp6fPI/AAAAAAAABbM/UTlOK-UvMNE/s320/IMG_3361.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;Hands On ! Very quick demos with Roo Shel.&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;(We barely need a mouse)&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;In future posts I intend to share some good experiences about development with Roo.&lt;br /&gt;See you.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7159775730630790475-6687969379561823863?l=notasingleshot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://notasingleshot.blogspot.com/feeds/6687969379561823863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://notasingleshot.blogspot.com/2010/03/on-feb-26-i-had-priviledge-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7159775730630790475/posts/default/6687969379561823863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7159775730630790475/posts/default/6687969379561823863'/><link rel='alternate' type='text/html' href='http://notasingleshot.blogspot.com/2010/03/on-feb-26-i-had-priviledge-to.html' title='Records from Spring Brazil Casual Class'/><author><name>rbellia</name><uri>http://www.blogger.com/profile/16458112425797359023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_JvyYnThlB9Q/S0xijcf4h8I/AAAAAAAABaE/A8BYq3ZpGQM/S220/fromning.bin.jpeg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JvyYnThlB9Q/S5OfjzVmL6I/AAAAAAAABa8/LaoGKKohLCU/s72-c/IMG_3354.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7159775730630790475.post-6424778586227306987</id><published>2010-02-08T04:28:00.000-08:00</published><updated>2010-02-10T03:11:02.790-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='globalcode'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='roo'/><title type='text'>Spring Casual Class</title><content type='html'>In Brazil there is a cool Java meeting called Casual Class, promoted by Globalcode. It happens each two months, focusing on some subject, with points of view of three or four professionals.&lt;br /&gt;&lt;br /&gt;Afterwards we have pizza, beer, wine, and networking.&lt;br /&gt;&lt;br /&gt;We have already talked about JavaOne 2009, Robotics, Java EE 6, Cloud Computing. Next Feb 26 it will happen again, and &lt;a href="http://www.casualclass.com.br/edicoes/spring/index.seam"&gt;the subject will be Spring&lt;/a&gt;. My colleagues will talk about Spring 3.0, Spring Tools, and Spring in Cloud Computing. In the same meeting we're going to launch &lt;a href="http://springbrasil.ning.com/"&gt;SBUG&lt;/a&gt;: Spring Brazil User Group.&lt;br /&gt;&lt;br /&gt;I'll be there too, talking about &lt;a href="http://www.springsource.org/roo"&gt;Spring Roo&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Considering that there is &lt;a href="http://forum.springsource.org/showthread.php?t=71985"&gt;a lot of good stuff&lt;/a&gt; available in English, I don't intend to show here basic Spring Roo usage. But as an appetizer for may Brazilian fellows I have just written a post in Portuguese and it is available at &lt;a href="http://blog.globalcode.com.br/2010/02/hello-roo.html"&gt;Globalcoders blog&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Enjoy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7159775730630790475-6424778586227306987?l=notasingleshot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://notasingleshot.blogspot.com/feeds/6424778586227306987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://notasingleshot.blogspot.com/2010/02/spring-casual-class.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7159775730630790475/posts/default/6424778586227306987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7159775730630790475/posts/default/6424778586227306987'/><link rel='alternate' type='text/html' href='http://notasingleshot.blogspot.com/2010/02/spring-casual-class.html' title='Spring Casual Class'/><author><name>rbellia</name><uri>http://www.blogger.com/profile/16458112425797359023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_JvyYnThlB9Q/S0xijcf4h8I/AAAAAAAABaE/A8BYq3ZpGQM/S220/fromning.bin.jpeg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7159775730630790475.post-3557894384142991899</id><published>2010-01-20T05:34:00.000-08:00</published><updated>2010-03-08T03:14:25.971-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='java ee'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='glassfish'/><category scheme='http://www.blogger.com/atom/ns#' term='webservices'/><title type='text'>New Technologies, Old Problems</title><content type='html'>I am involved in several projects that require integration with business partners webservices. By adopting JAX-WS 2.1 stack supported by NetBeans/Galssfish our applications easily benefit from Java representations of operations and data structures with which we must interact. JAX-WS has also allowed speed to expose functionality implemented in Java, for internal applications developed on other platforms.&lt;br /&gt;&lt;br /&gt;All this ease of integration can cheer us up at first, so we extensively use these benefits. The pitfalls lie in:&lt;br /&gt;&amp;nbsp;- to ignore the coupling with external data models upon consuming webservices&lt;br /&gt;&amp;nbsp;- to allow the transitivity of the internal data model upon providing webservices&lt;br /&gt;&lt;br /&gt;The fact is that a webservice contract of today may become obsolete in a few months. Of course there are patterns of service-oriented architectures, adopted on the provider of webservices that minimize the impact of such developments. An interesting practice I have observed is the versioning of services. When a new version of service is available the old version is still functioning, for one or two developments.&lt;br /&gt;&lt;br /&gt;However, the raise of a new service version reflects new business needs, and webservice consumers will be forced to migrate soon or late. From this point of view the older versions maintenance just delays the impact of evolution.&lt;br /&gt;&lt;br /&gt;If the consumer established indirect dependency with the representations generated by Java tools such as JAX-WS, it will be protected from the impact of development of consumed services. The idea is not new, and is well discussed in a &lt;a href="http://www.coldewey.com/publikationen/design.html#Decoupling"&gt;Jens Coldewey paper&lt;/a&gt;, particularly in the topic Subsystem-Façade (a reinterpretation of the GoF Facade pattern).&lt;br /&gt;&lt;br /&gt;Considering the service to be consumed and its data structure as a subsystem, we avoid the direct use of classes generated by JAX-WS. In addition to using a Facade component to convert the data structures of the service consumed for the internal structures of a consumer application, we've find room for another integration practice , which I have named 'wrapper', and I want to comment in a future post.&lt;br /&gt;&lt;br /&gt;The same principle of subsystem separation is applied when we assume the role of services provider via JAX-WS. Whereas our internal data model can evolve, it is not used directly in the interface of the offered services. We oppose the transitivity of our internal data model, according to the Value Object design pattern: create a custom data model, that intends to remain stable for services consumers, along internal changes.&lt;br /&gt;&lt;br /&gt;I believe that these practices can be taken when creating web services in Java using other mechanisms such as JAX-RS for REST, or even with the precursors JAX-RPC and Apache Axis.&lt;br /&gt;&lt;br /&gt;To expose webservices without transitivity there is also the &lt;b&gt;Contact-First&lt;/b&gt; approach, used by &lt;a href="http://static.springsource.org/spring-ws/sites/1.5/"&gt;Spring Web Services&lt;/a&gt;. Such approach can also be used in JAX-WS. In this case we define the schema of data and operations exposed in the first place, placing the generation of Java artifacts as a secondary activity.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7159775730630790475-3557894384142991899?l=notasingleshot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://notasingleshot.blogspot.com/feeds/3557894384142991899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://notasingleshot.blogspot.com/2010/01/new-technologies-old-problems.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7159775730630790475/posts/default/3557894384142991899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7159775730630790475/posts/default/3557894384142991899'/><link rel='alternate' type='text/html' href='http://notasingleshot.blogspot.com/2010/01/new-technologies-old-problems.html' title='New Technologies, Old Problems'/><author><name>rbellia</name><uri>http://www.blogger.com/profile/16458112425797359023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_JvyYnThlB9Q/S0xijcf4h8I/AAAAAAAABaE/A8BYq3ZpGQM/S220/fromning.bin.jpeg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7159775730630790475.post-17466917910668668</id><published>2010-01-12T06:44:00.000-08:00</published><updated>2010-01-12T06:53:07.485-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='community'/><category scheme='http://www.blogger.com/atom/ns#' term='java ee'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><title type='text'>Why do you still use Spring Framework?</title><content type='html'>&lt;span id="result_box"&gt;&lt;span style="background-color: white;" title="Por que você ainda usaria Spring Framework?"&gt;My colleague at Globalcode Dr Alberto "Spock" Lemos has recently launched a Spring community for brazilian developers: &lt;a href="http://springbrasil.ning.com/"&gt;springbrasil.ning.com&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span id="result_box"&gt;&lt;span style="background-color: white;" title="Por que você ainda usaria Spring Framework?"&gt; In his forum &lt;a href="http://springbrasil.ning.com/forum/topics/porque-voce-ainda-usaria"&gt;opening thread&lt;/a&gt;, we have:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;&lt;span id="result_box"&gt;&lt;span style="background-color: white;" title="Considerando o lançamento recente do Java EE 6 com as evoluções do EJB para 3.1 e do JPA para 2.0, por que ainda deveríamos continuar usando o Spring Framework?"&gt;Considering the recent release of Java EE 6 with the changes to EJB 3.1 and JPA to 2.0, why do we continue using the Spring Framework?&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;i&gt;&lt;span id="result_box"&gt;&lt;span style="background-color: white;" title="Muitas das idéias do Spring e do Hibernate foram adotadas no EJB 3.xe no JPA, decretando a morte dos entity beans do EJB 2.xeo uso de Javabeans (POJOs) como base para o modelo de componentização com acesso aos serviços enterprise."&gt;Many of the ideas of Spring and Hibernate were adopted in EJB 3.x and JPA, decreeing the death of the entity beans in EJB 2.x and use of Javabeans (POJOs) as a basis for componentization model with access to enterprise. &lt;/span&gt;&lt;span style="background-color: white;" title="Agora temos uso extensivo de anotações, uso efetivo de OO e design patterns na modelagem dos componentes de negócios, a capacidade de definir interfaces de negócios para os componentes, a presença da injeção de dependências já na modelagem dos componentes, etc."&gt;Now we have extensive use of annotations, effective use of design patterns and OO modeling of business components, the ability to define interfaces to business components, the presence of dependency injection as the modeling of components, etc..&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: white;" title="Então, porque ainda deveríamos utilizar o Spring Framework e não o EJB 3?"&gt;So why should we still use the Spring Framework and not the Java EE 6?&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span id="result_box"&gt;&lt;span style="background-color: white;" title="Considerando o lançamento recente do Java EE 6 com as evoluções do EJB para 3.1 e do JPA para 2.0, por que ainda deveríamos continuar usando o Spring Framework?"&gt; &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;That's what I think: &lt;br /&gt;&lt;div style="background-color: white;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span id="result_box"&gt;&lt;span style="background-color: #ebeff9;" title="Spring oferece algumas vantagens sobre o Java EE."&gt;&lt;span style="background-color: white;"&gt;Spring offers some advantages over Java EE.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span id="result_box"&gt;&lt;span style="background-color: #ebeff9;" title="Spring oferece algumas vantagens sobre o Java EE."&gt;&lt;/span&gt;&lt;span style="background-color: white;" title="- O Spring oferece um modelo de segurança bem mais evoluído, através do Spring Security - quando há a necessidade de refinar o modelo de segurança, e estamos baseados em Java EE / EJB acabamos nos envolvendo com APIs proprietárias do servidor de aplicação, que muitas vezes"&gt;Spring has an evolved security model, through the Spring Security - when it is necessary to refine the security model, and we're based on Java EE / EJB we end up getting involved with proprietary APIs of the application server, which doesn't always &lt;/span&gt;&lt;span style="background-color: white;" title="não possuem uma documentação satisfatória."&gt;have a satisfactory documentation.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span id="result_box"&gt;&lt;span style="background-color: white;" title="não possuem uma documentação satisfatória."&gt;&lt;/span&gt;&lt;span style="background-color: white;" title="- Suporte &amp;quot;nativo&amp;quot; a AOP, o que abre muitas possibilidades para a testabilidade das aplicações, além de permitir endereçar de forma elegante problemas não triviais, que escapam dos modelos de componente Java EE."&gt;"Native" support for AOP, which opens up many possibilities for the testability, and allows to address in an elegant fashion non-trivial problems, which are beyond the model of Java EE components.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span id="result_box"&gt;&lt;span style="background-color: white;" title="- No Spring continuaremos encontrando iniciativas de inovação, o que o coloca sempre um passo à frente, enquanto que, no Java EE prevalecem as iniciativas de padronização."&gt;In the Spring we will continue finding innovative initiatives, which puts it one step ahead, while in Java EE prevails standardization.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span id="result_box"&gt;&lt;span style="background-color: white;" title="- No Spring continuaremos encontrando iniciativas de inovação, o que o coloca sempre um passo à frente, enquanto que, no Java EE prevalecem as iniciativas de padronização."&gt; &lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: white;" title="É importante reconhecer que nem sempre teremos esses fatores como decisivos para os projetos, o que torna o Java EE 6 (com diversos mecanismos já consagrados em edições anteriores do Spring), uma opção muito atraente."&gt;It is important to recognize that not always these factors are crucial for the projects, which makes the Java EE 6 (with various mechanisms already established in previous editions of Spring), a very attractive option.&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/7159775730630790475-17466917910668668?l=notasingleshot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://notasingleshot.blogspot.com/feeds/17466917910668668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://notasingleshot.blogspot.com/2010/01/why-do-you-still-use-spring-framework.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7159775730630790475/posts/default/17466917910668668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7159775730630790475/posts/default/17466917910668668'/><link rel='alternate' type='text/html' href='http://notasingleshot.blogspot.com/2010/01/why-do-you-still-use-spring-framework.html' title='Why do you still use Spring Framework?'/><author><name>rbellia</name><uri>http://www.blogger.com/profile/16458112425797359023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_JvyYnThlB9Q/S0xijcf4h8I/AAAAAAAABaE/A8BYq3ZpGQM/S220/fromning.bin.jpeg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7159775730630790475.post-357177875679967804</id><published>2010-01-12T04:10:00.000-08:00</published><updated>2010-01-12T04:10:49.913-08:00</updated><title type='text'>Starting Out</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;I'm a senior Java developer, and I'm always looking for valuable software tools and development techniques. &lt;br /&gt;I'm also a Java Technologies instructor at &lt;a href="http://www.globalcode.com/"&gt;Globalcode&lt;/a&gt;.&lt;br /&gt;In this blog I'll try to share some software development ideas and experiences.&lt;br /&gt;&lt;br /&gt;Hope you enjoy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7159775730630790475-357177875679967804?l=notasingleshot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://notasingleshot.blogspot.com/feeds/357177875679967804/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://notasingleshot.blogspot.com/2010/01/starting-out.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7159775730630790475/posts/default/357177875679967804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7159775730630790475/posts/default/357177875679967804'/><link rel='alternate' type='text/html' href='http://notasingleshot.blogspot.com/2010/01/starting-out.html' title='Starting Out'/><author><name>rbellia</name><uri>http://www.blogger.com/profile/16458112425797359023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_JvyYnThlB9Q/S0xijcf4h8I/AAAAAAAABaE/A8BYq3ZpGQM/S220/fromning.bin.jpeg'/></author><thr:total>0</thr:total></entry></feed>
