<?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-13456626</id><updated>2011-07-31T00:40:37.158-07:00</updated><title type='text'>Christopher Ljungblad</title><subtitle type='html'>This blog, as so many others is basically for me to keep and share ideas and solved problems. I can probably say that the context of this blog will be about 80% programming, 10% other related IT stuff and 10% nonsens. I have found it nice to have the possiblity to share ideas and help out with problems that I have bumped into. Cheers Chris</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>30</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-13456626.post-8553776696178936143</id><published>2009-12-19T11:49:00.000-08:00</published><updated>2009-12-19T11:49:13.660-08:00</updated><title type='text'>Google Verktygsfält</title><content type='html'>&lt;a href="http://www.google.com/intl/sv/toolbar/ff/install.html#tbbrand="&gt;Google Verktygsfält&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-8553776696178936143?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.google.com/intl/sv/toolbar/ff/install.html#tbbrand=' title='Google Verktygsfält'/><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/8553776696178936143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=8553776696178936143' title='44 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/8553776696178936143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/8553776696178936143'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2009/12/google-verktygsfalt.html' title='Google Verktygsfält'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>44</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-119249096572340562</id><published>2008-03-30T16:56:00.000-07:00</published><updated>2008-04-01T02:30:13.463-07:00</updated><title type='text'>JBoss Clustering 4.2</title><content type='html'>Easiest way is use the 'all' server instance that already is configured for clustering in jboss.&lt;br /&gt;&lt;br /&gt;If you have not used the 'all' instance then copy these three files from 'all' server to your server instance and it should work:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;cluster-service.xml  (all/deploy directory)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;jbossha.jar (all/lib directory)&lt;/li&gt;&lt;li&gt;jgroups.jar (all/lib directory)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-119249096572340562?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/119249096572340562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=119249096572340562' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/119249096572340562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/119249096572340562'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2008/03/jboss-clustering-42.html' title='JBoss Clustering 4.2'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-3985525041627322824</id><published>2008-03-30T08:07:00.000-07:00</published><updated>2008-04-01T02:32:05.068-07:00</updated><title type='text'>JBoss Monitoring and Performance</title><content type='html'>&lt;a href="http://www.jboss.org/wiki/Wiki.jsp?page=JBossASTuningSliming"&gt;JBoss page how to slim your JBoss AS&lt;/a&gt;&lt;br /&gt;&lt;a href="http://developer.redhatmagazine.com/2006/09/18/java-performance-tuning-on-linux-with-andrew-oliver/"&gt;Tuning JBoss on linux article&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Memory and thread Montoring (see chapter 10 in JBoss 4.2 Server configuration guide)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;MBean&lt;/span&gt;&lt;br /&gt;In the JMX-console: jboss.system:type=ServerInfo MBean (view interesting attributes like FreeMemory, ActiveThreadCount etc.)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Checklist&lt;br /&gt;&lt;/span&gt;(Read more about this in the book  "JBoss Seam - Simplicity and Power beyond Java EE")&lt;br /&gt;1. Use "Call by reference" (see JBoss Reference)&lt;br /&gt;2. Optimize JVM (start using the -server option)&lt;br /&gt; - Give at least 75 percent of the physical RAM to the JVM ( JAVA_OPT in bin/run.sh)&lt;br /&gt; - &lt;span style="font-size:78%;"&gt;set JAVA_OPTS=%JAVA_OPTS% -Xms&lt;/span&gt;&lt;span style="font-size:78%;"&gt;1024m&lt;/span&gt;&lt;span style="font-size:78%;"&gt; -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512&lt;br /&gt;&lt;span style="font-size:85%;"&gt;  - Using the same value for Xms and Xmx will force JVM to use specified value (in this case 1GB)&lt;br /&gt; -  -Xms2g and -Xmx2g would force JVM use 2G of  RAM for example&lt;br /&gt;3. Garbage Collector (use parallel GC) or what might be best for you JVM/application&lt;br /&gt; -  Run parallel GC&lt;br /&gt;    set JAVA_OPTS=%JAVA_OPTS% -XX:+UseParallelGC -XX:+UseParallelOldGC&lt;br /&gt;4. Reduce logging (see &lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.jboss.org/wiki/Wiki.jsp?page=JBossASTuningSliming"&gt;JBoss page how to slim your JBoss AS&lt;/a&gt;)&lt;br /&gt;5. Tuning the HTTP Thread Pool &lt;span style="font-size:78%;"&gt;&lt;span style="font-size:85%;"&gt;(see &lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.jboss.org/wiki/Wiki.jsp?page=JBossASTuningSliming"&gt;JBoss page how to slim your JBoss AS&lt;/a&gt;)&lt;br /&gt;6. Client- or Server-Side State Saving (really depends on your application and RAM vs. Mhz)&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-size:85%;"&gt;There are more things you can do like using Second-Level Cache and Clustering.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-3985525041627322824?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/3985525041627322824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=3985525041627322824' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/3985525041627322824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/3985525041627322824'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2008/03/jboss-monitoring-and-performance.html' title='JBoss Monitoring and Performance'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-4199535973589072302</id><published>2008-02-05T08:21:00.000-08:00</published><updated>2008-02-05T08:33:49.816-08:00</updated><title type='text'>Flying Saucer renderer in JBoss Seam Fix</title><content type='html'>Used the iText and The Flying Saucer xhtml renderer to generate pdf's in my JBoss Seam application.&lt;br /&gt;&lt;br /&gt;Problem: Everything worked fine. A pdf was generated in my app but the application context was somehow corrupt after the pdf generation and I could not continue using the app unless I redeployed it on JBoss AS again. I noticed that this happened after I had instanciated the org.xhtmlrenderer.pdf.ITextRenderer.&lt;br /&gt;&lt;br /&gt;Found the fix for this in the JBoss Seam forum (thanks Calvin, you saved my day :)).&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;&lt;span class="postbody"&gt;Here's a fix for the problem.  Set this system property before instantiating your first instance of ITextRenderer:&lt;br /&gt;&lt;/span&gt; &lt;table align="center" border="0" cellpadding="3" cellspacing="1" width="90%"&gt; &lt;tbody&gt;&lt;tr&gt;    &lt;td&gt;&lt;span class="genmed"&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;    &lt;td class="code"&gt;&lt;pre&gt;System.setProperty("xr.util-logging.loggingEnabled", "false"); &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;span class="postbody"&gt; &lt;br /&gt;The problem seems to be caused by Flying Saucer reconfiguring the log manager by calling LogManager.readConfiguration. Flying Saucer shouldn't really be doing this because it blows away any existing log configuration, but on the other hand it's odd that Seam (or maybe JBoss?) behaves this way when logging is reconfigured.&lt;br /&gt;--Calvin&lt;br /&gt;&lt;/span&gt;----------------------------------------------------------------------------&lt;br /&gt;&lt;span class="postbody"&gt;http://www.jboss.com/index.html?module=bb&amp;amp;op=viewtopic&amp;amp;p=4106412#4106412&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-4199535973589072302?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/4199535973589072302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=4199535973589072302' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/4199535973589072302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/4199535973589072302'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2008/02/flying-saucer-renderer-in-jboss-seam.html' title='Flying Saucer renderer in JBoss Seam Fix'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-5958164888040417982</id><published>2008-01-07T06:45:00.000-08:00</published><updated>2008-01-07T06:48:45.455-08:00</updated><title type='text'>JBoss Seam debug info</title><content type='html'>Enable/disable seam debug page and faclet debug&lt;br /&gt;&lt;br /&gt;Seam - components.xml (debug =  ture/false)&lt;br /&gt;&lt;br /&gt;Facelets - web.xml (facelets.DEVELOPMENT =  true/false)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-5958164888040417982?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/5958164888040417982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=5958164888040417982' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/5958164888040417982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/5958164888040417982'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2008/01/jboss-seam-debug-info.html' title='JBoss Seam debug info'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-3386243105357982237</id><published>2007-11-11T13:08:00.000-08:00</published><updated>2007-11-11T14:32:49.355-08:00</updated><title type='text'>Entity Inheritance</title><content type='html'>&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;a href="http://java.sun.com/javaee/5/docs/api/index.html"&gt;Java EE API&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;a href="http://java.boot.by/scbcd5-guide/apes03.html"&gt;Creating Entity Objects for SINGLE_TABLE Inheritance Type&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;a href="http://java.boot.by/scbcd5-guide/apes04.html"&gt;Creating Entity Objects for JOINED Inheritance Type&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;a href="http://java.boot.by/scbcd5-guide/apes05.html"&gt;Creating Entity Objects for TABLE_PER_CLASS Inheritance Type&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;a href="http://edocs.bea.com/kodo/docs41/full/html/ejb3_overview_mapping_inher.html"&gt;BEA - 12.6. Inheritance&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-3386243105357982237?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/3386243105357982237/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=3386243105357982237' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/3386243105357982237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/3386243105357982237'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2007/11/entity-inheritance.html' title='Entity Inheritance'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-7077879434096711659</id><published>2007-10-17T13:47:00.000-07:00</published><updated>2007-10-17T14:23:56.758-07:00</updated><title type='text'>Java EE load balancing, clustering</title><content type='html'>&lt;ul&gt;&lt;li&gt;&lt;a href="http://labs.jboss.com/file-access/default/members/jbossas/freezone/docs/Clustering_Guide/beta422/html/index.html"&gt;JBoss application server 4.2.2 clustering guide&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.onjava.com/pub/a/onjava/2003/08/20/jboss_clustering.html"&gt;J2EE clustering with JBoss&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.javaperformancetuning.com/tips/loadbalance.shtml"&gt;Java Performance Tuning&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://plb.sunsite.dk/index.html"&gt;Pure load balancer&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-7077879434096711659?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/7077879434096711659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=7077879434096711659' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/7077879434096711659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/7077879434096711659'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2007/10/java-ee-load-balancing-clustering.html' title='Java EE load balancing, clustering'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-190021189605895707</id><published>2007-09-27T14:48:00.000-07:00</published><updated>2007-09-27T14:52:42.055-07:00</updated><title type='text'>Design Patterns</title><content type='html'>&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.fluffycat.com/java-design-patterns/"&gt;Java Design Patterns Reference and Examples&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-190021189605895707?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/190021189605895707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=190021189605895707' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/190021189605895707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/190021189605895707'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2007/09/design-patterns.html' title='Design Patterns'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-4122300085721777060</id><published>2007-09-14T14:32:00.000-07:00</published><updated>2007-09-14T14:35:17.898-07:00</updated><title type='text'>Transactions (EJB3)</title><content type='html'>Transactions in EJB3 and Seam&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;ACID&lt;/li&gt;&lt;li&gt;Put all transactions in your EJBs (not in servlets)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Container or Bean Managed (default in Seam)&lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Container-managed-transactions (CMTs) preferred in Java EE. The Java EE container will handle comitting, rolling back, starting the transaction, etc. (no coding for the transactions).&lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;6 types of transactions to choose from (default is REQUIRED)&lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;MANDATORY&lt;/li&gt;&lt;li&gt;REQUIRED&lt;/li&gt;&lt;li&gt;REQUIRES_NEW&lt;/li&gt;&lt;li&gt;SUPPORTS&lt;/li&gt;&lt;li&gt;NOT_SUPPORTED&lt;/li&gt;&lt;li&gt;NEVER&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Example: Set this annotation before a method to use a transaction independent of an already-active transaction. Will attempt to commit in the end of the method. &lt;pre&gt;@TransactionAttribute(Transacti&lt;wbr&gt;onAttributeType.&lt;i&gt;REQUIRES_NEW&lt;/i&gt;)&lt;br /&gt;   &lt;b&gt;public void&lt;/b&gt; addUser(User user) {&lt;br /&gt;       em.persist(user);&lt;br /&gt;   }&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Bean-managed transactions (BMTs) allows a much more fine-grained control of transactions. (It is recommended to not use BMTs unless you cannot achieve the goals you are looking for using the CMT option.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;span class="sg"&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-4122300085721777060?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/4122300085721777060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=4122300085721777060' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/4122300085721777060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/4122300085721777060'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2007/09/transactions-ejb3.html' title='Transactions (EJB3)'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-2123818274838835215</id><published>2007-09-02T12:29:00.000-07:00</published><updated>2007-09-05T02:07:31.390-07:00</updated><title type='text'>EJB3 EntityManager</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;Persisting Entities&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;ul&gt;&lt;li  style="font-family:times new roman;"&gt;&lt;span style="font-size:100%;"&gt;entityManager.persist(object);&lt;/span&gt;&lt;/li&gt;&lt;li  style="font-family:times new roman;"&gt;&lt;span style="font-size:100%;"&gt;Can automatically generate a primary key&lt;/span&gt;&lt;/li&gt;&lt;li  style="font-family:times new roman;"&gt;&lt;span style="font-size:100%;"&gt;Throws IllegalArgumentException if its parameter is not an entity type&lt;/span&gt;&lt;/li&gt;&lt;li  style="font-family:times new roman;"&gt;&lt;span style="font-size:100%;"&gt;Throws TransactionRequiredException&lt;/span&gt;&lt;span style="font-size:100%;"&gt; (Thrown by the persistence provider when a transaction is required but is not  active).&lt;/span&gt;&lt;/li&gt;&lt;li  style="font-family:webdings;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=";font-family:times new roman;font-size:100%;"  &gt;If the Entity Manager is an extended persistent context, it is legal to call persist() outside a transaction scope.&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;Finding entities&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;ul  style="font-family:times new roman;"&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;There are 3 ways to find entities&lt;/span&gt;&lt;/li&gt;&lt;ul style="font-weight: bold;"&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;find(), getReference() and createQuery()&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;The &lt;span style="font-weight: bold;"&gt;find()&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;getReference() &lt;/span&gt;methods works in the same way, they take the entity's class as a parameter and the primary key (Long).&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=";font-family:times new roman;font-size:100%;"  &gt;&lt;span style="font-family:courier new;"&gt;    &lt;t&gt; find(Class&lt;t&gt; entityClass, Object primaryKey);&lt;/t&gt;&lt;/t&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    &lt;t&gt; getReference(Class&lt;t&gt; entityClass, Object primaryKey);&lt;/t&gt;&lt;/t&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-family:courier new;"&gt;  Example:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Person person = null;   &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;         person = entityManager.find(Person.class, 5);&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul  style="font-family:times new roman;"&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Two differences between find() and getReference() methods &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol  style="font-family:times new roman;"&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;find() returns null if the entity is not found and the getReference() method throws a EntityNotFoundException.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;find() method initializes the state, based on the lazy-loading policies of each property, getReference() does not do that.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li  style="font-family:times new roman;"&gt;&lt;span style="font-size:100%;"&gt;Both methods throws IllegalArgumentExceptions and they can be invoked outside the scope of transaction, but the object returned will be detached (unless entity manger is an extended persistent context).&lt;/span&gt;&lt;/li&gt;&lt;li  style="font-family:times new roman;"&gt;&lt;span style="font-size:100%;"&gt;With the &lt;span style="font-weight: bold;"&gt;createQuery()&lt;/span&gt; method it is possible to use EJB QL, HQL.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:times new roman;"&gt;Summary: all the objects found using these three methods will remain managed as long as the persistent context in which you accessed them remains active. &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;Updating entities&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;  &lt;/span&gt;   &lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;To update an object while it is while it is managed by the persistent context is very easy. All updates on returned object (from find(), getReference(), createQuery()) will be synchronized automatically (depending on the flush mode). This is true as &lt;span&gt;long as an active persistence context is still associated with the transaction. (Read more about Transaction Attribute (defaults to Required) but can be set in either ejb-jar deployment descriptor or on the EJB's bean class using @TransactionAttribute)&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;Merging entities&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;To merge state changes made to a detached entity back into persistent storage.&lt;/li&gt;&lt;/ul&gt;         &lt;span style="font-family:courier new;"&gt;Example (person is a detached entity):       &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;       Person copy = entityManager.merge(person);&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;There are two different scenarios for the merge method, depending on if the entity manager is already managing the person entity with the same ID or not.&lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;If the entity manager isn't managing the person entity with same ID, a full copy of the person parameter is made and returned from the merge() method. Now this copy will be managed by the entity manager and any additional setter methods called on it will be synchronized with the database (when flush).&lt;/li&gt;&lt;li&gt;If the entity manager is already managing the person entity with the same ID, then the contents of the person parameter is copied into this managed object instance. The merge() operation will return this managed instance and the person parameter will remain detached and unmanaged.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;Removing entities&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;entityManager.remove(person);&lt;/li&gt;&lt;ul&gt;&lt;li&gt;person instance will not be managed any longer and will become detached&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Associated entities may also be removed based on cascading rules&lt;/li&gt;&lt;li&gt;remove() can only be undone using persist() again&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;Refresh entity&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;Use &lt;span style="font-style: italic;"&gt;entityManager.refresh(person)&lt;/span&gt; if you are concerned that the managed person entity is not up-to-date with the database. Will overwrite any changes of the managed entity with the one in the database.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Related entities may also be refreshed based on the setup cascading policy.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:85%;"&gt;Contains&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;Use &lt;span style="font-style: italic;"&gt;entityManager.contains(person)&lt;/span&gt; if you want to know if "person" is currently managed by the persistent context.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;Clear&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Use &lt;span style="font-style: italic;"&gt;entityManager.clear() &lt;/span&gt;if you want to detach all managed entity instances from a persistence context. (Any changes made to managed entities are lost). Avoid this by calling &lt;span style="font-style: italic;"&gt;flush()&lt;/span&gt; before &lt;span style="font-style: italic;"&gt;clear()&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;FlushModeType&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Flush is made automatically before any query (besides find() and getReference()) by the entity manager.&lt;/li&gt;&lt;li&gt;Change default behaviour by using Flushmode.COMMIT instead of default AUTO.&lt;/li&gt;&lt;li&gt;Using COMMIT means that changes are flushed only when the transaction commits, not before any query.&lt;/li&gt;&lt;li&gt;Set FlushType by calling the entityManager.setFlushType() method&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Transactions (&lt;a href="http://trailblazer.demo.jboss.com/EJB3Trail/services/transaction/"&gt;read more here&lt;/a&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/13456626-2123818274838835215?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/2123818274838835215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=2123818274838835215' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/2123818274838835215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/2123818274838835215'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2007/09/ejb3-entitymanager.html' title='EJB3 EntityManager'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-3360228404982613452</id><published>2007-09-01T04:35:00.000-07:00</published><updated>2007-09-14T14:38:04.336-07:00</updated><title type='text'>Monitoring JBoss Tool</title><content type='html'>&lt;h1&gt;&lt;span style="font-size:85%;"&gt;Hyperic HQ — Systems Management Software&lt;/span&gt;&lt;/h1&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size:85%;"&gt;Have not tried this, but will for sure have a closer look when I have got time.&lt;br /&gt;&lt;br /&gt;http://www.hyperic.com/downloads&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/13456626-3360228404982613452?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/3360228404982613452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=3360228404982613452' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/3360228404982613452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/3360228404982613452'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2007/09/monitoring-jboss-tool.html' title='Monitoring JBoss Tool'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-4325875279832616531</id><published>2007-08-28T11:04:00.000-07:00</published><updated>2007-08-28T11:08:50.553-07:00</updated><title type='text'>Use JBoss loader</title><content type='html'>In file:&lt;br /&gt;server\default\deploy\jbossweb-tomcat55.sar\META-INF\jboss-service.xml&lt;br /&gt;&lt;br /&gt;Change this attribute to "true" to use the JBoss loader, this was needed for our application to be able to read resources from the classpath.&lt;br /&gt;&lt;br /&gt;&lt;attribute name="UseJBossWebLoader"&gt;true&lt;/attribute&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-4325875279832616531?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/4325875279832616531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=4325875279832616531' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/4325875279832616531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/4325875279832616531'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2007/08/use-jboss-loader.html' title='Use JBoss loader'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-2546308738962077690</id><published>2007-08-04T06:57:00.000-07:00</published><updated>2007-08-04T07:07:22.297-07:00</updated><title type='text'>Exceptions</title><content type='html'>&lt;span style="font-style: italic; font-weight: bold;"&gt;hibernate.PersistentObjectException: detached entity passed to persist&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;object = entityManager.merge(object);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Changes to "object" will be synchronized to database when flushed next time. Force flush using &lt;span style="font-style: italic;"&gt;entitityManager.flush()&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-2546308738962077690?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/2546308738962077690/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=2546308738962077690' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/2546308738962077690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/2546308738962077690'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2007/08/exceptions.html' title='Exceptions'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-6480113683252474625</id><published>2007-07-24T00:17:00.000-07:00</published><updated>2007-07-30T04:40:31.681-07:00</updated><title type='text'>HQL (Hibernate Query Language)</title><content type='html'>&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.redhat.com/docs/manuals/jboss/jboss-eap-4.2/doc/hibernate/Hibernate_Reference_Guide/HQL_The_Hibernate_Query_Language.html"&gt;HQL Documentation (Red Hat) - A good place to start&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;From the Hibernate reference (&lt;a href="http://www.hibernate.org/hib_docs/reference/en/html/queryhql.html"&gt;chapter 14&lt;/a&gt;)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Joins (SQL) (&lt;a href="http://en.wikipedia.org/wiki/Join_%28SQL%29#Inner_join"&gt;INNER, OUTER - Wikipedia&lt;/a&gt;)&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;inner join&lt;/b&gt; essentially combines the records from two tables A and B based on a given join predicate (considered default join)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;left outer join&lt;/b&gt; for tables A and B always contains all records of the "left" table (A)&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;right outer join&lt;/span&gt; - Every record from the "right" table (B) will be in the joined table at least once.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-6480113683252474625?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/6480113683252474625/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=6480113683252474625' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/6480113683252474625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/6480113683252474625'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2007/07/hql-hibernate-query-language.html' title='HQL (Hibernate Query Language)'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-8941937230457529988</id><published>2007-07-23T13:10:00.000-07:00</published><updated>2007-09-14T13:49:01.411-07:00</updated><title type='text'>JSF Links</title><content type='html'>&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://www.jsf-faq.com/faqs/faces-exception.html"&gt;&lt;b class="title"&gt;JSF FAQ - Java Exception Issues&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;b class="title"&gt;&lt;a href="http://labs.jboss.com/jbossajax4jsf/docs/devguide/en/html/index.html"&gt;ajax4jsf Developers Guide&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;b class="title"&gt;&lt;a href="http://www.roseindia.net/jsf/"&gt;JSF Tutorial (list of tags etc)&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;b class="title"&gt;&lt;a href="http://balusc.blogspot.com/2006/06/using-datatables.html#SelectMultipleRows"&gt;Multiple checkboxes in DataTable&lt;/a&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-8941937230457529988?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/8941937230457529988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=8941937230457529988' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/8941937230457529988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/8941937230457529988'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2007/07/jsf-links.html' title='JSF Links'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-62746960013535258</id><published>2007-07-20T01:25:00.000-07:00</published><updated>2007-09-18T00:41:59.260-07:00</updated><title type='text'>JBoss Seam links</title><content type='html'>Useful Seam Links:&lt;br /&gt;&lt;ul&gt;&lt;li style="color: rgb(0, 0, 0);"&gt;&lt;a href="http://www.intelligentedu.com/blogs/post/best_new_training_sites/3676/15-best-jboss-seam-tutorials"&gt;15 best Seam Tutorials&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li style="color: rgb(0, 0, 0);"&gt;&lt;a href="http://www.jboss.com/wiki/Wiki.jsp?page=JBossSeam"&gt;Seam Wiki&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;a href="http://www.abstractec.co.uk/blog/"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Seam Blog&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;a href="http://www.abstractec.co.uk/blog/"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;/span&gt;&lt;/a&gt;&lt;a href="http://seam.demo.jboss.com/main.seam"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Seam Hotel Demo&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;a href="http://seam.demo.jboss.com/main.seam"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;a href="http://www-128.ibm.com/developerworks/java/library/j-seam1/"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="color: rgb(153, 153, 153);"&gt;Seamless JSF, Part 1: &lt;/span&gt;An application framework tailor-made for JSF&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www-128.ibm.com/developerworks/java/library/j-seam2/"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="color: rgb(153, 153, 153);"&gt;Seamless JSF, Part 2: &lt;/span&gt;Conversations with Seam&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www-128.ibm.com/developerworks/java/library/j-seam3/"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="color: rgb(153, 153, 153);"&gt;Seamless JSF, Part 3: &lt;/span&gt;Ajax for JSF&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://docs.jboss.com/seam/1.2.0.PATCH1/reference/en/html/annotations.html"&gt;Seam Annotation&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://docs.jboss.org/seam/1.2.1.GA/reference/en/html/configuration.html"&gt;&lt;span style="font-size:100%;"&gt;Configuring Seam (SFSB timeout)&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;a href="http://www.abstractec.co.uk/blog/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;a href="http://www.jboss.com/wiki/Wiki.jsp?page=JBossSeam"&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;/span&gt;&lt;/a&gt;&lt;a target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-62746960013535258?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/62746960013535258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=62746960013535258' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/62746960013535258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/62746960013535258'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2007/07/jboss-seam-links.html' title='JBoss Seam links'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-117018386126902366</id><published>2007-01-30T11:04:00.000-08:00</published><updated>2007-01-30T11:04:21.270-08:00</updated><title type='text'>JFokus</title><content type='html'>Intro: Open Source now and in the future&lt;br /&gt;Simon Phipps, Sun&lt;br /&gt;&lt;br /&gt;Talked about the benefits with Open Source. And how it is hard to gain value from taking a snapshot and adding own functionalities without giving the new source code back to the community. You would become  the "Regression test slave" as Phipps expressed it. Open Source: "Earn the living by giving back".&lt;br /&gt;&lt;br /&gt;Talked a bit about:&lt;br /&gt;ODF (OpenDocument Format)&lt;br /&gt;OpenOffice.org.&lt;br /&gt;&lt;br /&gt;Software Patents, compared them to the fact that:&lt;br /&gt;"American have guns because American have guns" and so do they have Patents.&lt;br /&gt;&lt;br /&gt;Interoperability is a buzz word that Phipps did not really believed in. He did not have very hight thought of Web Services. So he wanted to introduce a new buzz word "Substitutability". It should be easy to throw out a piece of software and put in a new piece without suffering.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- Open Standards&lt;br /&gt;- OpenSolaris&lt;br /&gt;- OpenSPARC.net&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Introduction to Java EE 5 and EJB 3&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Mike Keith - Wrote "Pro EJB 3" Book.&lt;br /&gt;&lt;br /&gt;This was mainly an introduction to EJB3s and a comparison to EJB 2.1.&lt;br /&gt;&lt;br /&gt;Mike showed how EJB3s are simplified by using:&lt;br /&gt;- Annotations&lt;br /&gt;- Dependency Injection&lt;br /&gt;- Simplified Web Services&lt;br /&gt;- New Java Persistence API&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;JPA - Java Persistence API&lt;br /&gt;&lt;/span&gt;Mike Keith&lt;br /&gt;&lt;br /&gt;JPA was created as part of EJB3 within the JSR 220&lt;br /&gt;Released May 2006 as part of Java EE 5&lt;br /&gt;&lt;br /&gt;Key points&lt;br /&gt;- javax.persistence&lt;br /&gt;&lt;br /&gt;- Annotations makes everything much easier, but it is still possible to use XML. (@Entity, @Id etc.)&lt;br /&gt;&lt;br /&gt;- Persistence Context - Think of a hash table where all entities are a set of "managed" entity instances.&lt;br /&gt;&lt;br /&gt;- EntitiyManager API&lt;br /&gt;-- persist() - Insert a state of an entity into the DB&lt;br /&gt;-- remove(), find(), merge() etc .&lt;br /&gt;The entityManager is injected into the object using it.&lt;br /&gt;&lt;br /&gt;- Queries - Dynamic and Static&lt;br /&gt;-- Query API - getResultList() etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- ORM&lt;br /&gt;&lt;br /&gt;- JPA can used in Java SE as well.&lt;br /&gt;&lt;br /&gt;Recommended tools in Eclipse: &lt;a href="http://www.eclipse.org/dali/"&gt;Dali JPA Tools&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Secure Coding Antipatterns: Avoiding vulnerabilities&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Marting Englund, Sun&lt;br /&gt;&lt;br /&gt;Went through 6 antipatterns - things not to do while coding java thinking about security. Many examples was related to for example applets where the user have access to the source code, but how often are they used in security related solutions these days. Anyway, the 6 antipatterns were:&lt;br /&gt;&lt;br /&gt;1. Assuming Objects are Immutable&lt;br /&gt;- Attacker can change signers of a class&lt;br /&gt;How to prevent: Make a copy of mutable output and input parameters (deep cloning)&lt;br /&gt;&lt;br /&gt;2. Checks on untrusted source&lt;br /&gt;- Use subclass, e.g. extend File&lt;br /&gt;How to prevent: Create a new object from the untrusted source. Is it really a File object or was it a subclass.&lt;br /&gt;&lt;br /&gt;3. Ignoring Changes to Superclasses&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;All changes propagate to the subclass which might open security holes.&lt;br /&gt;&lt;br /&gt;4. Neglecting to validate inputs&lt;br /&gt;- Embedded requests bypassing security checks&lt;br /&gt;Requests examples: GET http://.... or Queries&lt;br /&gt;Good solution: Public method that takes care of all the security (validation) and then calls the Native method.&lt;br /&gt;&lt;br /&gt;5. Misusing Public Static variables&lt;br /&gt;- Attackers can replace values whenever, the variable becomes public in the whole JVM.&lt;br /&gt;Good Solution: Use private static or even better Enum.&lt;br /&gt;&lt;br /&gt;6. Believe a constructor exception destroys the object&lt;br /&gt;Solution: Use intitialized flag, check the flag in all relevant methods&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Following these 6 anitpatterns should make your code more secure. Not really sure it is needed all the time though.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;check out:&lt;br /&gt;&lt;br /&gt;java.sun.com/security/seccodeguide.html (a new version to be released soon)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-117018386126902366?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/117018386126902366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=117018386126902366' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/117018386126902366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/117018386126902366'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2007/01/jfokus_117018386126902366.html' title='JFokus'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-115097895531785691</id><published>2006-06-22T05:18:00.000-07:00</published><updated>2006-06-22T06:06:27.303-07:00</updated><title type='text'>My SOA mind map</title><content type='html'>&lt;span style="font-size:100%;"&gt;My way to remember what SOA is about&lt;/span&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-family:trebuchet ms;font-size:130%;"&gt;SOA Basic Design Principles (&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;b style="font-family: trebuchet ms;"&gt;ASIG&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;font-size:130%;"&gt;)&lt;/span&gt;&lt;o:p&gt;&lt;span style="font-family:trebuchet ms;font-size:130%;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0cm;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;A&lt;/b&gt;bstraction – Reduce and factor      out details to focus on higher conceptual representation of an object (OO      principle)&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;S&lt;/b&gt;tandardization – The service need      to use open standards and communicate in a formulized way&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;st1:city st="on"&gt;&lt;st1:place st="on"&gt;&lt;b style=""&gt;I&lt;/b&gt;ndependence&lt;/st1:place&gt;&lt;/st1:city&gt;      – Each service needs to be a black box! The service will run independent      of each other and could be deployed on different environments.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;G&lt;/b&gt;eneralization – The service needs      to be fine grained enough to be efficient but course grained enough to be      reusable.&lt;/li&gt;&lt;/ul&gt;      &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-family:webdings;"&gt;SOA Features (&lt;/span&gt;&lt;b style="font-family: webdings;"&gt;FRISC&lt;/b&gt;&lt;span style="font-family:webdings;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-family:webdings;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0cm;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;F&lt;/b&gt;lexibility – Loosely coupled services      are very flexible as they can be used in a number of systems&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;R&lt;/b&gt;eusability – The holy grail of      system development. The ability to develop application components in a way      that they can be reused by other applications.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;I&lt;/b&gt;nteroperability – Standardized      way of communication between business services.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;S&lt;/b&gt;calability – Services are      independent of each other and so can easily be scaled individually where      required.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;C&lt;/b&gt;ost efficient – Reuse of existing      business services reduce need for duplication and development and testing      in new applications that re-uses these services (e.g. Service to get      Postcodes)&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-115097895531785691?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/115097895531785691/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=115097895531785691' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/115097895531785691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/115097895531785691'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2006/06/my-soa-mind-map.html' title='My SOA mind map'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-114965150495634641</id><published>2006-06-06T19:01:00.000-07:00</published><updated>2006-06-06T21:02:20.746-07:00</updated><title type='text'>JAXP and JAXB</title><content type='html'>6/6/6 The number of the beast -- Get to know JAXB.&lt;br /&gt;&lt;br /&gt;The introduction&lt;br /&gt;&lt;a href="http://java.sun.com/developer/technicalArticles/WebServices/jaxb/index.html"&gt;Java Architecture for XML binding (Article, Sun March 2003)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;My short version of this article&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;JAXP - Java API for XML Processing&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Provides SAX and DOM&lt;/li&gt;&lt;ul&gt;&lt;li&gt; Used to scan XML documents and break it up to pieces that are made available to the application.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Differences Between SAX and DOM&lt;/li&gt;&lt;ul&gt;&lt;li&gt;SAX starts from the beginning of the document and passes each piece to the application as it finds it. Nothing is stored in memory.&lt;/li&gt;&lt;li&gt;DOM creates a tree of objects in memory that hte application can navigate through and access and manipulate data.&lt;/li&gt;&lt;li&gt;Difference - SAX cannot update data to the XML file but in DOM we can.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;JAXB - Java Architecture for XML binding&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Another Java API that can make it easier to access XML documents&lt;/li&gt;&lt;li&gt;Check out the example (Accessing an XML Document, JAXP and JAXB) or just be happy with the fact that: &lt;span style="font-style: italic;"&gt;"Using &lt;/span&gt;&lt;span style="font-style: italic;"&gt;JAXB instead of JAXP, &lt;/span&gt;&lt;span style="font-style: italic;"&gt;there is no need to create and use a parser using and no need to write a content handler with callback methods. What this means is that developers can access and process XML data without having to know XML or XML processing".&lt;/span&gt;&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;Using JAXB, you would:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://java.sun.com/developer/technicalArticles/WebServices/jaxb/index.html#binsch"&gt;Bind the schema&lt;/a&gt; for the XML document.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://java.sun.com/developer/technicalArticles/WebServices/jaxb/index.html#unmars"&gt;Unmarshal the document&lt;/a&gt; into Java content objects. The Java content objects represent  the content and organization of the XML document, and are directly available to your program.  &lt;/li&gt;&lt;/ul&gt;&lt;li&gt;What is a schema?&lt;/li&gt;&lt;ul&gt;&lt;li&gt;A schema is an XML specification that governs the allowable components of an XML document and the relationships between the components.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;JAXB requires &lt;/span&gt;that the  XML document you want to access has a schema, and that schema is written in the  &lt;a href="http://www.w3.org/TR/xmlschema-0"&gt;W3C XML Schema Language&lt;/a&gt;&lt;/li&gt;&lt;li&gt; &lt;span style="font-weight: bold;"&gt;Binding &lt;/span&gt;a schema means generating (using a binding compiler) a set of Java classes that represents  the schema. The binding compiler generates a set of interfaces and a set of classes that implement the interfaces. (Eg: &lt;a href="http://java.sun.com/developer/technicalArticles/WebServices/jaxb/books.txt"&gt;books.xsd&lt;/a&gt; would generate &lt;a href="http://java.sun.com/developer/technicalArticles/WebServices/jaxb/BookType.java"&gt;BookType.java&lt;/a&gt;, &lt;a href="http://java.sun.com/developer/technicalArticles/WebServices/jaxb/BookTypeImpl.java"&gt;BookTypeImpl.java&lt;/a&gt; etc.)&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt; Unmarshalling &lt;/span&gt;an XML document means creating a tree of content objects that represents the content and organization of the document.  The content objects are instances of the classes produced by the binding compiler. See example (&lt;a href="http://java.sun.com/developer/technicalArticles/WebServices/jaxb/index.html#unmars"&gt;how to unmarshal the XML document&lt;/a&gt;)  &lt;/li&gt;&lt;/ul&gt;&lt;a href="http://java.sun.com/developer/technicalArticles/WebServices/jaxb/index.html"&gt;    &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-114965150495634641?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/114965150495634641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=114965150495634641' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114965150495634641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114965150495634641'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2006/06/jaxp-and-jaxb.html' title='JAXP and JAXB'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-114904890573363278</id><published>2006-05-30T21:13:00.000-07:00</published><updated>2006-05-30T21:18:23.476-07:00</updated><title type='text'>Use SSL with Tomcat 5.5</title><content type='html'>Quick Tomcat SSL configuartion&lt;br /&gt;1. $CATALINA_HOME or $CATALINA_BASE must be set in your environment, check in command prompt in windows&lt;br /&gt;C:\echo %CATALINA_HOME%&lt;br /&gt;&lt;br /&gt;2. Create a keystore using the keytool found in java/bin directory, check if you JAVA_HOME environment variable is set&lt;br /&gt;C:\echo %JAVA_HOME%&lt;br /&gt;If JAVA_HOME is not set, go to control panel -&gt; system -&gt; advanced and environment variables and add it and let it point to your java home directory.&lt;br /&gt;When it is set this command should execute the keygenerator&lt;br /&gt;C:\%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA&lt;br /&gt;&lt;br /&gt;If you are having any conflict or some keystore already exists you can specify where your new keystore should be placed like this:&lt;br /&gt;C:\%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA -keystore \temp\keystore&lt;br /&gt;&lt;br /&gt; And specify a password value of "changeit" for both the keystore and the key&lt;br /&gt;&lt;br /&gt;Important: Tomcat will by default look for a keystore named .keystore in the logged in user's home directory and it will also use the password "changeit" by default to open the keystore and for the generated key. This can however be configured in tomcat's server.xml file. But the password for the keystore and the key must be the same.&lt;br /&gt;&lt;br /&gt;3. Edit server.xml in tomcat&lt;br /&gt;&lt;br /&gt;This is what I did in the server.xml found in %CATALINA_HOME%\conf&lt;br /&gt;&lt;br /&gt;Just uncomment the SSL snippet and add keystoreFile and keystorePass if you are using something else than "changeit"&lt;br /&gt;&lt;br /&gt;&lt;!-- Define a SSL HTTP/1.1 Connector on port 8443 --&gt;&amp;ltd;!-- Define a SSL HTTP/1.1 Connector on port 8443 --&gt;&lt;br /&gt;&amp;ltd;Connector port="8443" maxHttpHeaderSize="8192"&lt;br /&gt;              maxThreads="150" minSpareThreads="25" maxSpareThreads="75"&lt;br /&gt;              enableLookups="false" disableUploadTimeout="true"&lt;br /&gt;              acceptCount="100" scheme="https" secure="true"&lt;br /&gt;              clientAuth="false" sslProtocol="TLS"&lt;br /&gt;              keystoreFile="C:\temp\keystore"&lt;br /&gt;              keystorePass="mysecretpassword" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;connector port="8443" maxhttpheadersize="8192" maxthreads="150" minsparethreads="25" maxsparethreads="75" enablelookups="false" disableuploadtimeout="true" acceptcount="100" scheme="https" secure="true" clientauth="false" sslprotocol="TLS" keystorefile="C:\temp\keystore" keystorepass="mysecretpassword"&gt;&lt;br /&gt;&lt;br /&gt;4. Restart Tomcat and try  &lt;/connector&gt;&lt;pre&gt;https://localhost:8443&lt;br /&gt;&lt;/pre&gt; This shoud give you the ordinary startup page if everything worked as it should&lt;br /&gt;&lt;br /&gt;&lt;img src="http://tomcat.apache.org/tomcat-5.5-doc/images/void.gif" border="0" height="1" hspace="0" vspace="0" width="1" /&gt;&lt;br /&gt;Check this link for all details&lt;br /&gt;http://tomcat.apache.org/tomcat-5.5-doc/ssl-howto.html&lt;br /&gt;&lt;br /&gt;/Crille&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-114904890573363278?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/114904890573363278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=114904890573363278' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114904890573363278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114904890573363278'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2006/05/use-ssl-with-tomcat-55.html' title='Use SSL with Tomcat 5.5'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-114839618683057099</id><published>2006-05-23T07:56:00.000-07:00</published><updated>2006-06-22T05:47:25.006-07:00</updated><title type='text'>Acegi Implementation</title><content type='html'>&lt;a href="http://ljungblad.blogspot.com/"&gt;Acegi Implementation in existing project&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is a short description of how I implemented security in my application using Acegi. (Wont make much sense if not knowing how acegi works though). But here are some links to get started:&lt;br /&gt;&lt;br /&gt;Various articles:&lt;br /&gt;http://acegisecurity.org/articles.html&lt;br /&gt;&lt;br /&gt;Acegi/Spring forum:&lt;br /&gt;http://forum.springframework.org/forumdisplay.php?f=33&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Lets get started&lt;/span&gt;&lt;br /&gt;My application already had an User model mapped to the database having username and password.&lt;br /&gt;&lt;br /&gt;Implementing Acegi was done in two major steps&lt;br /&gt;1. Preparing the application (Acegi UserDetails, Role model)&lt;br /&gt;2. Configure filters (acegiApplicationContext.xml)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;First step (prepare application)&lt;/span&gt;&lt;br /&gt;Add acegi details to the existing User&lt;br /&gt;1. Implement Acegi UserDetails interface to existing user class.&lt;br /&gt;2. Make properties and Hibernate mapping to the new properties in the class. Make sure to do setters to the implemented properties from UserDetails.&lt;br /&gt;3. Create a Role and map it to the user. One user can have many roles (Set of roles).&lt;br /&gt;4. Make  a JUnit test and create a User, a Role, and give the User a this role, delete the user.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Second Step (Add and configure filters)&lt;/span&gt;&lt;br /&gt;1. Start in web.xml and add the FilterToBeanProxy, this will secure filter invocations. It delegates to filterChainProxy that is the next step.&lt;br /&gt;&lt;br /&gt;&amp;lt;filter&gt;&lt;br /&gt;&amp;lt;filter-name&gt;Acegi Filter Chain Proxy&lt;br /&gt;&amp;lt;filter-class&gt;&lt;br /&gt;org.acegisecurity.util.FilterToBeanProxy&lt;br /&gt;&lt;br /&gt;&amp;lt;init-param&gt;&lt;br /&gt;&amp;lt;param-name&gt;targetBean&lt;br /&gt;&amp;lt;param-value&gt;filterChainProxy&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;filter-mapping&gt;&lt;br /&gt;&amp;lt;filter-name&gt;Acegi Filter Chain Proxy&lt;br /&gt;&amp;lt;url-pattern&gt;/*&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. Create an acegiApplicationContext.xml file and add:&lt;br /&gt;&lt;br /&gt;&amp;lt;bean id="filterChainProxy" class="org.acegisecurity.util.FilterChainProxy"&gt;&lt;br /&gt;&amp;lt;property name="filterInvocationDefinitionSource"&gt;&lt;br /&gt;&amp;lt;value&gt;&lt;br /&gt;CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON&lt;br /&gt;PATTERN_TYPE_APACHE_ANT            /**=httpSessionContextIntegrationFilter,authenticationProcessingFilter,basicProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The FilterChainProxy is used to create and start up the filters. All filters are chained together by the FilterChainProxy and started in the specified order.&lt;br /&gt;&lt;br /&gt;3. Lets have a look at the filters we have choosen to use in the filterChainProxy bean.&lt;br /&gt;&amp;lt;!-- Automatically receives AuthenticationEvent messages --&gt;&lt;br /&gt;&amp;lt;bean id="httpSessionContextIntegrationFilter" class="org.acegisecurity.context.HttpSessionContextIntegrationFilter"&gt;&lt;br /&gt;&amp;lt;property name="context" value="org.acegisecurity.context.SecurityContextImpl"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. Find the hook where your application add Spring, could be in applicationContext.xml or a plugin in struts-config.xml.&lt;br /&gt;&lt;br /&gt;2. Add a acegiApplicationContext.xml, e.g. in struts-config.xml. Better of is to add the acegiApplicationContext.xml in your spring application context file.&lt;br /&gt;&lt;br /&gt;&amp;lt;plug-in classname="org.springframework.web.struts.ContextLoaderPlugIn"&gt;&lt;br /&gt;&amp;lt;set-property property="contextConfigLocation" value="/WEB-INF/applicationContext.xml,/WEB-INF/acegiApplicationContext.xml"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note that it is not necessary to make a seperate context file for acegi security. All acegi configuration could easily be done in your spring application context file. But it is good to keep things seperated.&lt;br /&gt;&lt;br /&gt;3. Create the acegiApplicationContext.xml and start setting up the needed filters for Authentication, Authorization.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-114839618683057099?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/114839618683057099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=114839618683057099' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114839618683057099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114839618683057099'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2006/05/acegi-implementation.html' title='Acegi Implementation'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-114483607810722687</id><published>2006-04-12T02:39:00.000-07:00</published><updated>2006-04-12T03:01:18.123-07:00</updated><title type='text'>New Appfuse Project in Eclipse</title><content type='html'>New AppFuse Project in Eclipse  - initial startup using hibernate&lt;br /&gt;&lt;br /&gt;All this is well documented by Matt Raible but I wanted to have a quick start with some config stuff that I often use for starting up a new AppFuse Project.&lt;br /&gt;&lt;br /&gt;1. &lt;a href="http://appfuse.org/"&gt;Download latest appfuse&lt;/a&gt;&lt;br /&gt;2. Unzip and go to appfuse folder and run: &lt;span style="font-weight: bold;"&gt;ant new &lt;/span&gt;(and fill in name of project, name of domain, name of database)&lt;br /&gt;3. In eclipse - File -&gt; New Project -&gt; Java Project&lt;br /&gt;&lt;ul&gt;   &lt;li&gt;Fill in Project Name and in &lt;span style="font-style: italic;"&gt;"Create Project from existing source"&lt;/span&gt; browse to the folder where you got your new project created by the &lt;span style="font-weight: bold;"&gt;ant new&lt;span style="font-style: italic;"&gt; &lt;/span&gt;&lt;/span&gt;command make in step 2.&lt;/li&gt;   &lt;li&gt;Clean project: Project-&gt;Clean...&lt;/li&gt;   &lt;li&gt;Open build.properties and Change/add information about your database, e.g.&lt;br /&gt;    &lt;span style="font-style: italic;"&gt; database.admin.username=root&lt;/span&gt;&lt;br /&gt;     &lt;span style="font-style: italic;"&gt; database.admin.password=password&lt;/span&gt;&lt;br /&gt;      &lt;br /&gt;     &lt;span style="font-style: italic;"&gt; hibernate.dialect=org.hibernate.dialect.MySQLDialect&lt;/span&gt;&lt;br /&gt;     &lt;span style="font-style: italic;"&gt; database.driver_class=com.mysql.jdbc.Driver&lt;/span&gt;&lt;br /&gt;     &lt;span style="font-style: italic;"&gt; database.url=jdbc:mysql://127.0.0.1:3306/myprojectdb&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt; 4. Go back to command promt and run &lt;span style="font-weight: bold;"&gt;ant setup-db &lt;/span&gt;and the &lt;span style="font-weight: bold;"&gt;ant test-all&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Notice that tomcat and ant environment variables have to be set in eclipse as well.&lt;br /&gt;Read more about running Appfuse in eclispe &lt;a href="http://raibledesigns.com/wiki/Wiki.jsp?page=AppFuseEclipse"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Project should be built and tested successfullt.&lt;br /&gt;&lt;br /&gt;All tutorials and other articles for AppFuse is found &lt;a href="http://raibledesigns.com/wiki/Articles.html#thogau"&gt;here&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;/C&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-114483607810722687?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/114483607810722687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=114483607810722687' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114483607810722687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114483607810722687'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2006/04/new-appfuse-project-in-eclipse.html' title='New Appfuse Project in Eclipse'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-114281482745296029</id><published>2006-03-19T16:33:00.000-08:00</published><updated>2006-03-19T17:06:35.590-08:00</updated><title type='text'>Config Eclipse for Web development - 3 steps</title><content type='html'>&lt;a href="http://ljungblad.blogspot.com/"&gt;Config Eclipse for Web development - 3 steps&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Just a fast track to set-up eclipse with WTP, Tomcat , configure it and write a small web application to test the environment.&lt;br /&gt;&lt;br /&gt;Step 1.&lt;br /&gt;&lt;a href="http://www.eclipse.org/downloads/"&gt;Download &lt;/a&gt;and Install latest Eclipse SDK&lt;br /&gt;&lt;br /&gt;Step 2.&lt;br /&gt;&lt;a href="http://tomcat.apache.org/"&gt;Download &lt;/a&gt;and install an application server (tomcat in this case)&lt;br /&gt;&lt;br /&gt;Step 3.&lt;br /&gt;Download (&lt;a href="http://www.eclipse.org/downloads/download.php?file=/webtools/downloads/drops/R-1.0-200512210855/wtp-all-in-one-sdk-1.0-win32.zip"&gt;wtp-all-in-one-sdk-1.0-win32.zip&lt;/a&gt;) and Install WTP (&lt;span style="font-weight: bold;"&gt;W&lt;/span&gt;eb &lt;span style="font-weight: bold;"&gt;T&lt;/span&gt;ools &lt;span style="font-weight: bold;"&gt;P&lt;/span&gt;latform). Just unzip this archived file to the same folder as your eclipse home folder. The new wtp plugins should appear in the plugin folder.&lt;br /&gt;&lt;br /&gt;Use this &lt;a href="http://www.comp.mq.edu.au/units/itec833/Extras/BuildJ2EEWebApp.html"&gt;tutortial&lt;/a&gt; to configure and develop a small application to test the environment. Notice that we have already done the first step (Getting started, so skip that part).&lt;br /&gt;&lt;br /&gt;That's it!!&lt;br /&gt;-----------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Extra - Another useful plug-ins for Ecplise&lt;br /&gt;&lt;a href="http://quantum.sourceforge.net/"&gt;QuantumDB -&lt;/a&gt; A database access plug-in for the             Eclipse&lt;br /&gt;&lt;br /&gt;1. Install plugin and restart Eclipse, Go to Window-Show View-Other-QuantumDB-Database Bookmarks.&lt;br /&gt;&lt;br /&gt;2. Choose "New bookmark" in Database Bookmark window and "Add Driver"&lt;br /&gt;3. Add a .jar for you db driver (e.g &lt;span style="font-style: italic;"&gt;mysql-connector-java-3.1.7-bin.jar&lt;/span&gt; ) for MySQL.&lt;br /&gt;4. Browse for Class name (e.g  com.mysql.jdbc.Driver)&lt;br /&gt;5. Enter username and password and the name of the database to connect to.&lt;br /&gt;&lt;br /&gt;You should now be able to see the relations in the database.&lt;br /&gt;&lt;br /&gt;/Crille&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-114281482745296029?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/114281482745296029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=114281482745296029' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114281482745296029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114281482745296029'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2006/03/config-eclipse-for-web-development-3.html' title='Config Eclipse for Web development - 3 steps'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-114118002118982188</id><published>2006-02-28T18:27:00.000-08:00</published><updated>2006-02-28T18:53:05.556-08:00</updated><title type='text'>Interfacing the Camtech Server (part 2)</title><content type='html'>&lt;a href="http://ljungblad.blogspot.com/"&gt;Interfacing the Camtech Server(part 2)&lt;/a&gt;&lt;br /&gt;Next step is to use the camtech server from your application. We have now tested the existing Example code and know that it connects to the gateway using the generated private key and the imported certificate. Three steps to use this code from your application.&lt;br /&gt;&lt;br /&gt;1. Copy the Example.java (see part 1) to your application.&lt;br /&gt;2. Copy the needed jars (activation.jar, iaik_jce.jar, mail.jar, MerchantServer.jar) from .\MerchantServer\jars to your application. Set classpath if necessary and compile.&lt;br /&gt;3. Copy the jars mentioned in step 2 to the J2EE container. In tomcat that is to the %CATALINA_HOME%\common\lib folder.&lt;br /&gt;4. Set the system property "install.root" in the container. This can be done using command prompt:&lt;br /&gt;SET JAVA_OPTS=-Dinstall.root=E:\Tools\MerchantServer&lt;br /&gt;before running the startup script. More info found &lt;a href="http://tomcat.apache.org/faq/misc.html#properties"&gt;here&lt;/a&gt; and also check out &lt;a href="http://web.bvu.edu/staff/david/index.jsp?section=software&amp;subsection=tcservcfg&amp;amp;page=overview"&gt;A tomcat Service Manager for Windows&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2779/1183/1600/tomcat_manager.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/2779/1183/320/tomcat_manager.jpg" alt="" border="0" /&gt;&lt;/a&gt;The tomcat service manager makes it easy to manage tomcat. I recommend to install this to avoid setting up temporarily properties and to get a good overview of the tomcat management.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5. Deploy your .war file to tomcat and test to run the Example code. Check the standard output, should have something like:&lt;br /&gt;&lt;br /&gt;----------------------------------------------&lt;br /&gt;The results of the transaction are as follows:&lt;br /&gt;Summary Code: 0&lt;br /&gt;Response Code: 00&lt;br /&gt;Response Text: Approved&lt;br /&gt;RRN: r9bTp96&lt;br /&gt;Authorisation ID Response: DZ0&lt;br /&gt;XID: 2187481&lt;br /&gt;Settlement Date: 0301&lt;br /&gt;&lt;br /&gt;--------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Problems&lt;br /&gt;&lt;/span&gt;If you get this exeption:&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;Exception: The merchant's private key could not be found"&lt;br /&gt;&lt;br /&gt;Common reasons: the merchant id and password combination not being correct. If you are not sure of these values, then please delete and recreate this account, and request another certificate. This response is also generated if the keys or certificate have been corrupted. This scenario will also require you to delete and recreate this account, and request another certificate.&lt;br /&gt;&lt;br /&gt;Please note that you will also receive this response if the -Dinstall.root property has not been set correctly when running your code. Please make sure that this property has been included within your Tomcat start up script. i.e. (step 4)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-114118002118982188?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/114118002118982188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=114118002118982188' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114118002118982188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114118002118982188'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2006/02/interfacing-camtech-server-part-2.html' title='Interfacing the Camtech Server (part 2)'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-114070366059262662</id><published>2006-02-23T06:02:00.000-08:00</published><updated>2006-02-28T18:31:16.926-08:00</updated><title type='text'>Camtech Server Install and test (part1)</title><content type='html'>&lt;span id="HomepageRightCell_AreaIntro1" title="Area Intro 1"&gt;Just installed &lt;a href="http://www.camtech.com.au"&gt;Camtech's Server &lt;/a&gt;which handles secure payments services via the Web. I knew that this will not be the only time installing and configuring the server so I wrote a quick manual to do the setup and test it in one go without going through the documentation (not that the documenation is bad in any way, it is very neat).&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Installation&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;p class="MsoNormal"&gt;Downloaded the Version 6.2.0 of the Camtech Merchant Server &lt;/p&gt;   &lt;p&gt;&lt;strong&gt;FTP site:&lt;/strong&gt; 203.22.215.195&lt;br /&gt;&lt;strong&gt;Login:&lt;/strong&gt; channel&lt;br /&gt;&lt;strong&gt;Password:&lt;/strong&gt; CamtKeyCorp&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;a href="http://www.camtech.com.au/Support/SoftwareandHardware.htm"&gt;http://www.camtech.com.au/Support/SoftwareandHardware.htm&lt;/a&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;br /&gt;Execute installer: &lt;/p&gt;   &lt;p class="MsoNormal"&gt;E:\Software\V6\620\Windows\MerchantServerInstaller620b2 &lt;/p&gt;   &lt;p class="MsoNormal"&gt;And installed it under (for example):&lt;/p&gt;   &lt;p class="MsoNormal"&gt;E:\Tools\MerchantServer&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;Configure the MerchantServer….execute batch file&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;E:\Tools\MerchantServer\bin\ ConfigurationTool&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shapetype id="_x0000_t75" coordsize="21600,21600" spt="75" preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;  &lt;v:stroke joinstyle="miter"&gt;  &lt;v:formulas&gt;   &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;   &lt;v:f eqn="sum @0 1 0"&gt;   &lt;v:f eqn="sum 0 0 @1"&gt;   &lt;v:f eqn="prod @2 1 2"&gt;   &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;   &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @0 0 1"&gt;   &lt;v:f eqn="prod @6 1 2"&gt;   &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;   &lt;v:f eqn="sum @8 21600 0"&gt;   &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @10 21600 0"&gt;  &lt;/v:formulas&gt;  &lt;v:path extrusionok="f" gradientshapeok="t" connecttype="rect"&gt;  &lt;o:lock ext="edit" aspectratio="t"&gt; &lt;/v:shapetype&gt;&lt;v:shape id="_x0000_i1025" type="#_x0000_t75" style="'width:300.6pt;"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\CHRIST~1\LOCALS~1\Temp\msohtml1\01\clip_image001.png" title=""&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2779/1183/1600/config1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2779/1183/320/config1.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   IP Address: Whatever address you get when running “ipconfig” command. e.g.   &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1027" type="#_x0000_t75" style="'width:369pt;height:136.8pt'"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\CHRIST~1\LOCALS~1\Temp\msohtml1\01\clip_image003.png" title=""&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2779/1183/1600/ipconfig.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2779/1183/320/ipconfig.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;!--[endif]--&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;SMTP mail host:&lt;/p&gt;   &lt;p class="MsoNormal"&gt;Outgoing mail server&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;Administrator Email Address&lt;/p&gt;   &lt;p class="MsoNormal"&gt;The email address where the certificate will be sent to.&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1026" type="#_x0000_t75" style="'width:396pt;height:269.4pt'"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\CHRIST~1\LOCALS~1\Temp\msohtml1\01\clip_image005.png" title=""&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2779/1183/1600/config2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2779/1183/320/config2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;!--[endif]--&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;Generate Keys will generate the keypair&lt;/p&gt;   &lt;p class="MsoNormal"&gt;Request Certificate will send the certificate to the Administrator mail address&lt;/p&gt;   &lt;p class="MsoNormal"&gt;Import Certificate is used to import the emailed certificate to the MerchantServer, don’t forget to Apply.&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;Don’t worry about the Gateways tab unless you bump into problems later on.&lt;br /&gt;&lt;/p&gt;&lt;b&gt;&lt;i&gt;&lt;span style=";font-family:Arial;font-size:14;"  &gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;  &lt;h2&gt;For testing&lt;/h2&gt;   &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;      &lt;p class="MsoNormal"&gt;Set classpath so it can compile the Example.java file:&lt;!--[if !vml]--&gt;&lt;br /&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;!--[endif]--&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2779/1183/1600/java.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2779/1183/320/java.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Update the Example.java&lt;/p&gt;   &lt;p class="MsoNormal"&gt;I had to do 3 things:&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;1. Change the path to the “merchantserver.config” file&lt;/p&gt;   &lt;p class="MsoNormal"&gt;2.&lt;span style=""&gt;  &lt;/span&gt;Change the MERCANT_ID and the PASSWORD to the configured ones.&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;private static final String CONFIG_FILE =&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;     &lt;/span&gt;&lt;span style=""&gt;                           &lt;/span&gt;"../merchantserver.config";&lt;/p&gt;   &lt;p class="MsoNormal"&gt;……&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;/*&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;     &lt;/span&gt;* The Merchant's details, as configured in the Camtech E-Commerce Configuration&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;     &lt;/span&gt;* Tool.&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;     &lt;/span&gt;*/&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;private static final String MERCHANT_ID = "mytestID";&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;private static final String PASSWORD = "pass123";&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;Set the classpath, make sure to have the  MerchantServer.jar, iaik_jce.jar, activation.jar as well as the Example java folder in the classpath.&lt;br /&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;Compile Example.java&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1029" type="#_x0000_t75" style="'width:6in;height:64.2pt'"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\CHRIST~1\LOCALS~1\Temp\msohtml1\01\clip_image009.png" title=""&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2779/1183/1600/javac.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2779/1183/320/javac.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;!--[endif]--&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   Run a test (need to set System property “root.install” to the root directory where the Merchant is installed)&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1030" type="#_x0000_t75" style="'width:6in;height:178.2pt'"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\CHRIST~1\LOCALS~1\Temp\msohtml1\01\clip_image011.png" title=""&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2779/1183/1600/New%20Picture%20%285%29.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2779/1183/320/New%20Picture%20%285%29.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Voila...my server connected to the Payment Gateway and approved my creditcard :)&lt;br /&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;/Chris&lt;br /&gt;&lt;!--[endif]--&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-114070366059262662?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/114070366059262662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=114070366059262662' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114070366059262662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114070366059262662'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2006/02/camtech-server-install-and-test-part1.html' title='Camtech Server Install and test (part1)'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-114066099804147153</id><published>2006-02-22T17:29:00.000-08:00</published><updated>2006-02-22T18:16:38.053-08:00</updated><title type='text'>Inaugural Sydney Spring User Group Meeting</title><content type='html'>I went to the first Spring User Group Meeting here in Sydney. It turned out to be very popular and it was full house.&lt;br /&gt;&lt;br /&gt;Rod Johnson was there and talked about the goal of POJO development, Dependency Injection (a form of Inversion of Control), AOP (Aspect Oriented programming) and portable, lightweight abstractions for core services. He also talked about the new features in Spring 2.0 and beyond.&lt;br /&gt;&lt;br /&gt;One thing that Rod emphazised was the fact that configuration was often made very differently, even in the same projects and how much easier it would be if configuration was done in one agreed way from start. He did also talked about testing and how Spring let you make push objects instead of pull objects and thereby make it much easier to test and showed some examples. It was all very interesting and I am looking forward to next meeting in April.&lt;br /&gt;&lt;br /&gt;/Chris&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-114066099804147153?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/114066099804147153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=114066099804147153' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114066099804147153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114066099804147153'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2006/02/inaugural-sydney-spring-user-group.html' title='Inaugural Sydney Spring User Group Meeting'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-114065816352141572</id><published>2006-02-22T17:20:00.000-08:00</published><updated>2006-02-22T17:29:23.523-08:00</updated><title type='text'>MySQL user privileges</title><content type='html'>See this link for full description&lt;br /&gt;http://mysqld.active-venture.com/Adding_users.html&lt;br /&gt;&lt;p&gt;Then you can add new users by issuing &lt;code&gt;GRANT&lt;/code&gt; statements:&lt;/p&gt;         &lt;pre&gt;mysql&gt; GRANT ALL PRIVILEGES ON *.* TO monty@localhost&lt;br /&gt;  -&gt;     IDENTIFIED BY 'some_pass' WITH GRANT OPTION;&lt;br /&gt;mysql&gt; GRANT ALL PRIVILEGES ON *.* TO monty@'%'&lt;br /&gt;  -&gt;     IDENTIFIED BY 'some_pass' WITH GRANT OPTION;&lt;br /&gt;mysql&gt; GRANT RELOAD,PROCESS ON *.* TO admin@localhost;&lt;br /&gt;mysql&gt; GRANT USAGE ON *.* TO dummy@localhost;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-114065816352141572?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/114065816352141572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=114065816352141572' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114065816352141572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114065816352141572'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2006/02/mysql-user-privileges.html' title='MySQL user privileges'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-114049623057324053</id><published>2006-02-20T20:30:00.000-08:00</published><updated>2006-02-20T20:37:44.600-08:00</updated><title type='text'>Some MySQL stuff</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;a href="http://www.pantz.org/database/mysql/mysqlcommands.shtml"&gt;Here&lt;/a&gt; is an overview of useful MySQL commands&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.php-mysql-tutorial.com/mysql-tutorial/add-new-mysql-user.php"&gt;Here&lt;/a&gt; is a full description of how to add a new MySQL user.&lt;br /&gt;&lt;br /&gt;Delete a row from a table&lt;br /&gt;&lt;/span&gt;Delete a row(s) from a table.&lt;br /&gt;DELETE from [table name] where [field name] = 'whatever';&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Add a MySQL user&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;mysql&gt; &lt;strong&gt;use mysql;&lt;/strong&gt;&lt;br /&gt;    Database changed       &lt;p&gt;mysql&gt; INSERT INTO user (host, user, password, select_priv, insert_priv,       update_ priv) VALUES ('localhost', 'chris', &lt;strong&gt;PASSWORD('password')&lt;/strong&gt;,       'Y', 'Y', 'Y');&lt;br /&gt;    Query OK, 1 row affected (0.20 sec)&lt;/p&gt;       &lt;p&gt;mysql&gt; &lt;strong&gt;FLUSH PRIVILEGES;&lt;/strong&gt;&lt;br /&gt;    Query OK, 1 row affected (0.01 sec) &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-114049623057324053?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/114049623057324053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=114049623057324053' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114049623057324053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114049623057324053'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2006/02/some-mysql-stuff.html' title='Some MySQL stuff'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-114031509319004947</id><published>2006-02-18T18:11:00.000-08:00</published><updated>2006-02-18T19:03:55.496-08:00</updated><title type='text'>Hibernate mapping using xDoclet</title><content type='html'>&lt;a href="http://ljungblad.blogspot.com/"&gt;Hibernate mapping using xDoclet&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://raibledesigns.com/page/rd" target="_blank"&gt;Matt Raible&lt;/a&gt; gives nice &lt;a href="http://raibledesigns.com/wiki/HibernateRelationships.html" target="_blank"&gt;examples&lt;/a&gt; of how to do the &lt;span style="font-weight: bold;"&gt;many-to-many&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;one-to-many &lt;/span&gt;and &lt;span style="font-weight: bold;"&gt;many-to-one &lt;/span&gt;mappings using xDoclet.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.thogau.net/" target="_blank"&gt;Thomas Gaudin&lt;/a&gt; has written a tutorials for &lt;a href="http://www.thogau.net/tutorials/pojo/tutorial04-01.jsp" target="_blank"&gt;Hibernate mapping with xDoclet&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;I have not been practicing hibernate and ORM for a very long time, but it has definetly changed alot in terms of writing amount of code. I also recommend the book "Hibernate in Action" (&lt;a href="http://www.javalobby.org/articles/hibernate-in-action/?source=archives" target="_blank"&gt;read book review&lt;/a&gt;) written by Christian Bauer and Gaving King.&lt;br /&gt;&lt;br /&gt;/Chris&lt;br /&gt;&lt;br /&gt;&lt;many-to-one&gt;&lt;/many-to-one&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-114031509319004947?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/114031509319004947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=114031509319004947' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114031509319004947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/114031509319004947'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2006/02/hibernate-mapping-using-xdoclet.html' title='Hibernate mapping using xDoclet'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13456626.post-113837089381714373</id><published>2006-01-27T06:06:00.000-08:00</published><updated>2006-01-27T06:08:13.823-08:00</updated><title type='text'>Great Ocean Road 2005</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/2779/1183/640/g26.jpg"&gt;&lt;img style="CLEAR: all; FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/2779/1183/320/g26.jpg" border="0" /&gt;&lt;/a&gt; This is a picture taken on one of many "Great Ocean Road" trips.&amp;nbsp;&lt;a href='http://picasa.google.com/' target='ext'&gt;&lt;img src='http://photos1.blogger.com/pbp.gif' alt='Posted by Picasa' style='border: 0px none ; padding: 0px; background: transparent none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;' align='middle' border='0' /&gt;&lt;/a&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13456626-113837089381714373?l=ljungblad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ljungblad.blogspot.com/feeds/113837089381714373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13456626&amp;postID=113837089381714373' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/113837089381714373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13456626/posts/default/113837089381714373'/><link rel='alternate' type='text/html' href='http://ljungblad.blogspot.com/2006/01/great-ocean-road-2005.html' title='Great Ocean Road 2005'/><author><name>Crille</name><uri>http://www.blogger.com/profile/00807272413962897009</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
