<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5790781099328190889</id><updated>2011-07-07T13:19:17.842-07:00</updated><category term='great indian developer summit 2008 daring java review'/><title type='text'>pc's thinking cap</title><subtitle type='html'>on programming, technologies and tools</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://pcthinkingcap.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://pcthinkingcap.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Poorna</name><uri>http://www.blogger.com/profile/02029517338617079244</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5790781099328190889.post-3299542927651220780</id><published>2008-06-18T10:47:00.000-07:00</published><updated>2008-06-18T11:43:10.978-07:00</updated><title type='text'>Firefox 3 downloaded!</title><content type='html'>I managed to download the &lt;a href="http://www.spreadfirefox.com/en-US/worldrecord"&gt;Firefox 3&lt;/a&gt; just 30 minutes before the first 24 hour window kept for the world record. Probably I didn't waste time trying to download as soon as it was out and keep on waiting for the page to render. It was pretty slow even at the end of the first 24 hour. The total download count when I am writing this post is little more than 8 million. I don't know about the previous download record - if at all one exists, but it is a cool way to market the product. Download day participation certificate looks cool as well.&lt;br /&gt;&lt;br /&gt;&lt;object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" id="doc_871686733987750" name="doc_871686733987750" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" align="middle" width="75%" height="375"&gt;  &lt;param name="movie" value="http://documents.scribd.com/ScribdViewer.swf?document_id=3477226&amp;amp;access_key=key-9s6qjc0i891mkhk0cn8&amp;amp;page=&amp;amp;version=1&amp;amp;auto_size=true"&gt;   &lt;param name="quality" value="high"&gt;   &lt;param name="play" value="true"&gt;  &lt;param name="loop" value="true"&gt;   &lt;param name="scale" value="showall"&gt;  &lt;param name="wmode" value="opaque"&gt;   &lt;param name="devicefont" value="false"&gt;  &lt;param name="bgcolor" value="#ffffff"&gt;   &lt;param name="menu" value="true"&gt;  &lt;param name="allowFullScreen" value="true"&gt;   &lt;param name="allowScriptAccess" value="always"&gt;   &lt;param name="salign" value=""&gt;  &lt;embed src="http://documents.scribd.com/ScribdViewer.swf?document_id=3477226&amp;amp;access_key=key-9s6qjc0i891mkhk0cn8&amp;amp;page=&amp;amp;version=1&amp;amp;auto_size=true" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" play="true" loop="true" scale="showall" wmode="opaque" devicefont="false" bgcolor="#ffffff" name="doc_871686733987750_object" menu="true" allowfullscreen="true" allowscriptaccess="always" salign="" type="application/x-shockwave-flash" align="middle" width="75%" height="375"&gt;&lt;/embed&gt; &lt;/object&gt;&lt;div style="font-size: 10px; text-align: center; width: 100%;"&gt;&lt;a href="http://www.scribd.com/doc/3477226/firefox-download-day-certificate"&gt;firefox download day certificate&lt;/a&gt; - &lt;a href="http://www.scribd.com/upload"&gt;Upload a Document to Scribd&lt;/a&gt;&lt;/div&gt;&lt;div style="display: none;"&gt; Read this document on Scribd: &lt;a href="http://www.scribd.com/doc/3477226/firefox-download-day-certificate"&gt;firefox download day certificate&lt;/a&gt; &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Anyhow, I have been using the RC3 for sometime now and the stand out feature got to be "&lt;a href="http://mozillalinks.org/wp/2007/11/firefox-3-location-bar-just-became-almighty/"&gt;Awesome Bar&lt;/a&gt;". It is awesome indeed! And the frequent firefox users would not miss to notice the considerable performance enhancement.&lt;br /&gt;&lt;br /&gt;10 more minutes to go, can it reach 8.5 million?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Update:&lt;/span&gt; The download day is over; the total download looks like 8.265 million.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5790781099328190889-3299542927651220780?l=pcthinkingcap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pcthinkingcap.blogspot.com/feeds/3299542927651220780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5790781099328190889&amp;postID=3299542927651220780' title='44 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/3299542927651220780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/3299542927651220780'/><link rel='alternate' type='text/html' href='http://pcthinkingcap.blogspot.com/2008/06/firefox-3-downloaded.html' title='Firefox 3 downloaded!'/><author><name>Poorna</name><uri>http://www.blogger.com/profile/02029517338617079244</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>44</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5790781099328190889.post-5959481449422724601</id><published>2008-06-10T08:34:00.000-07:00</published><updated>2008-06-10T09:50:18.982-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='great indian developer summit 2008 daring java review'/><title type='text'>Great Indian Developer Summit 2008</title><content type='html'>I should say I was looking forward to attend this &lt;a href="http://www.developersummit.com/"&gt;developer summit&lt;/a&gt;. Last developer conference I attended was  JAX Eclipse conference an year ago. So I was keen to catch up with the latest happenings in the java world. I attended the Java leg of the conference (called "Daring Java") on May 22 - 23.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;My take on the conference&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I generally would like to attend this kind of conferences mainly to know the latest trend, connect with the developers, to get to know the new products from various organizations etc. This one is a very good from this perspective. I thought following were the positives about this conference:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;well organized events&lt;/li&gt;&lt;li&gt;well known speakers from all around the world&lt;/li&gt;&lt;li&gt;large number of participants from various organizations&lt;br /&gt;&lt;/li&gt;&lt;li&gt;good amount of company stalls&lt;/li&gt;&lt;/ul&gt;few things didn't go well:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;food was horrible&lt;/li&gt;&lt;li&gt;the recorded sessions and the presentation slides DVD arrives 45 days after the conference. I think, this is too long&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;My take-away&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Quite a few java topics were being discussed, but the one which caught me this time was Groovy, and particularly sessions from &lt;a href="http://www.agiledeveloper.com/blog"&gt;Venkat Subramaniam&lt;/a&gt;. I kind of became curious about Groovy and followed Venkat and attended all his sessions. I had a very little information about Groovy prior to this conference and all the Groovy sessions were very good and informative.&lt;br /&gt;&lt;br /&gt;Groovy&lt;br /&gt;&lt;ul&gt;&lt;li&gt;has got all the advantages of dynamic languages such as nature of scripting, dynamic types, etc.&lt;/li&gt;&lt;li&gt;is very expressive - has the power of expressing lot of things using simple statements&lt;/li&gt;&lt;li&gt;supports closure&lt;br /&gt;&lt;/li&gt;&lt;li&gt;less ceremonial code&lt;br /&gt;&lt;/li&gt;&lt;li&gt;good choice to write DSLs&lt;/li&gt;&lt;/ul&gt;As far as Java is concerned, I was bit surprised to hear that many speakers were kind of insisting that Java is not going away and stuff like that. In my view, no matter what happens, Java is going to stay for long time and no arguments about it. Interestingly, few, especially Groovy lovers said that Java as a platform is solid and has got very good library support and is going to stay for long time, but Java as a language is aging.  And its place might go to new dynamic languages that has less ceremonial and fluent syntax but takes advantage of Java platform. I personally feel, dynamic languages have got to prove a lot on the aspects of performance, robustness, security, etc before enterprise application developers pick them.&lt;br /&gt;&lt;br /&gt;Nevertheless, it does no harm to learn new languages. And I have started learning Groovy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5790781099328190889-5959481449422724601?l=pcthinkingcap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pcthinkingcap.blogspot.com/feeds/5959481449422724601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5790781099328190889&amp;postID=5959481449422724601' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/5959481449422724601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/5959481449422724601'/><link rel='alternate' type='text/html' href='http://pcthinkingcap.blogspot.com/2008/06/great-indian-developer-summit-2008.html' title='Great Indian Developer Summit 2008'/><author><name>Poorna</name><uri>http://www.blogger.com/profile/02029517338617079244</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5790781099328190889.post-252602358895280730</id><published>2008-06-03T09:34:00.000-07:00</published><updated>2008-06-03T09:38:06.752-07:00</updated><title type='text'>new blog</title><content type='html'>I am migrating my old blog here and hence have lost all the comments and few of my old blog posts. Hopefully I persist with this blog for some time :).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5790781099328190889-252602358895280730?l=pcthinkingcap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pcthinkingcap.blogspot.com/feeds/252602358895280730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5790781099328190889&amp;postID=252602358895280730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/252602358895280730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/252602358895280730'/><link rel='alternate' type='text/html' href='http://pcthinkingcap.blogspot.com/2008/06/new-blog.html' title='new blog'/><author><name>Poorna</name><uri>http://www.blogger.com/profile/02029517338617079244</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5790781099328190889.post-3575012542731923922</id><published>2005-09-28T08:29:00.000-07:00</published><updated>2008-06-03T08:38:09.564-07:00</updated><title type='text'>Caching web pages</title><content type='html'>&lt;div style="color: rgb(0, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Majorly two  categories:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. Caching the entire response&lt;br /&gt;2. Caching a part  of response&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Caching the response&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Basically this kind of caching is used for news sites, stock tickers,  etc. In this approach, the entire web response is cached for a specific  configured period of time. After the expiry time, whenever the request is made,  the page is refreshed, cached and served back to the client. This is applicable  for static and as well as dynamic pages. It is acheived thru Servlet Filters.&lt;br /&gt;&lt;br /&gt;Let us assume, we have a JSP "DisplayInventory.jsp", which displays the  inventory details read from the database. And the inventory details have the  nature of changing in half-an-hour. In this scenario, we can cache the response  from the DisplayInventory.jsp for half-an-hour. The response will be cached  during the first hit to this page and will be served from this cache for the  further requests. When the request is made for this page after half-an-hour, the  page is executed once again and the modified data is read and displayed.&lt;br /&gt;&lt;br /&gt;This is quite easy to implement it thru Servlet Filters. Anyhow, most of  the application servers have these kind of Filters. My following example shows  how to configure this setting for Weblogic Server.&lt;br /&gt;&lt;br /&gt;web.xml:&lt;br /&gt;&lt;pre&gt;   &amp;lt;filter&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;filter-name&amp;gt;InventoryCache&amp;lt;/filter-name&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;filter-class&amp;gt;weblogic.cache.filter.CacheFilter&lt;br /&gt;&lt;br /&gt;    &amp;lt;/filter-class&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;init-param&amp;gt;&lt;br /&gt;&lt;br /&gt;        &amp;lt;param-name&amp;gt;timeout&amp;lt;/param-name&amp;gt;&lt;br /&gt;&lt;br /&gt;        &amp;lt;param-value&amp;gt;30&amp;lt;/param-value&amp;gt;&lt;br /&gt;&lt;br /&gt;        &amp;lt;!-- Cache expiry setting --&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;/init-param&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;init-param&amp;gt;&lt;br /&gt;&lt;br /&gt;        &amp;lt;param-name&amp;gt;verbose&amp;lt;/param-name&amp;gt;&lt;br /&gt;&lt;br /&gt;        &amp;lt;param-value&amp;gt;true&amp;lt;/param-value&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;/init-param&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/filter&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- Maps the jsp with the filter --&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;filter-mapping&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;filter-name&amp;gt;InventoryCache&amp;lt;/filter-name&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;url-pattern&amp;gt;DisplayInventory.jsp&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/filter-mapping&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Caching a  part of response&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let us say, only in couple of places in your  JSP, you read data from database or do some calculation to produce the response.  You can cache only these parts instead of the entire response. This is normally  done using tag library tags. Mark the area in your JSP with the cache tags and  specifying the timeout period. It is taken care. Writing caching tag library is  easy too. Nevertheless, most application server vendors ship a variety of  caching tag library tags.&lt;br /&gt;&lt;br /&gt;Following example is for Weblogic Server&lt;br /&gt;&lt;br /&gt;Let us assume, this is how the DisplayInventory.jsp is written&lt;br /&gt;&lt;pre&gt;Header&lt;br /&gt;&lt;br /&gt;.....&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Body&lt;br /&gt;&lt;br /&gt;.....&lt;br /&gt;&lt;br /&gt;Some formatting&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;wl:cache name="invCache" timeout="30"&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, there are some tag lib tags&lt;br /&gt;&lt;br /&gt;which is used to read data from database&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/wl:cache&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;End formatting&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;End Body&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;And in some part of the JSP, if you want to clear the cache.&lt;br /&gt;&lt;pre&gt;&amp;lt;wl:cache name="invCache" flush="true"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;There are some more parameters available in both the cases, to fine  tune the cache.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5790781099328190889-3575012542731923922?l=pcthinkingcap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pcthinkingcap.blogspot.com/feeds/3575012542731923922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5790781099328190889&amp;postID=3575012542731923922' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/3575012542731923922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/3575012542731923922'/><link rel='alternate' type='text/html' href='http://pcthinkingcap.blogspot.com/2005/09/caching-web-pages.html' title='Caching web pages'/><author><name>Poorna</name><uri>http://www.blogger.com/profile/02029517338617079244</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5790781099328190889.post-8721421979752896488</id><published>2005-09-27T08:28:00.000-07:00</published><updated>2008-06-03T08:35:55.888-07:00</updated><title type='text'>Cache components features comparison</title><content type='html'>&lt;div&gt;As I mentioned in my previous post, this is how some of the open source  components stand in terms of features.&lt;br /&gt;&lt;pre&gt;&lt;b style="color: rgb(204, 0, 0);"&gt;Featues/Cache            EHCache   JCS   JBoss Cache&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Multithreading Support   Yes       Yes   Yes&lt;br /&gt;&lt;br /&gt;Memory Limit and Over    Yes       Yes   Yes&lt;br /&gt;&lt;br /&gt;flow to Disk&lt;br /&gt;&lt;br /&gt;Cache Eviction Policy    Yes       Yes   Yes&lt;br /&gt;&lt;br /&gt;Notifies listening to    No        No    No&lt;br /&gt;&lt;br /&gt;Database change&lt;br /&gt;&lt;br /&gt;Updates the references   No        No    No&lt;br /&gt;&lt;br /&gt;Distributed Cache        Yes       Yes   Yes&lt;br /&gt;&lt;br /&gt;Shutdown and Restart     Yes       No    Yes&lt;br /&gt;&lt;br /&gt;Replication over         No        No    Yes&lt;br /&gt;&lt;br /&gt;machines&lt;br /&gt;&lt;br /&gt;Asynchronous operations  Yes       No    Yes&lt;/pre&gt;&lt;b style="color: rgb(255, 255, 255);"&gt;Design Considerations&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I wouldnt  hesitate to wrap whatever the cache component I use in my project. Because,  these little components often have the tendency to change drastically. If the  component is too small, or sometimes too big, we may need to think, is it  neccessary to wrap. For an example, Log4j, I wouldnt wrap, rather decide to live  with it. For big component, databases such as Oracle, you may decide to live  with it and do not bother to consider the alternative and code accordingly. But  not with these cache components. Your project should be able to embrace a new  change or new cache component for that matter.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5790781099328190889-8721421979752896488?l=pcthinkingcap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pcthinkingcap.blogspot.com/feeds/8721421979752896488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5790781099328190889&amp;postID=8721421979752896488' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/8721421979752896488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/8721421979752896488'/><link rel='alternate' type='text/html' href='http://pcthinkingcap.blogspot.com/2005/09/cache-components-features-comparison.html' title='Cache components features comparison'/><author><name>Poorna</name><uri>http://www.blogger.com/profile/02029517338617079244</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5790781099328190889.post-7045518645331985892</id><published>2005-09-19T08:26:00.000-07:00</published><updated>2008-06-03T08:41:51.395-07:00</updated><title type='text'>Criteria to choose a Caching Component</title><content type='html'>&lt;div&gt;I had an opportunity to spend quite a long time working with Caching in one  of my previous projects in my previous organization. Basically the work was to  remove the in-built caching layer based on Entity Bean cache and replace it with  the open source caching system citing performance reasons. So we had to evaluate  some of the caching components. But since there was a caching system existing  already, we aware of the requirements exactly and based on those we evaluated  the caching components. Finally we chose &lt;a href="http://ehcache.sourceforge.net/"&gt;&lt;b&gt;ehcache&lt;/b&gt;&lt;/a&gt; as our caching  component, and the project met the performance criteria quite easily, and it  became successful.&lt;br /&gt;&lt;br /&gt;Having worked extensively on caching components, had  a good idea how to choose/write a good, feature rich and all configurable  caching component. If you are about to choose a cache component/write your own,  it is good to keep these things in mind.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: rgb(0, 0, 0);" &gt;1. Does  the caching component work fine in multi-threaded environment like  &lt;span style="color: rgb(0, 0, 0);"&gt;Servlets?&lt;/span&gt;&lt;/span&gt;&lt;span style="color:red;"&gt;***&lt;/span&gt;&lt;/b&gt; Most of the caching components I  have come across do support this, but it is always worth checking it, after all  it is a very important feature required. Otherwise wherever you are using the  cache you end up writing a synchronized block (user lever). If it is supported  by the component by default, you dont need to worry about multi-threading since  during the update and retrieval of the cache components, the component itself  will lock the storage and perform the operation (API level).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;2. Does it have a memory limit?&lt;/span&gt;&lt;span style="color:red;"&gt;***&lt;/span&gt;&lt;/b&gt;  If you could some how instruct to the component that the cache memory footprint  can go maximum only up to 50MB, it will be really good to keep the cache memory  footprint intact. It will be more than good if the component can spill over the  contents to a file or to a database rather than just saying the cache has  reached the limit.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;3. Does it expire the cache  contents?&lt;/span&gt;&lt;span style="color:red;"&gt;***&lt;/span&gt;&lt;/b&gt; It will be useful if some of the  components or the entire cache get expired after some specific period of time  rather than living in the memory forever.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;4. How  good are cache eviction policies?&lt;/span&gt;&lt;span style="color:red;"&gt;***&lt;/span&gt;&lt;/b&gt; During  the spill over time, will it simply overflow the contents to the secondary  storage whatever comes in, or will it choose, lets say, Least recently used ones  to the disk and the newly added one to memory. Is it configurable?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;5. How cache element update is taken  care.&lt;/span&gt;&lt;span style="color:red;"&gt;***&lt;/span&gt;&lt;/b&gt; The is the most important point to be  noted. You may not have problem if the data whatever cached is read-only. But in  most scenarios, we would be caching data from database and it will be changing  periodically or by user request. If it is periodic, setting expiration time  would be helpful, and some cache components even can be made aware of how to  refresh the cache component. The ultimate cache update facility! Otherwise,  manual update to the cache has to happen.&lt;br /&gt;&lt;br /&gt;The update of cache has one  more side to it. Lets say, you query a cache element like this:&lt;br /&gt;&lt;br /&gt;Client.java&lt;br /&gt;&lt;br /&gt;....&lt;br /&gt;Employee e = empCache.getEmployee("3435");&lt;br /&gt;....&lt;br /&gt;&lt;br /&gt;After this query, if the cache elment "3435" is updated in the  cache, will the client or whoever references the element get notified? What are  the mechanisms available for this?&lt;br /&gt;&lt;br /&gt;&lt;b style="color: rgb(0, 0, 0);"&gt;6. How small is  the memory footprint?&lt;/b&gt; How much memory does the cache component occupy  for storing n number of objects compared to other components? You may think, it  is completely dependent on the object we create. Mostly, yes, but if the  component is designed badly, it will likely to occupy more space than that is  required to store the contents. This may not be applicable for everyone, but  certainly for memory intense applications.&lt;br /&gt;&lt;br /&gt;&lt;b style="color: rgb(0, 0, 0);"&gt;7. Is it  Distributed Caching?&lt;/b&gt; If the application mandates, you may need to  create a caching system which needs to accessed by remote JVMs.&lt;br /&gt;&lt;br /&gt;&lt;b style="color: rgb(0, 0, 0);"&gt;8. Shutdown and Restart.&lt;/b&gt; If you have to shutdown the  application and restart, can the cache be stored into a file/database and  restored back when the application becomes alive once again? May not be an  important feature, but it is good to have.&lt;br /&gt;&lt;br /&gt;&lt;b style="color: rgb(0, 0, 0);"&gt;9. How  simple/complex is the configuration?&lt;/b&gt; Worth exploring this.&lt;br /&gt;&lt;br /&gt;&lt;b style="color: rgb(0, 0, 0);"&gt;10. Dependency.&lt;/b&gt; Though it is always to  good to choose the component which has very little dependency with other  components, you can ignore some of the dependencies like log4j, commons, etc.  Because, mostly, you will be referencing these components already in your  project. It is good to count only the new dependencies.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:red;"&gt;***&lt;/span&gt; - Very important&lt;br /&gt;&lt;br /&gt;I am not suggesting that ehcache  is the best with all these points, we chose it because it fitted our  requirements. Some of these may not be applicable to ehcache.&lt;br /&gt;&lt;br /&gt;If you  have some other important feature which needs to be looked into to evaluate a  caching component, please reply to me.&lt;br /&gt;&lt;br /&gt;In my next post, I shall try to  evaluate some of the open source cache components against these criteria.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5790781099328190889-7045518645331985892?l=pcthinkingcap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pcthinkingcap.blogspot.com/feeds/7045518645331985892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5790781099328190889&amp;postID=7045518645331985892' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/7045518645331985892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/7045518645331985892'/><link rel='alternate' type='text/html' href='http://pcthinkingcap.blogspot.com/2005/09/criteria-to-choose-caching-component.html' title='Criteria to choose a Caching Component'/><author><name>Poorna</name><uri>http://www.blogger.com/profile/02029517338617079244</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5790781099328190889.post-7866866227921565963</id><published>2005-08-13T08:25:00.000-07:00</published><updated>2008-06-03T08:35:26.791-07:00</updated><title type='text'>another EJB3 container</title><content type='html'>&lt;div&gt;Resin-3.0.14, another open source EJB 3 container. Though it is in beta  version, it is really good for academic purpose. Since EJB 3 has become  extraordinarily simple, it would take some mins to deploy your EJBs. I deployed  a simple stateless session bean, similar to the one coming with the Resin, have  uploaded the same, might be useful for you to get started.&lt;br /&gt;&lt;br /&gt;In EJB3,  there are no mandatory interfaces like, EJBHome and EJBObject, you may just have  some business interface:&lt;br /&gt;&lt;pre&gt;public interface Calculator {&lt;br /&gt;&lt;br /&gt;public int add(int a, int b);&lt;br /&gt;&lt;br /&gt;public int sub(int a, int b);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Bean implementation:&lt;br /&gt;&lt;pre&gt;import static&lt;br /&gt;&lt;br /&gt;javax.ejb.TransactionAttributeType.SUPPORTS;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;@javax.ejb.Stateless&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;// Marks the bean as Stateless&lt;br /&gt;&lt;br /&gt;public class CalculatorBean&lt;br /&gt;&lt;br /&gt;implements Calculator {&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;@javax.ejb.TransactionAttribute(SUPPORTS)&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;//Marks the method with&lt;br /&gt;&lt;br /&gt;//Supports transaction attribute&lt;br /&gt;&lt;br /&gt;public int add(int a, int b)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;return a+b;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;@javax.ejb.TransactionAttribute(SUPPORTS)&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;//Marks the method with&lt;br /&gt;&lt;br /&gt;//Supports transaction attribute&lt;br /&gt;&lt;br /&gt;public int sub(int a, int b)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;return a-b;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I could manage only to write the client as a Servlet, there is no  proper documentation which describes how to write a standalone client. If anyone  have used Resin to deploy prior versions of EJB, they can help us out with this.  Anyhow found out that, we need to use either Burlap or Hessian implementations  to expose the EJB to outside the container. Nevertheless, the ejb client servlet  is:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;public class ClientServlet extends HttpServlet {&lt;br /&gt;&lt;br /&gt;private Calculator calc;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;&lt;br /&gt;* Dependency injector&lt;br /&gt;&lt;br /&gt;* for the Calculator interface.&lt;br /&gt;&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;@EJB(name="CalculatorBean")&lt;br /&gt;&lt;br /&gt;public void setCalculator(Calculator newCalc)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;calc = newCalc;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void service(HttpServletRequest req,&lt;br /&gt;&lt;br /&gt; HttpServletResponse res)&lt;br /&gt;&lt;br /&gt; throws IOException, ServletException&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; PrintWriter out = res.getWriter();&lt;br /&gt;&lt;br /&gt; if (calc == null) {&lt;br /&gt;&lt;br /&gt;   out.println("Calculator not found!");&lt;br /&gt;&lt;br /&gt;   return;&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; out.println("Add: "+calc.add(4,5));&lt;br /&gt;&lt;br /&gt; out.println("Sub: "+calc.sub(4,5));&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;The above setCalculator method basically looks up the JNDI with  "CalculatorBean" name , finds and assigns the instance. All it does since it is  marked with @EJB annotation.&lt;br /&gt;&lt;br /&gt;The configuration is pretty simple, just  need to add &amp;lt;ejb-server&amp;gt; tag to web.xml:&lt;br /&gt;&lt;pre&gt;&amp;lt;web-app xmlns="http://caucho.com/ns/resin"&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;&amp;lt;ejb-server jndi-name="java:comp/env/ejb"&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;bean type="stateless.CalculatorBean"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/ejb-server&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;servlet servlet-name="calc"&lt;br /&gt;&lt;br /&gt;  servlet-class="stateless.ClientServlet"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;load-on-startup&amp;gt;0&amp;lt;/load-on-startup&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/servlet&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;servlet-mapping url-pattern="/calc"&lt;br /&gt;&lt;br /&gt; servlet-name="calc"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/web-app&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5790781099328190889-7866866227921565963?l=pcthinkingcap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pcthinkingcap.blogspot.com/feeds/7866866227921565963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5790781099328190889&amp;postID=7866866227921565963' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/7866866227921565963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/7866866227921565963'/><link rel='alternate' type='text/html' href='http://pcthinkingcap.blogspot.com/2005/08/another-ejb3-container.html' title='another EJB3 container'/><author><name>Poorna</name><uri>http://www.blogger.com/profile/02029517338617079244</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5790781099328190889.post-37293661282363314</id><published>2005-08-11T08:24:00.000-07:00</published><updated>2008-06-03T08:35:13.965-07:00</updated><title type='text'>dabbling with EJB3...</title><content type='html'>&lt;div&gt;If you cannot wait for the public release of EJB3 spec and major vendors'  implementations, there is an option for you to test your EJB3 skills. JBoss has  already released a EJB 3 container in ALPHA version.  JBoss-EJB-3.0_Embeddable_ALPHA, they claim is a microcontainer and which will be  the core container for JBoss 5.0.&lt;br /&gt;&lt;br /&gt;Unlike other EJB containers, this can  be used even for standalone applications, junit tests, etc. Ideally, you will  bootup the container in your first statement of your program, and shut it down  in the last statement. I believe, it will be very handy for writing test cases.  And moreover, you can plug this microcontainer with Tomcat, or any  web/application server for that matter. Anyhow, for the time being, it is  absolutely handy to dabble with EJB3.&lt;br /&gt;&lt;br /&gt;All you need is Java 5, and the  microcontainer. CLASSPATH setting is pretty simple, conf directory and all jars  in lib directory of microcontainer need to be added. JBoss Embeddable EJB 3 can  be downloaded &lt;a href="http://www.jboss.com/products/list/downloads#ejb3"&gt;here  [http://www.jboss.com/products/list/downloads#ejb3]&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5790781099328190889-37293661282363314?l=pcthinkingcap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pcthinkingcap.blogspot.com/feeds/37293661282363314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5790781099328190889&amp;postID=37293661282363314' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/37293661282363314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/37293661282363314'/><link rel='alternate' type='text/html' href='http://pcthinkingcap.blogspot.com/2005/08/dabbling-with-ejb3.html' title='dabbling with EJB3...'/><author><name>Poorna</name><uri>http://www.blogger.com/profile/02029517338617079244</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5790781099328190889.post-6437765008048911735</id><published>2005-08-01T08:23:00.000-07:00</published><updated>2008-06-03T08:35:00.705-07:00</updated><title type='text'>reading a file that resides inside a jar</title><content type='html'>&lt;div&gt;Most of the time, we end up reading a text or properties file that is  bundled with the application. If the application jar is extracted and run, we  wouldnt have problem in reading the file since it is in the file system now.  But, sometimes we would be running the application as it is, may be using "java  -jar" command or an Applet for example. In this case, the application need to  read the file which resides in the same application jar.&lt;br /&gt;&lt;pre&gt;import java.io.*;&lt;br /&gt;&lt;br /&gt;public class TxtRead&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;  public void read() throws IOException&lt;br /&gt;&lt;br /&gt;  {&lt;b&gt;&lt;br /&gt;      InputStream ios=getClass().&lt;br /&gt;&lt;br /&gt;          getResourceAsStream("test.txt");&lt;/b&gt;&lt;br /&gt;      BufferedReader reader=new BufferedReader(&lt;br /&gt;&lt;br /&gt;          new InputStreamReader(ios));&lt;br /&gt;&lt;br /&gt;      String line=reader.readLine();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;      while (line != null)&lt;br /&gt;&lt;br /&gt;      {&lt;br /&gt;&lt;br /&gt;          System.out.println(line);&lt;br /&gt;&lt;br /&gt;          line=reader.readLine();&lt;br /&gt;&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  public static void main(String[] arg)&lt;br /&gt;&lt;br /&gt;      throws IOException&lt;br /&gt;&lt;br /&gt;  {&lt;br /&gt;&lt;br /&gt;      new TxtRead().read();&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;/home/poorna&gt; cat test.txt&lt;br /&gt;This is a text file&lt;br /&gt;&lt;br /&gt;/home/poorna&gt; javac TxtRead.java&lt;br /&gt;&lt;br /&gt;# Create a manifest file in  META-INF directory with "Main-Class: TxtRead"&lt;br /&gt;&lt;br /&gt;/home/poorna&gt; jar -cvfm  txt.jar META-INF\MANIFEST.MF TxtRead.class test.txt&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/home/poorna&gt;  java -jar txt.jar&lt;br /&gt;This is a text file&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5790781099328190889-6437765008048911735?l=pcthinkingcap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pcthinkingcap.blogspot.com/feeds/6437765008048911735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5790781099328190889&amp;postID=6437765008048911735' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/6437765008048911735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/6437765008048911735'/><link rel='alternate' type='text/html' href='http://pcthinkingcap.blogspot.com/2005/08/reading-file-that-resides-inside-jar.html' title='reading a file that resides inside a jar'/><author><name>Poorna</name><uri>http://www.blogger.com/profile/02029517338617079244</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5790781099328190889.post-2050570519604681122</id><published>2005-07-25T08:21:00.000-07:00</published><updated>2008-06-03T08:34:45.403-07:00</updated><title type='text'>Struts, Spring &amp; Hibernate</title><content type='html'>&lt;div&gt;Some of my friends were trying to compare Struts, Spring and Hibernate.  These were the points which struck me when I thought about these:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Struts:&lt;br /&gt;&lt;/b&gt;It is merely just an implementation of MVC pattern.  You can develop a web application with it.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Spring:&lt;/b&gt;&lt;br /&gt;This  framework has a whole lot of implementations apart from MVC. It enables  applications to be developed with simple POJOs. Declarative transaction, data  access framework, dependency injection - all for POJOs. No plumbing code,  properties, or lot of XMLs, all these are taken care by dependency injection and  inversion control.&lt;br /&gt;&lt;br /&gt;The main selling point here is that one do not need  to write EJB now in order to achieve the declarative transaction and security.  POJO + Spring will be able to deliver that.&lt;br /&gt;&lt;br /&gt;So, this framework is not  only for the web application but can be considered for the wide range of J2EE  applications when compared with Struts.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Hibernate:&lt;/b&gt;&lt;br /&gt;Spring  doesnt have any Object relational mapping implementation, rather allows a  generic data access mechanism, wherein JDBC or Hibernate can be used. Normally  Hibernate is the option for the developers who use Spring, that is the reason  why Hibernate comes into the picture when they talk about Spring. Apart from  that, there is one major relation between Spring and Hibernate is that both are  POJO based. That is, Hibernate enables us to write a POJO and map it with a  datastore, rather than developing an entity bean and end up writing lot of  plumbing code.&lt;br /&gt;&lt;br /&gt;Sounds, Spring + Hibernate is very easy to develop,  deploy and test POJO based components, which can be transactional, secure,  mapped to a datastore. So, would it take over EJB in future? May be EJB 3.0 is  the answer for this!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5790781099328190889-2050570519604681122?l=pcthinkingcap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pcthinkingcap.blogspot.com/feeds/2050570519604681122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5790781099328190889&amp;postID=2050570519604681122' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/2050570519604681122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/2050570519604681122'/><link rel='alternate' type='text/html' href='http://pcthinkingcap.blogspot.com/2005/07/struts-spring-hibernate.html' title='Struts, Spring &amp; Hibernate'/><author><name>Poorna</name><uri>http://www.blogger.com/profile/02029517338617079244</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5790781099328190889.post-2444259440218883018</id><published>2005-07-14T23:44:00.000-07:00</published><updated>2008-06-03T08:34:31.326-07:00</updated><title type='text'>Is Java still a beginner's language?</title><content type='html'>&lt;div&gt;When I started updating myself about the new features of Java 5, realized  that how hard it has become now to understand some of the fundamental concepts  of the language constructs. I am having quite long sessions with Generics  particularly. Adding fuel to that, recently have read a &lt;a href="http://www.artima.com/weblogs/viewpost.jsp?thread=112552"&gt;blog by Bruce  Eckel&lt;/a&gt;, in which, he says, his 4th Edition of Thinking in Java is delayed  because it takes some time to understand these new features of Java 5,  particularly Generics.&lt;br /&gt;&lt;br /&gt;Learned somewhere that some of the hard learning  concepts may even be stripped down in J2SE 7, which no one is quite sure about.  So I was wondering whether Java is still a beginner's language.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5790781099328190889-2444259440218883018?l=pcthinkingcap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pcthinkingcap.blogspot.com/feeds/2444259440218883018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5790781099328190889&amp;postID=2444259440218883018' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/2444259440218883018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/2444259440218883018'/><link rel='alternate' type='text/html' href='http://pcthinkingcap.blogspot.com/2005/07/is-java-still-beginners-language.html' title='Is Java still a beginner&apos;s language?'/><author><name>Poorna</name><uri>http://www.blogger.com/profile/02029517338617079244</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5790781099328190889.post-5366558218815648450</id><published>2005-06-17T08:31:00.000-07:00</published><updated>2008-06-03T08:34:13.966-07:00</updated><title type='text'>All about site summary</title><content type='html'>&lt;div&gt;Syndication, RSS 0.91, RSS 0.92, RSS 1.0, RSS 2.0, Atom, blah blah  blah....@#$#@&lt;br /&gt;&lt;br /&gt;Have you come across these jargons? I have come across lot  of jargons like these, not only jargons, but different versions, different  formats, even different expansions of one acronym. The funniest of all is the  origin of RSS!!! Then decided not to bother about it but understand the basics.&lt;br /&gt;&lt;br /&gt;I would have an application which will update me about the latest  developements in the subscribed website, often for news or blogs. If you have  subscribed to it, you will be notified whenever there is a new post (news or  blog) is published.&lt;br /&gt;&lt;br /&gt;The website would publish an XML that can be  accessed by an URL (Feed URL), which is read by your client program, parsed and  displayed to you. There are many XML formats, each have its own fancy name.&lt;br /&gt;&lt;br /&gt;Example: RSS 2.0&lt;br /&gt;&lt;pre&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;rss version="2"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;channel&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;title&amp;gt;Title for the Channel comes here&amp;lt;/title&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;link&amp;gt;Channel related URL&amp;lt;/link&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;description&amp;gt;Brief textual description of the Channel&lt;br /&gt;&lt;br /&gt;&amp;lt;/description&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;item&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;title&amp;gt;Title for Channel Item 1&amp;lt;/title&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;description&amp;gt;Description of Channel Item 1&lt;br /&gt;&lt;br /&gt; &amp;lt;/description&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;link&amp;gt;URL for complete article of Item 1&amp;lt;/link&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/item&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;item&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;title&amp;gt;Title for Channel Item 2&amp;lt;/title&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;description&amp;gt;Description of Channel Item 2&lt;br /&gt;&lt;br /&gt; &amp;lt;/description&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;link&amp;gt;URL for complete article of Item 2&amp;lt;/link&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/item&amp;gt;&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&amp;lt;/channel&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/rss&amp;gt;&lt;/pre&gt;This file can be accessed using a URL (called Feed  URL), and the content is constantly updated by the site.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;a href="http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss091.xml"&gt;&lt;br /&gt;BBC  News Feed URL&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The RSS Feed reader (or any news reader application)  basically reads this content, parses it and displays in a friendly mannere.&lt;br /&gt;&lt;br /&gt;Anyone who knows how to parse an XML document can write a reader  applicatiton. There is nothing challenging in writing it, rather it is tedious,  since it has to many syndication formats (if you want to) like RSS (many  versions), Atom, etc.&lt;br /&gt;&lt;br /&gt;There are lot of open source java APIs which allow  you to read RSS feeds for many formats:&lt;br /&gt;&lt;br /&gt;See the &lt;a href="http://java-source.net/open-source/rss-rdf-tools"&gt;&lt;br /&gt;list here  [http://java-source.net/open-source/rss-rdf-tools]&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Almost all of  them I have come across are DOM based APIs except the one from Jakarta, &lt;a href="http://jakarta.apache.org/commons/sandbox/feedparser"&gt;FeedParser  [http://jakarta.apache.org/commons/sandbox/feedparser]&lt;/a&gt; which is SAX  based.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5790781099328190889-5366558218815648450?l=pcthinkingcap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pcthinkingcap.blogspot.com/feeds/5366558218815648450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5790781099328190889&amp;postID=5366558218815648450' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/5366558218815648450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/5366558218815648450'/><link rel='alternate' type='text/html' href='http://pcthinkingcap.blogspot.com/2005/06/all-about-site-summary.html' title='All about site summary'/><author><name>Poorna</name><uri>http://www.blogger.com/profile/02029517338617079244</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5790781099328190889.post-6627748305438401494</id><published>2005-06-08T06:27:00.000-07:00</published><updated>2008-06-03T08:32:30.922-07:00</updated><title type='text'>Blog is fun, wanna create a blog server....</title><content type='html'>&lt;div&gt;Blog is fun!!!&lt;br /&gt;&lt;br /&gt;Read just now that there are 170,000 blogs and 1.9  millions of photos posted every day in MSN Spaces. MSN Spaces is just one  blogger site, if you add up all the bloggers, my goodness, it is mind-blowing!!!&lt;br /&gt;&lt;br /&gt;Okay, those are as far as marketing is concerned, what is in it for  techies?&lt;br /&gt;&lt;br /&gt;If you are a person who is looking to create blogs, you can  just register in some blog site (eg. www.blogger.com) and start posting the  blog. See here to learn more general stuff about blogs.&lt;br /&gt;&lt;br /&gt;But if you are a  techy and want to create a blog server, carry on reading this post. I have tried  out three java open source blog server implementations. All are quite good and  you need to select one, based on your needs.&lt;br /&gt;&lt;br /&gt;Why do you want to create a  blog server? Amidst of numerous free blogging, if you want to create a blog  server, you need to have a good rationale behind it. You can create the server  for two main purposes.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Just to host your blog, you have full independence since you are writing the  server.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;You can host a general purpose blog server like other blog servers.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Here are the options for you:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.simongbrown.com/blog/pebble.html"&gt;Pebble  [http://www.simongbrown.com/blog/pebble.html]&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://blojsom.sourceforge.net/"&gt;Blojsom  [http://blojsom.sourceforge.net/]&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.rollerweblogger.org/"&gt;Roller  [http://www.rollerweblogger.org]&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;And there is one SnipShot  which I havent tested it out.&lt;br /&gt;&lt;br /&gt;Majorly blog servers are two types. One  stores every thing in files, other stores in database. If you are creating a  simple blog server, I think, the file version would suffice.&lt;br /&gt;&lt;br /&gt;All above  mentioned are java web application and are relatively easy to configure except  Roller since you need to set up the database, that is not difficult. Pebble and  Blojsom can be configured in couple of minutes, just copy the jar in /webapps  directory of Tomcat server and hit the page (in case of pebble you need to add a  user in tomcat-users.xml file).&lt;br /&gt;&lt;br /&gt;I have put the comparision here for you  to help:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Pebble&lt;/b&gt;&lt;br /&gt;Posts with Images: Yes&lt;br /&gt;Syndication:  RDF/RSS/Atom&lt;br /&gt;Editable Templates: No&lt;br /&gt;Picture profile: No&lt;br /&gt;Format of  storage: File&lt;br /&gt;Webserver: Tomcat*&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Blojsom&lt;/b&gt;&lt;br /&gt;Posts with  Images: Yes&lt;br /&gt;Syndication: RDF/RSS/Atom&lt;br /&gt;Editable Templates: Yes&lt;br /&gt;Picture profile: No&lt;br /&gt;Format of storage: File&lt;br /&gt;Webserver: Tomcat*&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Roller&lt;/b&gt;&lt;br /&gt;Posts with Images: Yes&lt;br /&gt;Syndication: RSS&lt;br /&gt;Editable Templates: Yes&lt;br /&gt;Picture profile: No&lt;br /&gt;Format of storage:  Database (mysql)&lt;br /&gt;Webserver: Tomcat*&lt;br /&gt;&lt;br /&gt;* Can be deployed in any J2EE  complaint webserver. In that case, deployment, user configurations, etc have to  be done in the server specific manner.&lt;br /&gt;&lt;br /&gt;And there is one &lt;a href="http://www.snipsnap.org/"&gt;SnipShot [http://www.snipsnap.org/]&lt;/a&gt; which I  havent tested it out.&lt;br /&gt;&lt;br /&gt;As we check mails using Thunderbird/Outlook  clients, you access blogs in the same manner. I am just listing the client  applications below here, check it out.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://wbloggar.com/"&gt;wbloggar&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://ranchero.com/marsedit"&gt;MarsEdit&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://ecto.kung-foo.tv/"&gt;Ecto&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.methodize.org/nntprss"&gt;nntp//rss&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;It is  always best to check it out personally. My choice would be Roller, not just  because Sun developed it, but programmer friendly compared to others.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5790781099328190889-6627748305438401494?l=pcthinkingcap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pcthinkingcap.blogspot.com/feeds/6627748305438401494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5790781099328190889&amp;postID=6627748305438401494' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/6627748305438401494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5790781099328190889/posts/default/6627748305438401494'/><link rel='alternate' type='text/html' href='http://pcthinkingcap.blogspot.com/2005/06/blog-is-fun-wanna-create-blog-server.html' title='Blog is fun, wanna create a blog server....'/><author><name>Poorna</name><uri>http://www.blogger.com/profile/02029517338617079244</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
