<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/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" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0"><id>tag:blogger.com,1999:blog-34849561</id><updated>2012-05-15T12:40:23.413-07:00</updated><title type="text">My IT world</title><subtitle type="html">Java, J2EE, JBoss, MySQL, Oracle, Bea WebLogic and friends</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://ostas.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default?start-index=26&amp;max-results=25" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>97</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/MyItWorld" /><feedburner:info uri="myitworld" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>MyItWorld</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry><id>tag:blogger.com,1999:blog-34849561.post-2904244583576718697</id><published>2012-04-23T03:13:00.000-07:00</published><updated>2012-04-23T03:13:09.536-07:00</updated><title type="text">Distributed Transactions Failure Simulation</title><content type="html">If you have many resources which are needed to be updated as one atomic operation, probably you are using XA transactions. For example, you need to change data in database and send notification about this change to external system. Important point to note - db change and notification doesn't make sense in case one of them fails for some reason. Everything could fail, we leaving in not ideal world. The question is how to test the worst case - resource failure and be sure that system is in predictable state before and after transaction. There are could be different approaches for this, but in this blog entry I'm going to describe approach I found really interesting. As for me it's one of the best approaches to ensure that transactions in application are really bullet proof.  I'm talking here about "failure injection". "Injection" means that you can declaratively enforce some method to throw exception, without changing any code from service layer. It's really close to simulating real failure. All this possible with JBoss Bytemann (http://www.jboss.org/byteman). This Java agent can do much more, but it's out of scope of this post.  They have support for jUnit, a special annotation which will enforce method you'll name to throw an exception. In my case I've played with db and jms XA transaction with Atomikos as transaction manager. As for me its good playground - H2 in-memory database and Apache ActiveMQ embedded in-memory broker. Friendly speaking I'm not fan of jms mocks, why do we need them if there is fully functional real JMS broker, just in memory. You even don't need to start and stop it manually. Let's take mockrunner (http://mockrunner.sourceforge.net/examplesjms.html)- &lt;br /&gt;&lt;blockquote&gt;A few notes on the JMS implementation:     The JMS test module is not a full blown message server, but it supports all necessary functionality to test JMS code. The implementation breaks the JMS specification in some cases. Messages are immediately forwarded to a proper receiver, if possible. Otherwise they're stored for later examination. There's no real transaction support, i.e. the framework keeps track if a transaction is committed or rolled back, but does not guarantee transaction atomicity. If you send a message in a transaction, it will be forwarded to the receiver, even if you rollback the transaction.&lt;/blockquote&gt;As you can see some special tricks are required in case of mockrunner, since it haven't atomicity guarantees.  I should say that there are some tricky parts in Bytemann and Spring integration. Both of them are using @RunWith annotation for their internal infrastructure setup. Pity thing is that you can't use multiply @RunWith declarations in jUnit. So, we need to have both - @RunWith(BMUnitRunner.class) and @RunWith(SpringJUnit4ClassRunner.class)... oops. Not all so bad. It's possible to eliminate SpringJUnit4ClassRunner usage. Yep, it's not universal solution for multiply jUnit runners, but it's working in this case. To do the same as Spring class runner you can say this:  &lt;br /&gt;&lt;pre style="background: #ffffff; color: black;"&gt;@Before&lt;br /&gt;    &lt;span style="color: maroon; font-weight: bold;"&gt;public&lt;/span&gt; void setUpContext() &lt;span style="color: maroon; font-weight: bold;"&gt;throws&lt;/span&gt; Exception &lt;span style="color: purple;"&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: maroon; font-weight: bold;"&gt;this&lt;/span&gt;&lt;span style="color: #808030;"&gt;.&lt;/span&gt;testContextManager &lt;span style="color: #808030;"&gt;=&lt;/span&gt; &lt;span style="color: maroon; font-weight: bold;"&gt;new&lt;/span&gt; TestContextManager&lt;span style="color: #808030;"&gt;(&lt;/span&gt;getClass&lt;span style="color: #808030;"&gt;(&lt;/span&gt;&lt;span style="color: #808030;"&gt;)&lt;/span&gt;&lt;span style="color: #808030;"&gt;)&lt;/span&gt;&lt;span style="color: purple;"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: maroon; font-weight: bold;"&gt;this&lt;/span&gt;&lt;span style="color: #808030;"&gt;.&lt;/span&gt;testContextManager&lt;span style="color: #808030;"&gt;.&lt;/span&gt;prepareTestInstance&lt;span style="color: #808030;"&gt;(&lt;/span&gt;&lt;span style="color: maroon; font-weight: bold;"&gt;this&lt;/span&gt;&lt;span style="color: #808030;"&gt;)&lt;/span&gt;&lt;span style="color: purple;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: purple;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;From docs -  &lt;br /&gt;&lt;blockquote&gt;TestContextManager is the main entry point into the Spring TestContext Framework, which provides support for loading and accessing  ApplicationContext application contexts, dependency, injection of test instances, transactional execution of test methods, etc. &lt;/blockquote&gt;So, final test looks like this:  &lt;br /&gt;&lt;pre style="background: #ffffff; color: black;"&gt;@Test(expected = Exception.class)&lt;br /&gt;@Transactional&lt;br /&gt;@BMRule(name="Database goes down",&lt;br /&gt;isInterface = true,&lt;br /&gt;targetClass = "com.blogspot.ostas.lora.database.IUserDao",&lt;br /&gt;targetMethod = "save",&lt;br /&gt;action = "org.apache.log4j.Logger.getLogger(getClass())&lt;br /&gt;.debug(\"DB failure simulation\")&lt;span style="color: #808030;"&gt;;&lt;/span&gt;&lt;br /&gt;throw new java.lang.RuntimeException(\"Simulated Database Failure\")")&lt;br /&gt;&lt;span style="color: maroon; font-weight: bold;"&gt;public&lt;/span&gt; void save()&lt;span style="color: purple;"&gt;{&lt;/span&gt;&lt;br /&gt;   userService&lt;span style="color: #808030;"&gt;.&lt;/span&gt;saveAndNotify&lt;span style="color: #808030;"&gt;(&lt;/span&gt;user&lt;span style="color: #808030;"&gt;)&lt;/span&gt;&lt;span style="color: purple;"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: maroon; font-weight: bold;"&gt;try&lt;/span&gt; &lt;span style="color: purple;"&gt;{&lt;/span&gt;&lt;br /&gt;            LOGGER&lt;span style="color: #808030;"&gt;.&lt;/span&gt;info&lt;span style="color: #808030;"&gt;(&lt;/span&gt;&lt;span style="color: #0000e6;"&gt;"Transaction status : "&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #808030;"&gt;+&lt;/span&gt;jtaTransactionManager&lt;span style="color: #808030;"&gt;.&lt;/span&gt;getTransactionManager&lt;span style="color: #808030;"&gt;(&lt;/span&gt;&lt;span style="color: #808030;"&gt;)&lt;/span&gt;&lt;span style="color: #808030;"&gt;.&lt;/span&gt;getStatus&lt;span style="color: #808030;"&gt;(&lt;/span&gt;&lt;span style="color: #808030;"&gt;)&lt;/span&gt;&lt;span style="color: #808030;"&gt;)&lt;/span&gt;&lt;span style="color: purple;"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: purple;"&gt;}&lt;/span&gt; &lt;span style="color: maroon; font-weight: bold;"&gt;catch&lt;/span&gt; &lt;span style="color: #808030;"&gt;(&lt;/span&gt;SystemException e&lt;span style="color: #808030;"&gt;)&lt;/span&gt; &lt;span style="color: purple;"&gt;{&lt;/span&gt;&lt;br /&gt;            LOGGER&lt;span style="color: #808030;"&gt;.&lt;/span&gt;error&lt;span style="color: #808030;"&gt;(&lt;/span&gt;e&lt;span style="color: #808030;"&gt;)&lt;/span&gt;&lt;span style="color: purple;"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: purple;"&gt;}&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: purple;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Here I'm enforcing DAO component of my service layer to throw runtime exception - it's simulated resource failure. Also, after this I'm checking db state using JDBC to be 100% sure that noting went wrong in case of JMS failure. As you can see, there is no changes in service layer code, no mocks, etc.  Thanks for reading. Complete source code of my pet project you can find here:  &lt;a href="https://github.com/daoway/AtomikosSandbox"&gt;https://github.com/daoway/AtomikosSandbox&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-2904244583576718697?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/2904244583576718697/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=2904244583576718697" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/2904244583576718697" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/2904244583576718697" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/DN1xrtZMT-Y/distributed-transactions-failure.html" title="Distributed Transactions Failure Simulation" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ostas.blogspot.com/2012/04/distributed-transactions-failure.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-8684562160659145715</id><published>2012-02-02T03:23:00.000-08:00</published><updated>2012-02-02T06:05:46.622-08:00</updated><title type="text">Atomikos distributed transactions scalability</title><content type="html">At this moment I'm working on the project where we using distributed transactions. The number of XA Resources in our case is not big at all, but for me is very interesting to know how Atomikos can scale when the number of XA Resources is large. That is why you are reading this blog post.  I've desided to push this pet project on GitHub for you to be able to test/play/join the effort, etc. - &lt;a href="https://github.com/daoway/AtomikosDistributedScalability"&gt;https://github.com/daoway/AtomikosDistributedScalability&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;What do I have... I have Atomikos 3.7.1, Spring 3.1 (if you are still using 3.0 consider migration to 3.1 - it's better) and Hibernate. In this particular case I've decided to use embedded in memory H2 database to eliminate possible network overhead and to simplify setup of underlying farm of XA Resources. It's possible because H2 has XA compatible data source implementation. BTW, it can be used also for unit/integration testing instead of Oracle XA Datasource to test transactional behavior for example.&lt;br /&gt;&lt;br /&gt;So, I'm playing with H2 XA Army. I have a lot of in-memory H2 database instances, one simple domain object and Hibernate. I want to persist this object across all nodes in XA transaction and calculate time for this effort. Then increase the number of XA resources for some Delta and repeat this procedure until I'll get OutOfMemoryException. Just kidding :) All this stuff is in-memory and RAM amount is limited, for sure, the maximum of XA resource I've played with was 2000.&lt;br /&gt;&lt;br /&gt;Here is the result of my experiment (click on link to see Adobe Flex chart with test results) :&lt;br /&gt;&lt;br /&gt;&lt;a href="http://dl.dropbox.com/u/282185/bin-release/XAResourceChart.html"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 170px;" src="http://4.bp.blogspot.com/-gKvz-erKJcc/TyqV3M7bGPI/AAAAAAAAAOg/1Mw_PjJ7i7o/s320/atimikos.png" alt="" id="BLOGGER_PHOTO_ID_5704536653613963506" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;As you can see, replication time grows linear, together with number of XA resources participating in "distributed" transaction. If so, we can conclude that Atomikos has linear scalability.&lt;br /&gt;&lt;br /&gt;Thanks for reading. Any comments/suggestions are welcomed.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-8684562160659145715?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/8684562160659145715/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=8684562160659145715" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/8684562160659145715" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/8684562160659145715" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/7_aeOpDLvPo/atomikos-distributed-transactions.html" title="Atomikos distributed transactions scalability" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-gKvz-erKJcc/TyqV3M7bGPI/AAAAAAAAAOg/1Mw_PjJ7i7o/s72-c/atimikos.png" height="72" width="72" /><thr:total>3</thr:total><feedburner:origLink>http://ostas.blogspot.com/2012/02/atomikos-distributed-transactions.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-5462131979364510228</id><published>2011-08-02T08:34:00.000-07:00</published><updated>2011-08-02T08:43:15.805-07:00</updated><title type="text">Low memory in Cloud Bees</title><content type="html">I've noticed that memory goes low at Cloud Bees RUN@CLOUD service.  As I wrote earlier, about &lt;a href="http://ostas.blogspot.com/2011/07/memory-monitoring-on-cloudbees-runcloud.html"&gt;near-real time physical memory monitoring&lt;/a&gt;, this application works, but sometimes it's just not available. This is the image I've faced 5 min before writing this post :&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-fVrsk601VAs/Tjga2N_eENI/AAAAAAAAANU/Bw9GYPtWS60/s1600/memory.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 194px;" src="http://1.bp.blogspot.com/-fVrsk601VAs/Tjga2N_eENI/AAAAAAAAANU/Bw9GYPtWS60/s320/memory.png" alt="" id="BLOGGER_PHOTO_ID_5636284452425306322" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-5462131979364510228?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/5462131979364510228/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=5462131979364510228" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/5462131979364510228" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/5462131979364510228" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/nY4mXLB80sY/low-memory-in-cloud-bees.html" title="Low memory in Cloud Bees" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-fVrsk601VAs/Tjga2N_eENI/AAAAAAAAANU/Bw9GYPtWS60/s72-c/memory.png" height="72" width="72" /><thr:total>3</thr:total><feedburner:origLink>http://ostas.blogspot.com/2011/08/low-memory-in-cloud-bees.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-7833535850442270460</id><published>2011-07-08T05:37:00.000-07:00</published><updated>2011-07-08T06:07:14.452-07:00</updated><title type="text">Adobe Flex Mobile On Android - first application</title><content type="html">I think that new feature of Adobe Flex 4.5.1 Mobile is really cool stuff !!! I was able to convert existent application from my previous blog post to application for Android platform. Didn't tryed iOS support yet, but for Android platform things looks good.&lt;br /&gt;&lt;br /&gt;So, few words about app. I have free CloudBees run@cloud account. Application from my previous blog post showing &lt;a href="http://ostas.blogspot.com/2011/07/memory-monitoring-on-cloudbees-runcloud.html"&gt;live data feed about physical RAM memory usage on server&lt;/a&gt;, one frame per second. Long AMF pooling used there to fetch fresh data. And Flex charting for visualization.&lt;br /&gt;&lt;br /&gt;I have to admit that in mobile version plain AMF pooling is used, because I had no luck with long AMF pooling.&lt;br /&gt;&lt;br /&gt;You can pick up this application from here -&amp;gt; &lt;a href="http://dl.dropbox.com/u/282185/MonitoringOnAndroid.apk"&gt;Memory monitoring Adobe Flex Mobile App&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Maybe CloudBees will want to have it ? :)&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-7833535850442270460?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/7833535850442270460/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=7833535850442270460" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/7833535850442270460" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/7833535850442270460" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/lSzxNZLEBKI/adobe-flex-mobile-on-android-first.html" title="Adobe Flex Mobile On Android - first application" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://ostas.blogspot.com/2011/07/adobe-flex-mobile-on-android-first.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-3298824666292484762</id><published>2011-07-06T06:23:00.000-07:00</published><updated>2011-07-06T07:25:15.268-07:00</updated><title type="text">Memory monitoring on CloudBees RUN@cloud instance</title><content type="html">I've been playing with RUN@cloud for some time. In fact it's former Stax service provider. Friendly speaking I was disappointed a little because they decided to decrease amount of RAM available for Tomcat from 256 Mb to 128 Mb for free account. It doesn't affected my playground apps there, but the fact... From other point they have something good for &lt;a href="http://cloudbees.com/foss/foss-dev.cb"&gt;Open Source projects&lt;/a&gt;. Maybe I'll try it soon.&lt;br /&gt;&lt;br /&gt;So, regarding this changes, I've desided to write RIA application for live RAM monitoring. I mean not JVM memory, but actual RAM amount. I believe this makes sense, even for all things which are even not Java related. Yep, I know there are a lot of them available for free, some of them are commercial. The key feature of my application here is that we have near real time memory charts - 1 second between measuring times + some network roundtrips time + time for rendering. And all this in fancy Adobe Flex client.&lt;br /&gt;&lt;br /&gt;Next thing I'm going to do is to create the same kind of application, but for Android. It's possible with Adobe Flash builder 4.5.  Among tons of games, organaizers and other stuff this application could be useful for admins, support team, whatever.&lt;br /&gt;&lt;br /&gt;You can take a look at my app here : &lt;a href="http://monitoring.daoway.staxapps.net/"&gt;http://monitoring.daoway.staxapps.net/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Any feedback apprececiated. Thanks.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-3298824666292484762?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/3298824666292484762/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=3298824666292484762" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/3298824666292484762" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/3298824666292484762" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/RdhnGO2zYmA/memory-monitoring-on-cloudbees-runcloud.html" title="Memory monitoring on CloudBees RUN@cloud instance" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ostas.blogspot.com/2011/07/memory-monitoring-on-cloudbees-runcloud.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-6401844066169495397</id><published>2011-05-25T09:16:00.000-07:00</published><updated>2011-05-25T10:00:13.101-07:00</updated><title type="text">Loading Spring Beans based on environment</title><content type="html">In complex deployment environments it makes sense to keep web application monolith war file and provide appropriate instructions for deployment team. It's possible only if your application have flexible configurability strategy, so that at least you can switch from DEV to UAT, from UAT to PROD environments and be sure that only thing has been changed is environment specific stuff. Forget about unpacking and patching war-file, it could be prohibited at all because of non-trivial distribution mechanism.&lt;br /&gt;&lt;br /&gt;For Spring-based applications all this could look a little bit scary for a first look, you have your applicationContext.xml with placeholders, which is ok, or JNDI for enviromnent-specific resource lookup. Great, but what you are going to do if some of the parts of resources are present in one env. and absent in another ? For example +1 in dev, -1 in uat and +1 in prod ? Maybe there is not only one way to do it, but I came across the following solution for this.&lt;br /&gt;&lt;br /&gt;It's based on combination of servlet context init params and Spring bean re-definition at runtume. Thanks to Spring it's possible. In terms of configurability servlet init params is very flexible thing. You can define one in web.xml, and then redefine it in context setup. I mean externally, so, your war file is still don't need to be patched. Other stuff is technical details for this - key point to implement this is Spring bean which implements both ServletContextAware and ApplicationContextAware interfaces. First makes possible to access Servlet context, second - Spring application context. Runtime re-defintion is not so hard - take a look &lt;a href="http://code.google.com/p/ostas-blog-src/source/browse/trunk/SpringBeanRuntime/src/main/java/com/blogspot/ostas/spring/MyApplicationConfiguratorBean.java"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Complete source code you can find &lt;a href="http://code.google.com/p/ostas-blog-src/source/browse/#svn%2Ftrunk%2FSpringBeanRuntime"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-6401844066169495397?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/6401844066169495397/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=6401844066169495397" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/6401844066169495397" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/6401844066169495397" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/UzLtiSP2SCU/loading-spring-beans-based-on.html" title="Loading Spring Beans based on environment" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ostas.blogspot.com/2011/05/loading-spring-beans-based-on.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-3232704609697929364</id><published>2011-04-28T02:26:00.000-07:00</published><updated>2011-04-28T02:48:50.427-07:00</updated><title type="text">How to turn off popup page preview in Google search results</title><content type="html">Did you enjoyed this feature ? This fancy useless annoing popup page preview images ? Ohh yeess... There is no way to turn it of using some kind of chekbox, so here is the solution for this.&lt;br /&gt;&lt;br /&gt;1) Install Firefox extenstion called Grasemonkey - &lt;a href="http://userscripts.org/scripts/show/90222"&gt;https://addons.mozilla.org/ru/firefox/addon/greasemonkey/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2) Install script for Grasemonkey that will disable this shit - &lt;a href="http://userscripts.org/scripts/show/90222"&gt;http://userscripts.org/scripts/show/90222&lt;/a&gt; just click on install button at this page.&lt;br /&gt;&lt;br /&gt;3) Say goodbye to page preview popups. Enjoy.&lt;br /&gt;&lt;br /&gt;I believe it's hard to implement this kind of feature from technical perspective. I mean preview of web page. You have to deal with rendering HTML, CSS, JavaScript... a lot of work, but...&lt;br /&gt;&lt;br /&gt;From user's perspective it's useless bullshit !&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-3232704609697929364?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/3232704609697929364/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=3232704609697929364" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/3232704609697929364" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/3232704609697929364" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/q00bHbaOvJU/how-to-turn-off-popup-page-preview-in.html" title="How to turn off popup page preview in Google search results" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://ostas.blogspot.com/2011/04/how-to-turn-off-popup-page-preview-in.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-2420552747219420604</id><published>2011-04-15T01:39:00.000-07:00</published><updated>2011-04-15T01:54:54.465-07:00</updated><title type="text">Java code block in JIRA</title><content type="html">This is just small hint on JIRA usage.&lt;br /&gt;&lt;br /&gt;If you want to post some source code example in JIRA issue, please use code blocks ! Other vice you'll have a chance to see fancy smiles instead of certain pieces of code. I saw it few times, very annoying...&lt;br /&gt;&lt;br /&gt;It's not hard at all:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;{code} public static void main(String[] args)  {code}&lt;br /&gt;&lt;br /&gt;&lt;a href="http://confluence.atlassian.com/display/DOC/Code+Block+Macro"&gt;Other languages are also supported.&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-2420552747219420604?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/2420552747219420604/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=2420552747219420604" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/2420552747219420604" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/2420552747219420604" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/MSDNBN571E0/java-code-block-in-jira.html" title="Java code block in JIRA" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://ostas.blogspot.com/2011/04/java-code-block-in-jira.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-3712843152440754029</id><published>2011-02-25T03:21:00.000-08:00</published><updated>2011-02-25T03:34:24.496-08:00</updated><title type="text">Precompile JSP with Maven 2</title><content type="html">There are situations where JDK is banned in production and only JRE allowed for use. In this case if you are using JSP there is only one option to use - precompile JSP. Here is example how to achieve that. Nothing very special, but I guess this can save some time and effort for somebody )&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: rgb(0, 0, 0); background: none repeat scroll 0% 0% rgb(255, 255, 255);"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;plugin&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.codehaus.mojo&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jspc-maven-plugin&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;executions&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;             &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;execution&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;                 &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jspc&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;                 &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goals&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;                     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goal&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;compile&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goal&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;                 &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goals&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;             &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;execution&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;executions&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;plugin&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;plugin&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.apache.maven.plugins&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;maven-war-plugin&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;             &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;webXml&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;${basedir}/target/jspweb.xml&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;webXml&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;warSourceExcludes&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;**/*.jsp&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;warSourceExcludes&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;plugin&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;WarSourceExcludes will not package original JSPs - really makes no sence since they are just classes and appropriate servlet mappins in web.xml now.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-3712843152440754029?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/3712843152440754029/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=3712843152440754029" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/3712843152440754029" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/3712843152440754029" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/DH99rAmS1Dc/precompile-jsp-with-maven-2.html" title="Precompile JSP with Maven 2" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ostas.blogspot.com/2011/02/precompile-jsp-with-maven-2.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-7639157585613645590</id><published>2011-02-19T07:17:00.000-08:00</published><updated>2011-02-19T08:09:06.204-08:00</updated><title type="text">Mock JNDI in jUnit</title><content type="html">JNDI is very useful technology. But... not everywhere. If there is the need to deploy your application on variety of different environments, for example databases with sensitive data and you are not a person who is suitable to deploy application for a bunch of reasons - segregation of concepts, separate production team, etc - JNDI is what you need. If you are with JNDI, only thing you have to provide is JNDI names with example config, so that person responsible for deployment could figure out how to deal with it. Just imagine the mess when you need to deploy war file for ~10 different Oracle databases and the same number of WebSphere MQ queues without JNDI. Think for 1 min :)&lt;br /&gt;&lt;br /&gt;But, in development is not so pleasant to have a deal with JNDI, since container required in this case to perform actual lookup of resources. From the other point of view not all so bad, since there is a way in 10 lines of code to mock required JNDI datasource. In fact it could be any other resource, but data source seems to be the most popular.&lt;br /&gt;&lt;br /&gt;Key point here is the use of the calss from SpringSource -&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;org.springframework.mock.jndi.SimpleNamingContextBuilder&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here is the complete example how to use it -&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: rgb(0, 0, 0); background: none repeat scroll 0% 0% rgb(255, 255, 255);"&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; com&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;blogspot&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;ostas&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;cxf&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;SimpleDao&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; oracle&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;jdbc&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;pool&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;OracleDataSource&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;apache&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;log4j&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;Logger&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;junit&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;BeforeClass&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;junit&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;Test&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;junit&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;runner&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;RunWith&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;springframework&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;beans&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;factory&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;annotation&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;Autowired&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;springframework&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;mock&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;jndi&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;SimpleNamingContextBuilder&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;springframework&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;test&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;context&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;ContextConfiguration&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;springframework&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;test&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;context&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;junit4&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;SpringJUnit4ClassRunner&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; javax&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;naming&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;NamingException&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; java&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;sql&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;SQLException&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; static org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;junit&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;Assert&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;assertEquals&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; static org&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;junit&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;Assert&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;assertNotNull&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;@RunWith(SpringJUnit4ClassRunner.class)&lt;br /&gt;@ContextConfiguration(locations=&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"classpath:/WEB-INF/dataAccess-applicationContext.xml"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;)&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;class&lt;/span&gt; DaoTestCase&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; Logger logger &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; Logger&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getLogger&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;DaoTestCase&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;class&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getName&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;@&lt;/span&gt;BeforeClass&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;void&lt;/span&gt; setUp&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;    OracleDataSource ods &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;null&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;try&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;        ods &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;new&lt;/span&gt; OracleDataSource&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;catch&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;SQLException&lt;/span&gt; e&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;        logger&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;error&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;e&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;    ods&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;setURL&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"jdbc:oracle:thin:@127.0.0.1:1521/orcldb"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    ods&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;setUser&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"*"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    ods&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;setPassword&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"*"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    SimpleNamingContextBuilder builder &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;null&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;try&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;        builder &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; SimpleNamingContextBuilder&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;emptyActivatedContextBuilder&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;        builder&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;bind&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"java:comp/env/jdbc/db"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;ods&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;catch&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;NamingException e&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;        logger&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;error&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;e&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;@&lt;/span&gt;Autowired&lt;br /&gt;SimpleDao simpleDao&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;@&lt;/span&gt;Test&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;void&lt;/span&gt; testInjectBean&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;throws&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Exception&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;    logger&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;debug&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"Bean : &gt;&gt;&gt; "&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;+&lt;/span&gt; simpleDao&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;    assertNotNull&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;simpleDao&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;@&lt;/span&gt;Test&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;void&lt;/span&gt; testDBconnection&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;throws&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Exception&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;    assertEquals&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;simpleDao&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getNumber&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;As you can see from this code, actual mock is just&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: rgb(0, 0, 0); background: none repeat scroll 0% 0% rgb(255, 255, 255);"&gt;SimpleNamingContextBuilder builder = null&lt;span style="color: rgb(128, 128, 48);"&gt;;&lt;/span&gt;&lt;br /&gt;try &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;  builder &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; SimpleNamingContextBuilder&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;emptyActivatedContextBuilder&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  builder&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;bind&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"java:comp/env/jdbc/db"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;ods&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt; catch (NamingException e) &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;    logger&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;error&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;e&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;ods - just plain DataSource. From Spring point jdbc/db looks llike this -&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: rgb(0, 0, 0); background: none repeat scroll 0% 0% rgb(255, 255, 255);"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;dataSource&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(39, 71, 150);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;org.springframework.jndi.JndiObjectFactoryBean&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;jndiName&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;java:comp/env/jdbc/db&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;property&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;bean&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The last thing I have to mention here is Maven2 dependency for use SimpleNamingContextBuilder class -&lt;br /&gt;&lt;br /&gt;&lt;pre style='color:#000000;background:#ffffff;'&gt;&lt;span style='color:#a65700; '&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;dependency&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style='color:#a65700; '&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;groupId&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;org.springframework&lt;span style='color:#a65700; '&gt;&amp;lt;/&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;groupId&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style='color:#a65700; '&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;artifactId&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;spring-test&lt;span style='color:#a65700; '&gt;&amp;lt;/&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;artifactId&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style='color:#a65700; '&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;version&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;3.0.3.RELEASE&lt;span style='color:#a65700; '&gt;&amp;lt;/&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;version&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style='color:#a65700; '&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;scope&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;test&lt;span style='color:#a65700; '&gt;&amp;lt;/&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;scope&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#a65700; '&gt;&amp;lt;/&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;dependency&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-7639157585613645590?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/7639157585613645590/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=7639157585613645590" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/7639157585613645590" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/7639157585613645590" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/QJQ76NB4SpI/mock-jndi-resources-in-unit-tests.html" title="Mock JNDI in jUnit" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ostas.blogspot.com/2011/02/mock-jndi-resources-in-unit-tests.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-7388568895791319299</id><published>2010-02-22T13:26:00.000-08:00</published><updated>2010-02-22T14:08:09.322-08:00</updated><title type="text">Generate Maven2 Archetype from existing project</title><content type="html">It's not hard to create custom archetype in Maven 2.2 from existing project. I had multi-module  .ear Maven project which I want to reuse. So, I decided to play a little with custom archetypes to create my own and don't repeat myself again and again. Fixing dependencies manually - is not the best way to spend lifetime :)&lt;br /&gt;&lt;br /&gt;To jumpstart archetype creaton there is a special maven goal of archetype plugin archetype:&lt;span style="font-weight: bold;"&gt;create-from-project&lt;/span&gt;. So,&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;mvn clean archetype:create-from-project&lt;/blockquote&gt;Now we have prototype of our archetype in target\generated-sources\archetype\ directory.&lt;br /&gt;Then...&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;cd target\generated-sources\archetype\&lt;br /&gt;mvn install&lt;br /&gt;&lt;/blockquote&gt;Friendly speaking, I had to do some tweaking to successfully generate normal .ear Maven 2 project which can be compiled and run without problems. It was fixing some of dependencies at Logic and EAR modules, bit it was not hard - just specifying ${groupId} where necessary.  To use this archetype after "mvn install" just type&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;mvn archetype:generate&lt;br /&gt;&lt;/blockquote&gt;and choose EnterpriseApp-archetype from the list. It will looks like....&lt;br /&gt;&lt;blockquote&gt;2: local -&gt; EnterpriseApp-archetype (EnterpriseApp-archetype)&lt;br /&gt;....&lt;br /&gt;&lt;/blockquote&gt;in the list.&lt;br /&gt;&lt;br /&gt;Source code is here : http://ostas-blog-src.googlecode.com/svn/trunk/JbossCargoJpaEjbWebEarArchetype/.&lt;br /&gt;&lt;br /&gt;To build it use&lt;br /&gt;&lt;blockquote&gt;svn co http://ostas-blog-src.googlecode.com/svn/trunk/JbossCargoJpaEjbWebEarArchetype/&lt;br /&gt;&lt;br /&gt;mvn install&lt;/blockquote&gt;You'll need to specify your jboss home location at parent pom.xml file to use cargo-jboss deployment. In my case it is&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;pre style='color:#000000;background:#ffffff;'&gt;&lt;span style='color:#a65700; '&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;jboss.home&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;C:/server/Java/jboss-4.2.2.GA/&lt;span style='color:#a65700; '&gt;&amp;lt;/&lt;/span&gt;&lt;span style='color:#5f5035; '&gt;jboss.home&lt;/span&gt;&lt;span style='color:#a65700; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;If you have any comments/issues/suggestions give me to know.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-7388568895791319299?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/7388568895791319299/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=7388568895791319299" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/7388568895791319299" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/7388568895791319299" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/rn9QIB9mh9E/generate-maven2-archetype-from-existing.html" title="Generate Maven2 Archetype from existing project" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ostas.blogspot.com/2010/02/generate-maven2-archetype-from-existing.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-4434267054566093980</id><published>2010-01-19T01:10:00.000-08:00</published><updated>2010-01-19T01:44:29.643-08:00</updated><title type="text">Quartz Scheduler uptime</title><content type="html">My RIA application I've mentioned &lt;a href="http://ostas.blogspot.com/2010/01/adobe-flex-and-java-with-data-push-live.html"&gt;before&lt;/a&gt; seems to be working. One week (7 days) without any failure or restart. The interesting part is the number of jobs executed by scheduler. At the moment of writing it's 584,038. It's because job being executed every second. Take a look here:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_CcxKUpSUr-k/S1V7wxvyaqI/AAAAAAAAADs/beqsyaW3LuE/s1600-h/scheduler-details.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 250px;" src="http://1.bp.blogspot.com/_CcxKUpSUr-k/S1V7wxvyaqI/AAAAAAAAADs/beqsyaW3LuE/s320/scheduler-details.png" alt="" id="BLOGGER_PHOTO_ID_5428381003782711970" border="0" /&gt;&lt;/a&gt;Actually, it's output of org.quartz.Scheduler.getMetaData().getSummary();&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-4434267054566093980?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/4434267054566093980/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=4434267054566093980" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/4434267054566093980" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/4434267054566093980" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/v9k2wb_XPlU/quartz-scheduler-uptime.html" title="Quartz Scheduler uptime" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_CcxKUpSUr-k/S1V7wxvyaqI/AAAAAAAAADs/beqsyaW3LuE/s72-c/scheduler-details.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://ostas.blogspot.com/2010/01/quartz-scheduler-uptime.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-7323420122831922770</id><published>2010-01-12T14:51:00.000-08:00</published><updated>2010-01-12T17:12:35.676-08:00</updated><title type="text">Adobe Flex and Java with data push live example</title><content type="html">&lt;blockquote&gt;&lt;/blockquote&gt;Today I want to present to your attention my Adobe Flex 3 + Java rich internet application.&lt;br /&gt;&lt;a href="http://myflexapp.daoway.staxapps.net/"&gt;http://myflexapp.daoway.staxapps.net&lt;/a&gt; auth: user/user. Under "user" account you'll not able to control scheduler behavior - start and stop. Declarative, role-based method-level security using Spring Security rocks ! :)&lt;br /&gt;&lt;br /&gt;I have to say few words about what my RIA actually can do. It could be useful for live JVM memory monitoring and visualization. Or maybe not... Anyway, this is my playground. In the future, source of data for visualization could be anything else. I suppose that approach will remain the same.&lt;br /&gt;&lt;br /&gt;I have a Quartz scheduler which is asking for a memory state every 1 sec. Then this data goes to Flex using data push. To view live chart click on menu Live data&gt; Subscribe. BlazeDS is responsible for Flex-Java interaction. I have to admit that it's pleasant to work with Spring-Flex integration. So, if you using Flex and and Spring together - try &lt;a href="http://www.springsource.org/spring-flex"&gt;Spring BlazeDS integration&lt;/a&gt; !&lt;br /&gt;&lt;br /&gt;You can make a screen shot of current state of free memory chart or go full screen. You can change a number of frames to show on live chart. It was not very hard to implement. I've spent much more time to implement "make snapshot" functionality. The idea is to record memory state every 5 seconds for later analysis. Well, I can add cron job to Quartz scheduler dynamically, but there is no notification functionality for managing "ready state" or "still in progress". I'll implement it later... I have some ideas. So, adding a job to scheduler works and this job can successfully write data to database for later reuse or export. Hibernate is used here. Maybe to heavyweight, but nobody stops me to implement new service implementation using JDBC. Spring and DI should work here. Work on ability to store different snapshots in right way is still in progress. At this moment every data from any request for snapshot goes into the same database table. It's alpha... User registration is also under development. Don't try to register yet, just use credentials I've mentioned before - user/user.&lt;br /&gt;&lt;br /&gt;If you have any issues with this application give me a sign, please. Any comments or emails with suggestions or improvements are welcome ! It's early alpha and there is a lot of work to be done to make it looking nice and shiny. So, I hope for your feedback. Maybe I'll share the sources. Thanks !&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-7323420122831922770?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/7323420122831922770/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=7323420122831922770" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/7323420122831922770" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/7323420122831922770" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/n1OB-lnyYAc/adobe-flex-and-java-with-data-push-live.html" title="Adobe Flex and Java with data push live example" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><thr:total>5</thr:total><feedburner:origLink>http://ostas.blogspot.com/2010/01/adobe-flex-and-java-with-data-push-live.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-7242902980751329927</id><published>2010-01-07T14:49:00.000-08:00</published><updated>2010-01-07T15:00:21.576-08:00</updated><title type="text">My Twitter</title><content type="html">Yep, I'm started. Here it is - &lt;a href="http://twitter.com/stanislavos"&gt;http://twitter.com/stanislavos&lt;/a&gt;. Lets see WTF it is... if so many people using it, there is should be something I've missed before.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-7242902980751329927?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/7242902980751329927/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=7242902980751329927" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/7242902980751329927" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/7242902980751329927" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/IrxEyDzhzhs/my-twitter.html" title="My Twitter" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ostas.blogspot.com/2010/01/my-twitter.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-8683205542787411433</id><published>2009-10-16T00:19:00.000-07:00</published><updated>2009-10-16T00:21:49.665-07:00</updated><title type="text">[Friday] You just divided by zero, didn't you?</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_CcxKUpSUr-k/StgewRCpDYI/AAAAAAAAAC0/oZc238Wx3Rw/s1600-h/633495993495399838-you-son-of-a-bitch.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://1.bp.blogspot.com/_CcxKUpSUr-k/StgewRCpDYI/AAAAAAAAAC0/oZc238Wx3Rw/s320/633495993495399838-you-son-of-a-bitch.jpg" alt="" id="BLOGGER_PHOTO_ID_5393094368333204866" border="0" /&gt;&lt;/a&gt;&lt;a href="http://www.motivatedphotos.com/?id=572"&gt;source&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-8683205542787411433?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/8683205542787411433/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=8683205542787411433" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/8683205542787411433" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/8683205542787411433" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/xOaX7-9iHZQ/friday-you-just-divided-by-zero-didnt.html" title="[Friday] You just divided by zero, didn't you?" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_CcxKUpSUr-k/StgewRCpDYI/AAAAAAAAAC0/oZc238Wx3Rw/s72-c/633495993495399838-you-son-of-a-bitch.jpg" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://ostas.blogspot.com/2009/10/friday-you-just-divided-by-zero-didnt.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-4518727968551638144</id><published>2009-09-22T04:34:00.000-07:00</published><updated>2009-09-22T05:18:55.830-07:00</updated><title type="text">Screenshot of Web Page in Python - 15 lines of code</title><content type="html">I cant say that this solution is pretty elegant, but it's short and working. But... platform dependent, because of IE. Anyway here it is :&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;"&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;from&lt;/span&gt; win32com&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;client &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt; Dispatch&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;from&lt;/span&gt; time &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt; sleep&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;from&lt;/span&gt; sys &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt; &lt;span style="color: rgb(227, 74, 220);"&gt;exit&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt; ImageGrab&lt;br /&gt;&lt;br /&gt;IE&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;Dispatch&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"InternetExplorer.Application"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;IE&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;Visible&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;1&lt;/span&gt;&lt;br /&gt;IE&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;fullScreen &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;1&lt;/span&gt;&lt;br /&gt;IE&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;Navigate&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"http://ostas.blogspot.com"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;while&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;IE&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;ReadyState &lt;span style="color: rgb(128, 128, 48);"&gt;!&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;:&lt;/span&gt;&lt;br /&gt; sleep&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;img &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; ImageGrab&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;grab&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;1440&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;900&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;img&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;save&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'screenshot.jpg'&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'JPEG'&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;IE&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;Quit&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;exit&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Code is pretty simple- it launches IE in full screen mode, waiting while page being loaded, makes screenshot of whole screen resolution - 1440 x 900 in my case, and happily exits.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-4518727968551638144?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/4518727968551638144/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=4518727968551638144" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/4518727968551638144" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/4518727968551638144" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/VyHNIRTyviY/screenshot-of-web-page-in-python-15.html" title="Screenshot of Web Page in Python - 15 lines of code" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ostas.blogspot.com/2009/09/screenshot-of-web-page-in-python-15.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-7547956348388862471</id><published>2009-08-25T00:27:00.000-07:00</published><updated>2009-08-25T05:50:04.205-07:00</updated><title type="text">Spring BlazeDS integration - playing with testdrive</title><content type="html">svn checkout https://src.springframework.org/svn/spring-flex/trunk/spring-flex-samples/&lt;br /&gt;&lt;br /&gt;cd spring-flex-samples\spring-flex-testdrive,&lt;br /&gt;&lt;br /&gt;mvn install&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;[ERROR] FATAL ERROR&lt;br /&gt;[INFO] -------------------------------------&lt;br /&gt;[INFO] Java heap space&lt;br /&gt;[INFO] -------------------------------------&lt;br /&gt;[INFO] Trace&lt;br /&gt;java.lang.OutOfMemoryError: Java heap space&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Oops... Okay... lets say "&lt;span style="font-weight: bold;"&gt;set MAVEN_OPTS=-Xmx1024m&lt;/span&gt;" - should be enough.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;mvn clean install&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Not all is clear here, still :&lt;br /&gt;&lt;blockquote&gt;Missing:&lt;br /&gt;----------&lt;br /&gt;1) org.springframework.flex:spring-flex:jar:1.0.1.BUILD-SNAPSHOT&lt;br /&gt;&lt;br /&gt;Try downloading the file manually from the project website.&lt;br /&gt;&lt;br /&gt;Then, install it using the command:&lt;br /&gt;    mvn install:install-file -DgroupId=org.springframework.flex -DartifactId=spring-flex -Dversion=1.0.1.BUILD-SNAPSHOT -Dpack&lt;br /&gt;aging=jar -Dfile=/path/to/file&lt;br /&gt;&lt;br /&gt;Alternatively, if you host your own repository you can deploy the file there:&lt;br /&gt;    mvn deploy:deploy-file -DgroupId=org.springframework.flex -DartifactId=spring-flex -Dversion=1.0.1.BUILD-SNAPSHOT -Dpackag&lt;br /&gt;ing=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]&lt;br /&gt;&lt;br /&gt;Path to dependency:&lt;br /&gt;      1) org.springframework.flex.samples:testdrive:war:1.0.1.BUILD-SNAPSHOT&lt;br /&gt;      2) &lt;span style="font-weight: bold;"&gt;org.springframework.flex:spring-flex:jar:1.0.1.BUILD-SNAPSHOT&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;cd testdrive, edit pom.xml, change version of spring-flex jar:&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;  &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupid&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.springframework.flex&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupid&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactid&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.springframework.flex&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactid&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;  &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;1.0.0.RELEASE&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;dependency&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;blockquote&gt;mvn install&lt;br /&gt;....&lt;br /&gt;[INFO] BUILD SUCCESSFUL&lt;br /&gt;[INFO] --------------------------------&lt;br /&gt;[INFO] Total time: 4 minutes 50 seconds&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Cool, but not yet...&lt;br /&gt;Deploying...&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_messageBrokerDefaultHandlerMapping': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_messageBroker': Invocation of init method failed; &lt;span style="font-weight: bold;"&gt;nest ed exception is java.lang.NoClassDefFoundError: org/apache/xpath/CachedXPathAPI&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Well, ok, org.apache.xpath.CachedXPathAPI - it's xalan&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;"&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;dependency&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;                       &lt;br /&gt;  &lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;groupid&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;xalan&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;/&lt;/span&gt;groupid&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;   &lt;br /&gt;  &lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;artifactid&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;xalan&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;/&lt;/span&gt;artifactid&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;version&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;2.7&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;/&lt;/span&gt;version&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;   &lt;br /&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;/&lt;/span&gt;dependency&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then ... mvn install&lt;br /&gt;&lt;br /&gt;Yahoooo !&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;[INFO] BUILD SUCCESSFUL&lt;br /&gt;[INFO] ------------------------------------------&lt;br /&gt;[INFO] Total time: 7 minutes 30 seconds&lt;br /&gt;[INFO] Finished at: Tue Aug 25 11:10:46 EEST 2009&lt;br /&gt;[INFO] Final Memory: 32M/106M&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;Deploying.. looks nice...&lt;br /&gt;FF -&gt; http://localhost:8080/testdrive/insync01/insync01.html&lt;br /&gt;&lt;br /&gt;Ooops... Flash-plugin stacktrace :&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error &lt;span style="font-weight: bold;"&gt;NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:8080/messagebroker/amf'&lt;/span&gt;"]&lt;br /&gt;  at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()&lt;br /&gt;  at mx.rpc::Responder/fault()&lt;br /&gt;  at mx.rpc::AsyncRequest/fault()&lt;br /&gt;  at mx.messaging::ChannelSet/faultPendingSends()&lt;br /&gt;  at mx.messaging::ChannelSet/channelFaultHandler()&lt;br /&gt;  at flash.events::EventDispatcher/dispatchEventFunction()&lt;br /&gt;  at flash.events::EventDispatcher/dispatchEvent()&lt;br /&gt;  at mx.messaging::Channel/connectFailed()&lt;br /&gt;  at mx.messaging.channels::PollingChannel/connectFailed()&lt;br /&gt;  at mx.messaging.channels::AMFChannel/statusHandler()&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Maybe wrong context root ? Where ? To keep things as simple as possible I'm renaming testdrive.war to ROOT.war. And yes ! It works. I've added maven jetty plugin to be able to run web application directly from command line, I just love it. BTW, &lt;a href="http://stas.ostapenko.googlepages.com/spring-flex-testdrive.fix.diff"&gt;here&lt;/a&gt; is the svn diff file (patch) which you can apply as described &lt;a href="http://wiki.habariproject.org/en/Subversion_and_applying_patchs"&gt;here&lt;/a&gt; and don't do manual editing. It's simple, but maybe could be useful for someone.&lt;br /&gt;&lt;br /&gt;Now I'm going to test all this stuff to see how can I benefit from using integration.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-7547956348388862471?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/7547956348388862471/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=7547956348388862471" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/7547956348388862471" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/7547956348388862471" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/-AoCP3xGf8o/spring-blazeds-integration-playing-with.html" title="Spring BlazeDS integration - playing with testdrive" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://ostas.blogspot.com/2009/08/spring-blazeds-integration-playing-with.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-5881280060151295960</id><published>2009-08-21T02:53:00.000-07:00</published><updated>2009-08-21T03:57:52.562-07:00</updated><title type="text">Java Champion Yakov Fain started podcast</title><content type="html">Here is a few words about Yakov (from book &lt;a href="http://www.amazon.com/Internet-Applications-Adobe-Secrets-Masters/dp/097776222X"&gt;"Rich Internet Applications with Adobe Flex &amp;amp; Java"&lt;/a&gt;)&lt;br /&gt;&lt;blockquote&gt;Yakov Fain is a Managing Principal of Farata Systems. He’s responsible for the enterprise architecture and emerging technologies. Yakov has authored several Java books, dozens of technical articles, and his blog is hugely popular. Sun Microsystems has awarded Yakov with the title Java Champion. He leads the Princeton Java Users Group. Yakov holds a BS and an MS in Applied Math and is an Adobe Certified Flex Instructor.&lt;/blockquote&gt;Link : &lt;a href="http://nobsit.podbean.com/"&gt;http://nobsit.podbean.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-5881280060151295960?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/5881280060151295960/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=5881280060151295960" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/5881280060151295960" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/5881280060151295960" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/P6-t1msKx80/java-champion-yakov-fain-started.html" title="Java Champion Yakov Fain started podcast" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ostas.blogspot.com/2009/08/java-champion-yakov-fain-started.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-4263020689714277939</id><published>2009-08-19T05:55:00.000-07:00</published><updated>2010-01-13T06:22:29.621-08:00</updated><title type="text">Adobe Flex , BlazeDS and Spring data push RIA app</title><content type="html">I'm playing with Adobe Flex 3 and BlazeDS last time. It's pretty fun! Imagine some kind of application where we need to process and visualize data which we fetching from some service at regular basis, for example every second. Maybe not so regular, maybe 10 seconds or something else. So, it's better to notify client that we have a new data and send it to client for processing. Data push - is when server pushing data to client, every time new data become available.&lt;br /&gt;&lt;br /&gt;My example of such kind of application is RIA app for JVM free memory monitoring. It's probably useless, but approach is right, I suppose :) I have Adobe Flex 3 on client and Spring 2 + BlazeDS+Quartz on backend. I don't want to dive into technical details here(not now, sorry, maybe latter), just code and video of working application. Source is &lt;a href="http://code.google.com/p/ostas-blog-src/source/checkout"&gt;here&lt;/a&gt; (FlexMemoryMonitoring) and here is the video :&lt;br /&gt;&lt;br /&gt;&lt;object height="344" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/uRDAHjuX5Zk&amp;amp;hl=en&amp;amp;fs=1&amp;amp;rel=0"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/uRDAHjuX5Zk&amp;amp;hl=en&amp;amp;fs=1&amp;amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="344" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Update&lt;/span&gt;.&lt;br /&gt;You can see fresh version of this application &lt;a style="font-weight: bold;" href="http://ostas.blogspot.com/2010/01/adobe-flex-and-java-with-data-push-live.html"&gt;online&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-4263020689714277939?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/4263020689714277939/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=4263020689714277939" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/4263020689714277939" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/4263020689714277939" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/KzrHAT5CoKw/adobe-flex-blazeds-and-spring-data-push.html" title="Adobe Flex , BlazeDS and Spring data push RIA app" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ostas.blogspot.com/2009/08/adobe-flex-blazeds-and-spring-data-push.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-8051707002728553521</id><published>2009-05-22T01:25:00.000-07:00</published><updated>2009-05-22T13:54:17.046-07:00</updated><title type="text">My first Adobe Flex app - DZone RSS reader widget</title><content type="html">I'm playing with Adobe Flex at this moment and want to share some impressions about Flex. To be short... Flex is definitively great ! I'm really hate Flash banners (Ablock Plus rock solid, besides) but Flex is pleasant instrument. Without any previous Flash experience I was able to create simple, but I hope interesting application - DZone RSS reader widget. It fetches RSS feed from dzone, and show items. Items are clickable, a little bit more detailed description is showed in pretty tooltip. You can list rss items, 10 per "page". There are 25 items at dzone rss, so pagination is needed. You can see it in action &lt;a href="http://stas.ostapenko.googlepages.com/flexrss"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The sad part of story is that my app doesnt works in IE 6 (or IE 7 too ?) but in FF3 all is OK. As for me it's strange... the same app, but behaviour is different. I'm getting this error message:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;[RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]. URL: http://feeds.dzone.com/dzone/frontpage"]&lt;br /&gt;&lt;/blockquote&gt;I have no idea why. Maybe some IE specific security manager, or something like that ? In FF3 all is OK... So, if you have some idea about resolving this issue, give me a sign, please. I hope it's something minor... If somebody become interested in this, I will share the source, it's something about 300 loc.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Source code is &lt;a href="http://stas.ostapenko.googlepages.com/RSSReader.zip"&gt;here&lt;/a&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-8051707002728553521?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/8051707002728553521/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=8051707002728553521" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/8051707002728553521" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/8051707002728553521" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/3jZSlzr6pfk/my-first-adobe-flex-app-dzone-rss.html" title="My first Adobe Flex app - DZone RSS reader widget" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://ostas.blogspot.com/2009/05/my-first-adobe-flex-app-dzone-rss.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-565887218825559442</id><published>2009-04-16T04:32:00.000-07:00</published><updated>2009-04-16T05:40:57.057-07:00</updated><title type="text">Google XML Pages - HelloWorld app with source code</title><content type="html">Last time I blogged was October 20, 2008... Wow ! Time is going so fast ! I'm really appreciate my readers who stayed with me and keep signing up using feedburner. You rock ! :)&lt;br /&gt;&lt;br /&gt;So, to be closer to topic... &lt;a href="http://google-opensource.blogspot.com/2008/07/google-xml-pages-functional-markup.html"&gt;Google XML Pages&lt;/a&gt; or GXP - seems to be interesting since it has been used in an army Google products -  &lt;a href="http://www.google.com/adsense/"&gt;AdSense&lt;/a&gt;, &lt;a href="http://www.blogger.com/"&gt;Blogger&lt;/a&gt;, and &lt;a href="http://reader.google.com/"&gt;Google Reader&lt;/a&gt;. I have some previous Apache Velocity experience, so the questions are what GXP is, what the differences between the two if any, performance ? I'll try to highlight some of this points in my next post, but for now - just hello world app.&lt;br /&gt;&lt;br /&gt;There is a lot of information about GXP, almost all of this info - just annonce. No code, no example...&lt;br /&gt;Our GXP template loooks like this :&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;template&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;com.google.code.projects.BlogSrc.GxpApp.HelloGxp&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(102, 102, 22);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;www.w3.org&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/1999/xhtml&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(102, 102, 22);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;google.com&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/2001/gxp&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(102, 102, 22);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;java&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;google.com&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/2001/gxp/code/java&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(102, 102, 22);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(7, 71, 38);"&gt;call&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;http&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;//&lt;/span&gt;&lt;span style="color: rgb(85, 85, 221);"&gt;google.com&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/2001/gxp/call&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(39, 71, 150);"&gt;gxp:ispace&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;preserve&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;gxp:espace&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;collapse&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(39, 71, 150);"&gt;content-type&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;text/plain&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;import&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;java.util.List&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;param&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;list&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;java:type&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;List{Integer}&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;loop&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;Integer&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;var&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;listItem&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;iterable&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;list&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;Value : &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;eval&lt;/span&gt; &lt;span style="color: rgb(39, 71, 150);"&gt;expr&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;listItem&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;loop&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(102, 102, 22);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;template&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;What do we have here ? Template which takes as param List&lt;integer&gt; with name "list", iterates &lt;span class="ref_result"&gt;through&lt;/span&gt; list and print values stored in it. As you can see, template code is XML, actually. But ! After compiling this XML using GXP compiler we'll get Java source file with appropriate API for calling our template. Java method for calling template looks like this:&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt;&lt;br /&gt;void write(&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; java.lang.Appendable gxp$out,&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; com.google.gxp.base.GxpContext gxp_context,&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; List&amp;lt;Integer&gt; list)&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;throws&lt;/span&gt; java.io.IOException&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; java&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;util&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Locale&lt;/span&gt; gxp_locale &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; gxp_context&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getLocale&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;gxp$out&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;append&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(15, 105, 255);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(187, 121, 119);"&gt;boolean&lt;/span&gt; gxp$bool$&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;false&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;for&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Integer&lt;/span&gt; listItem &lt;span style="color: rgb(128, 128, 48);"&gt;:&lt;/span&gt; list&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;gxp$bool$&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;   gxp$out&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;append&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;" "&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;else&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;   gxp$bool$&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;true&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt; gxp$out&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;append&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(15, 105, 255);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;Value : "&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;                                      &lt;br /&gt; com&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;google&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;gxp&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;text&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;PlaintextAppender&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;INSTANCE&lt;br /&gt;     &lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;append&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;gxp$out&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; gxp_context&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;listItem&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt; gxp$out&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;append&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(15, 105, 255);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;gxp$out&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;append&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(15, 105, 255);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Please notice list and listItem variables and their types. The last step is actually put some param and get result. The name of our tempale is com.google.code.projects.BlogSrc.GxpApp.HelloGxp, the name of file is HelloGxp.gxp. Result of template compilation is a java file - HelloGxp.java in package "com.google.code.projects.BlogSrc.GxpApp". Simplest way to run tempale code is just call static write() method from generated class HelloGxp. Something like this :&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;package&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; com&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;google&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;code&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;projects&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;BlogSrc&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;GxpApp&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; com&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;google&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;base&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;GxpContext&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; com&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;google&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;html&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;HtmlClosure&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; com&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;google&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;gxp&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;base&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;GxpClosure&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; java&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;io&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;*&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt; java&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 74, 67);"&gt;util&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;*&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;class&lt;/span&gt; MyHelloWorld&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;StringWriter&lt;/span&gt; out &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;new&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;StringWriter&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;GxpContext gxpContext &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;br /&gt;    createGxpContext&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Locale&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;US&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;false&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;GxpContext createGxpContext&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Locale&lt;/span&gt; locale&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;boolean&lt;/span&gt; useXmlSyntax&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;return&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;new&lt;/span&gt; GxpContext&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;locale&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; useXmlSyntax&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;void&lt;/span&gt; testHello&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;throws&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Exception&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;List&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Integer&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt; list &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;new&lt;/span&gt; ArrayList&lt;span style="color: rgb(128, 128, 48);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Integer&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  list&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;add&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  list&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;add&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  list&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;add&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;3&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  list&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;add&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  list&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;add&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;5&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;  list&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;add&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;6&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  HelloGxp&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;write&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;out&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt; gxpContext&lt;span style="color: rgb(128, 128, 48);"&gt;,&lt;/span&gt;list&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(187, 121, 119);"&gt;void&lt;/span&gt; main&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;String&lt;/span&gt; args&lt;span style="color: rgb(128, 128, 48);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; MyHelloWorld obj &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;new&lt;/span&gt; MyHelloWorld&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;try&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;         obj&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;testHello&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;String&lt;/span&gt; s &lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt; obj&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;out&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;getBuffer&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;toString&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;System&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;out&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;println&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;s&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;catch&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;Exception&lt;/span&gt; ex&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(128, 0, 128);"&gt;{&lt;/span&gt;&lt;br /&gt;         ex&lt;span style="color: rgb(128, 128, 48);"&gt;.&lt;/span&gt;printStackTrace&lt;span style="color: rgb(128, 128, 48);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Complete source code you can find &lt;a href="http://code.google.com/p/ostas-blog-src/source/browse/"&gt;here&lt;/a&gt;. &lt;/integer&gt;&lt;br /&gt;&lt;br /&gt;GxpHelloWorldMavenBuild - the same project but for use with Maven 2.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-565887218825559442?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/565887218825559442/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=565887218825559442" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/565887218825559442" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/565887218825559442" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/jwi-fdNXO0U/google-xml-pages-helloworld-app-with.html" title="Google XML Pages - HelloWorld app with source code" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://ostas.blogspot.com/2009/04/google-xml-pages-helloworld-app-with.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-4049029439468325478</id><published>2008-10-20T04:28:00.000-07:00</published><updated>2008-10-20T04:37:14.835-07:00</updated><title type="text">Google App Engine will support Java ? Cool !</title><content type="html">Well, I don't believe yet, but it seems to be that Java will be supported on GAP !&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;At the recently Google Developers Day in Bangalore, Keynote speaker Prasad Ram said that Google App Engine will now support Java.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Source &lt;a href="http://technofriends.in/2008/10/20/google-app-engine-to-support-java/"&gt;here&lt;/a&gt; and &lt;a href="http://www.controlenter.in/2008/10/google-developer-day-bangalore-google-app-engine-to-support-java-android-sdk-release-on-oct-22/"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-4049029439468325478?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/4049029439468325478/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=4049029439468325478" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/4049029439468325478" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/4049029439468325478" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/vL3_rBAjAFQ/google-app-engine-will-support-java.html" title="Google App Engine will support Java ? Cool !" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ostas.blogspot.com/2008/10/google-app-engine-will-support-java.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-8084761941053376760</id><published>2008-10-09T01:41:00.000-07:00</published><updated>2008-10-09T05:37:46.145-07:00</updated><title type="text">JBoss EJB3 Integration testing with Maven2 and Cargo</title><content type="html">One of the most boring things in EJB development is that we need container. Compile-Build-Deploy-Run_some_testing_code - this is to long cycle to repeat it frequently without some kind of automation. I'll show you one of the possible ways to simplify this stuff. There are others, but I didn't tried them (I mean jboss microcontainer here). It's not complex, but it works and probably could be portable solution for not only my case.&lt;br /&gt;&lt;br /&gt;So, my working environment is the following : Maven 2, JBoss 4.2.2 GA, jUnit 3.8.1 and of course EJB3. Build lifecycle with Maven 2 consists of &lt;a href="http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html"&gt;some phases&lt;/a&gt;, like "...compile,test,package,integration-test...". Ok, with package and compile phases all is clear. Test... we need jboss to be up and running before we can test anything. How to start and stop jboss automatically during build ? The answer is &lt;a href="http://cargo.codehaus.org/Maven2+plugin"&gt;Cargo with Maven2 plugin&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Cargo is a thin wrapper around existing containers (e.g. J2EE containers). It provides different APIs to easily manipulate containers.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Now we can assign "start container" and "stop container" goals to some Maven 2 build phase. First of all, we are interested in integration-test. Also we need to skip junit tests before integration test. To achieve this I'm using this config for cargo plugin :&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;plugin&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.codehaus.cargo&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;cargo-maven2-plugin&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;0.3-SNAPSHOT&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;container&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;containerId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;jboss4x&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;containerId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;home&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;${jboss.home}&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;home&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;append&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;false&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;append&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;container&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;existing&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;home&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;${jboss.home}/server/default&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;home&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;properties&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;cargo.jboss.configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;default&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;cargo.jboss.configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;cargo.rmi.port&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;1099&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;cargo.rmi.port&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;cargo.logging&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;high&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;cargo.logging&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;properties&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;wait&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;false&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;wait&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;executions&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;execution&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;start-container&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;phase&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;pre-integration-test&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;phase&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goals&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goal&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;start&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goal&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goals&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;execution&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;execution&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;stop-container&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;phase&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;post-integration-test&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;phase&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goals&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goal&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;stop&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goal&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goals&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;execution&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;executions&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;    &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;plugin&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And this for surefire - to be able to run junit tests on integration-test phase, after container started at pre-integration-test phase :&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;plugin&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                                      &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;org.apache.maven.plugins&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;groupId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;maven-surefire-plugin&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;artifactId&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                            &lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;skip&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;true&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;skip&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                       &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                           &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;executions&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                               &lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;execution&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                             &lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;surefire-it&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                 &lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;phase&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;integration-test&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;phase&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;      &lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goals&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                              &lt;br /&gt;         &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goal&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;test&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goal&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                 &lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;goals&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                             &lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                      &lt;br /&gt;         &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;skip&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;false&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;skip&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                &lt;br /&gt;      &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;configuration&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                     &lt;br /&gt;   &lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;execution&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                            &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;executions&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;                              &lt;br /&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(95, 80, 53);"&gt;plugin&lt;/span&gt;&lt;span style="color: rgb(166, 87, 0);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;I haven't any luck with "standalone" type configuration. I should say that when"existing" jboss installation is used here, overall process is quite fast:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;[INFO] -------------------------------------------&lt;br /&gt;[INFO] BUILD SUCCESSFUL&lt;br /&gt;[INFO] -------------------------------------------&lt;br /&gt;[INFO] Total time: 42 seconds&lt;br /&gt;[INFO] Finished at: Thu Oct 09 15:15:39 EEST 2008&lt;br /&gt;[INFO] Final Memory: 9M/19M&lt;br /&gt;[INFO] -------------------------------------------&lt;br /&gt;&lt;/blockquote&gt;42 seconds to compile code, package jar, copy jar to deploy dir, start jboss, run junit test, stop jboss and all this by doing just "mvn install" !&lt;br /&gt;&lt;br /&gt;Complete source code available via svn &lt;a href="http://code.google.com/p/ostas-blog-src/source/checkout"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;PS.&lt;br /&gt;Time can be very different. My hardware is &lt;a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;amp;location=http%3A%2F%2Fwww.amazon.com%2FCompaq-Business-Notebook-6820s-Widescreen%2Fdp%2FB000VG2K0Q&amp;amp;tag=myitwo-20&amp;amp;linkCode=ur2&amp;amp;camp=1789&amp;amp;creative=9325"&gt;HP 6820s laptop&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=myitwo-20&amp;amp;l=ur2&amp;amp;o=1" alt="" style="border: medium none  ! important; margin: 0px ! important;" width="1" border="0" height="1" /&gt;. BTW, executing "mvn -o install" takes 23 sec :)&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-8084761941053376760?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/8084761941053376760/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=8084761941053376760" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/8084761941053376760" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/8084761941053376760" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/oqsX7a251OU/jboss-ejb3-integration-testing-with.html" title="JBoss EJB3 Integration testing with Maven2 and Cargo" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><thr:total>5</thr:total><feedburner:origLink>http://ostas.blogspot.com/2008/10/jboss-ejb3-integration-testing-with.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-7937123265943718284</id><published>2008-10-03T07:00:00.000-07:00</published><updated>2008-10-03T07:39:29.940-07:00</updated><title type="text">Build EJB3 with Maven 2 example with source code</title><content type="html">My posts (the &lt;a href="http://ostas.blogspot.com/2007/03/build-ejb3-with-maven-2.html"&gt;first&lt;/a&gt; and the &lt;a href="http://ostas.blogspot.com/2007/07/build-ejb3-with-jboss-and-maven-2.html"&gt;second&lt;/a&gt;) about how to build EJB3 using Maven 2 was very popular. This post is some kind of update, but now, with complete source code. BTW, I'm going to publish some of sources I mentioned at my blog posts, since readers are asking for them. I mean source code from &lt;a href="http://ostas.blogspot.com/2008/03/search-with-spring-hibernate-lucene-and.html"&gt;this&lt;/a&gt; post at minimum.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/ostas-blog-src/"&gt;&lt;br /&gt;So, here it is !&lt;/a&gt; In my further posts I'm going to highlight some of pitfalls one can face with.&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-7937123265943718284?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/7937123265943718284/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=7937123265943718284" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/7937123265943718284" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/7937123265943718284" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/I5axEkx7W8U/build-ejb3-with-maven-2-example-with.html" title="Build EJB3 with Maven 2 example with source code" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><thr:total>4</thr:total><feedburner:origLink>http://ostas.blogspot.com/2008/10/build-ejb3-with-maven-2-example-with.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-2858317885681805188</id><published>2008-08-27T02:17:00.000-07:00</published><updated>2008-08-27T02:19:05.367-07:00</updated><title type="text">Yet another Java Puzzle</title><content type="html">No words here, just the code :)&lt;br /&gt;&lt;br /&gt;&lt;pre style='color:#000000;background:#ffffff;'&gt;&lt;span style='color:#800000; font-weight:bold; '&gt;class&lt;/span&gt; String&lt;br /&gt;&lt;span style='color:#800080; '&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span style='color:#800000; font-weight:bold; '&gt;public&lt;/span&gt; &lt;span style='color:#800000; font-weight:bold; '&gt;static&lt;/span&gt; &lt;span style='color:#bb7977; '&gt;void&lt;/span&gt; main&lt;span style='color:#808030; '&gt;(&lt;/span&gt;&lt;span style='color:#bb7977; font-weight:bold; '&gt;String&lt;/span&gt; args&lt;span style='color:#808030; '&gt;[&lt;/span&gt;&lt;span style='color:#808030; '&gt;]&lt;/span&gt;&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;br /&gt;    &lt;span style='color:#800080; '&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span style='color:#bb7977; font-weight:bold; '&gt;String&lt;/span&gt; &lt;span style='color:#bb7977; font-weight:bold; '&gt;String&lt;/span&gt;  &lt;span style='color:#808030; '&gt;=&lt;/span&gt; &lt;span style='color:#800000; font-weight:bold; '&gt;new&lt;/span&gt; &lt;span style='color:#bb7977; font-weight:bold; '&gt;String&lt;/span&gt;&lt;span style='color:#808030; '&gt;(&lt;/span&gt;&lt;span style='color:#808030; '&gt;)&lt;/span&gt;&lt;span style='color:#800080; '&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style='color:#800080; '&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#800080; '&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;My IT World&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849561-2858317885681805188?l=ostas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://ostas.blogspot.com/feeds/2858317885681805188/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=34849561&amp;postID=2858317885681805188" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/2858317885681805188" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/34849561/posts/default/2858317885681805188" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MyItWorld/~3/FUNqlJu4w-k/yet-another-java-puzzle.html" title="Yet another Java Puzzle" /><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="25" height="32" src="http://2.bp.blogspot.com/_CcxKUpSUr-k/SnCW7Wo26DI/AAAAAAAAACU/2887TQBx_fM/S220/DSC02316-ava-short.jpg" /></author><thr:total>5</thr:total><feedburner:origLink>http://ostas.blogspot.com/2008/08/yet-another-java-puzzle.html</feedburner:origLink></entry></feed>

