<?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-1320821505637683427</id><updated>2012-05-20T08:09:48.974-07:00</updated><category term='Tech'/><category term='News'/><title type='text'>Mano's Tech World</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.manoharviswanathan.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default'/><link rel='alternate' type='text/html' href='http://blog.manoharviswanathan.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>mano</name><uri>http://www.blogger.com/profile/15553914675115659782</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>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1320821505637683427.post-8472051846161886044</id><published>2009-12-12T09:01:00.000-08:00</published><updated>2010-07-25T15:51:24.823-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><title type='text'>Cool Books</title><content type='html'>Sometime back I was asked by Manning Publications to review proposal for a new book on Drools titled 'Drools in Action'. The book looks promising and should be useful for those interested in incorporating an open source and standards based Rule Engine into their applications or services.&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.manning.com/davis/" target="_blank"&gt;Open Source SOA&lt;/a&gt; is another great resource for Java architects looking at implementing SOA-based solutions with open source products without expensive commercial products.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1320821505637683427-8472051846161886044?l=blog.manoharviswanathan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.manoharviswanathan.com/feeds/8472051846161886044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.manoharviswanathan.com/2009/12/cool-books.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/8472051846161886044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/8472051846161886044'/><link rel='alternate' type='text/html' href='http://blog.manoharviswanathan.com/2009/12/cool-books.html' title='Cool Books'/><author><name>mano</name><uri>http://www.blogger.com/profile/15553914675115659782</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-1320821505637683427.post-4766709134769753498</id><published>2008-11-06T02:43:00.000-08:00</published><updated>2010-07-25T15:51:24.745-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><title type='text'>Introducing Famree</title><content type='html'>&lt;a href="http://code.google.com/p/famree/"&gt;Famree&lt;/a&gt; is a web based application intended to bring family members together. The application is an open source project written in Java/Groovy and Grails framework. Famree allows you to build your family tree starting with the root of the family and working your way down.&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Features&lt;/strong&gt;&lt;br/&gt;&lt;ul&gt;&lt;br/&gt;	&lt;li&gt;Manage family tree&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;Rich User Interface&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;RSS feeds of upcoming events&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;Timeline chart indication key events in the family&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;Charts for family composition&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;Administer Announcements, events, and FAQ&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;Configure multiple site administrators with different authorization&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;Template management&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1320821505637683427-4766709134769753498?l=blog.manoharviswanathan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.manoharviswanathan.com/feeds/4766709134769753498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.manoharviswanathan.com/2008/11/introducing-famree.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/4766709134769753498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/4766709134769753498'/><link rel='alternate' type='text/html' href='http://blog.manoharviswanathan.com/2008/11/introducing-famree.html' title='Introducing Famree'/><author><name>mano</name><uri>http://www.blogger.com/profile/15553914675115659782</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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1320821505637683427.post-7797509517147533603</id><published>2008-08-04T03:41:00.000-07:00</published><updated>2010-07-25T15:51:24.700-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><title type='text'>Drools Plugin for Grails Application</title><content type='html'>I have just released a Grails Plugin for Drools. The plugin details can also be found at &lt;a href="http://www.grails.org/Drools+Plugin"&gt;http://www.grails.org/Drools+Plugin&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.jboss.org/drools/"&gt;Drools&lt;/a&gt; is a business rule management system (BRMS) and an enhanced Rules Engine implementation, ReteOO, based on Charles Forgy’s Rete algorithm tailored for the Java language.&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Features&lt;/strong&gt;&lt;br/&gt;&lt;ul&gt;&lt;br/&gt;	&lt;li&gt; Easy implementation of Drools&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;Rules can be stored in file or in database&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;Rules can be dynamically changed without rebuilding or restarting application&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;br/&gt;&lt;strong&gt;Installation&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;grails install-plugin drools&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Usage&lt;/strong&gt;&lt;br/&gt;&lt;ul&gt;&lt;br/&gt;	&lt;li&gt; Install the plugin&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;Verify example rules: http://localhost:8080/your_app/drools/example&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;Create your own rules: http://localhost:8080/your_app/drools and use droolsService in your code&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;br/&gt;&lt;strong&gt;Components&lt;/strong&gt;&lt;br/&gt;&lt;ul&gt;&lt;br/&gt;	&lt;li&gt; DroolsController: Provides CRUD functionality for Drools Rule&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;DroolsService: Fires all rules&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;br/&gt;&lt;strong&gt;DroolsService&lt;/strong&gt;&lt;br/&gt;droolsService.fireRules(resource, ruleKey, objList)&lt;br/&gt;&lt;ul&gt;&lt;br/&gt;	&lt;li&gt; resource: specifies where the rules are stored. ‘file’ or ‘db’&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;ruleKey: identifier for the rule. For ‘file’ resource, this would be the name of the file (eg:ticket_example.drl). For ‘db’ resource, this is the Drools Rule key&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;objList: list of objects that need to be put in session&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;br/&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;A simple Ticket processing system is available in the plugin. This example shows how tickets are processed based on their subscription plan.&lt;br/&gt;&lt;br/&gt;Run the example: http://localhost:8080/your_app/drools/example&lt;br/&gt;&lt;br/&gt;Your console output should be:&lt;br/&gt;&lt;br/&gt;Start processing Ticket # 3&lt;br/&gt;Start processing Ticket # 2&lt;br/&gt;Start processing Ticket # 1&lt;br/&gt;Firing rule Bronze Priority for Ticket # 3&lt;br/&gt;Firing rule Silver Priority for Ticket # 2&lt;br/&gt;Firing rule Gold Priority for Ticket # 1&lt;br/&gt;Firing rule Special Discount for Ticket # 1&lt;br/&gt;&lt;br/&gt;Display on your browser should be:&lt;br/&gt;&lt;br/&gt;Tickets due for processing:&lt;br/&gt;Ticket #1: Customer[Name:Jack, Subscription:Gold, Discount:0%] Status[New]&lt;br/&gt;Ticket #2: Customer[Name:Tom, Subscription:Silver, Discount:0%] Status[New]&lt;br/&gt;Ticket #3: Customer[Name:Bill, Subscription:Bronze, Discount:0%] Status[New]&lt;br/&gt;Firing rules now ...&lt;br/&gt;Tickets after processing:&lt;br/&gt;Ticket #1: Customer[Name:Jack, Subscription:Gold, Discount:5%] Status[Escalate]&lt;br/&gt;Ticket #2: Customer[Name:Tom, Subscription:Silver, Discount:0%] Status[Escalate]&lt;br/&gt;Ticket #3: Customer[Name:Bill, Subscription:Bronze, Discount:0%] Status[Pending]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1320821505637683427-7797509517147533603?l=blog.manoharviswanathan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.manoharviswanathan.com/feeds/7797509517147533603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.manoharviswanathan.com/2008/08/drools-plugin-for-grails-application.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/7797509517147533603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/7797509517147533603'/><link rel='alternate' type='text/html' href='http://blog.manoharviswanathan.com/2008/08/drools-plugin-for-grails-application.html' title='Drools Plugin for Grails Application'/><author><name>mano</name><uri>http://www.blogger.com/profile/15553914675115659782</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>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1320821505637683427.post-341441258857851583</id><published>2008-07-29T03:39:00.000-07:00</published><updated>2010-07-25T15:51:24.691-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><title type='text'>Grails 1.0.3 upgrade issues</title><content type='html'>Recently, we upgraded our application running in Grails 1.0.1 to 1.0.3. Just to give you an idea, the application is pretty complicated involving multiple data sources, complex hibernate mappings with JPA annotations, legacy system, linking tons of external services etc. We had to overcome few significant hurdles to get our application to run in Grails 1.0.3.&lt;br/&gt;&lt;br/&gt;1. Update hibernate-entitymanager.jar (3.3.2 GA) in &lt;project&gt;/lib&lt;br/&gt;&lt;br/&gt;2. Add hibernate-validator.jar (3.0.0 GA) in &lt;project&gt;/lib. Grails 1.0.1 did not require this jar&lt;br/&gt;&lt;br/&gt;3. Changes to g:render taglib.&lt;br/&gt;&lt;g:render template=”templates/my_template.gsp” /&gt; used to work in Grails 1.0.1 template file in _templates/my_template.gsp under grails-app/views/mycontroller/. Now, for Grails 1.0.3 you need to have the template in template/_my_template.gsp.&lt;br/&gt;&lt;br/&gt;4. Issues with domain properties.&lt;br/&gt;my_domain.properties = another_domain.properties. This doesn’t work anymore in Grails 1.0.3, at least in some cases. Had to manually copy properties.&lt;br/&gt;&lt;br/&gt;5. There are definitely issues with complex hibernate mapping involving legacy system. A particular hibernate relationship was throwing javax.persistence.PersistenceException with Grails 1.0.3. We couldn’t figure out the actual reason, had to make the relationship transient and manually manage it.&lt;br/&gt;&lt;br/&gt;6. Changes to taglib g:actionSubmitImage.&lt;br/&gt;The following works fine in Grails 1.0.1.&lt;br/&gt;&lt;g:form name="myForm" action="myAction"&gt;&lt;br/&gt;&lt;g:actionSubmitImage value="Show" src=".." /&gt;&lt;br/&gt;&lt;/g:form&gt;&lt;br/&gt;&lt;br/&gt;In Grails 1.0.3, you will need to change to &lt;g:actionSubmitImage value="Show" src=".." action=”myAction” /&gt;&lt;br/&gt;&lt;br/&gt;7. Issues with blank spaces in directories in Windows:&lt;br/&gt;This is the nasty one and can drive you crazy. You may have problems running the app or executing tests. Errors such as java.util.zip.ZipException: The system cannot find the path specified or error trying to scan &lt;jar-file&gt; etc could be noticed. These errors are due to blank spaces in JAVA_HOME(c:\Program Files\..) and user.home (c:\Documents and Settings\..). To fix this:&lt;br/&gt;&lt;br/&gt;    * Re-install Java in directory without blank spaces (c:\Java\..)&lt;br/&gt;    * By default, the project is built in ${user.home}/.grails. We can change this location by specifying the user.home property in command-line such as grails -Duser.home=c:\ run-app or grails -Duser.home=c:\ test-app&lt;br/&gt;&lt;br/&gt;Grails 1.0.3 seems much faster than Grails 1.0.1 and is probably worth the trouble.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1320821505637683427-341441258857851583?l=blog.manoharviswanathan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.manoharviswanathan.com/feeds/341441258857851583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.manoharviswanathan.com/2008/07/grails-103-upgrade-issues.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/341441258857851583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/341441258857851583'/><link rel='alternate' type='text/html' href='http://blog.manoharviswanathan.com/2008/07/grails-103-upgrade-issues.html' title='Grails 1.0.3 upgrade issues'/><author><name>mano</name><uri>http://www.blogger.com/profile/15553914675115659782</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-1320821505637683427.post-7255211814345013589</id><published>2008-06-12T03:38:00.000-07:00</published><updated>2010-07-25T15:51:24.666-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><title type='text'>Hosting Services for Grails Application</title><content type='html'>I was looking for a hosting service for running my Grails and other Spring enabled Java applications. I was looking at both shared and virtual private servers. My Budget was $20.&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;GoDaddy:&lt;/strong&gt; I was already using GoDaddy hosting services with Java support for about $7/month. While they claim to support Java applications, in practice it can run only simple ‘Hello World’ applications. They do not allow Spring/Hibernate enabled applications. So, this is not an option.&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;EATJ:&lt;/strong&gt; They have a free service that allows you to upload war, restart your Tomcat. (But the server is automatically shutdown every 6 hours). This run Grails application. The Basic service with no server shutdown is $10/month. They offer only 64MB. What can you run with only 64MB? The next level of service offers 128MB and costs $20/month. You can upload your WAR, restart server. Nothing more.&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;RimuHosting:&lt;/strong&gt; Offers VPS and runs Grails applications. Costs $20/month for 96MB. Lot of features, good support. I have also read good feedback on their service.&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;EAPPS:&lt;/strong&gt; Offers VPS and supports Grails applications. Costs $20/month for 288MB. Tons of features - Tomcat, MySQL, Ruby on Rails, Subversion, Wordpress, ssh/sftp, Apache, mod_jk, mod_proxy, root access etc. I dumped GoDaddy and have been using eapps for last few months. Great customer service.&lt;br/&gt;&lt;br/&gt;My recommendation is eapps.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1320821505637683427-7255211814345013589?l=blog.manoharviswanathan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.manoharviswanathan.com/feeds/7255211814345013589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.manoharviswanathan.com/2008/06/hosting-services-for-grails-application.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/7255211814345013589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/7255211814345013589'/><link rel='alternate' type='text/html' href='http://blog.manoharviswanathan.com/2008/06/hosting-services-for-grails-application.html' title='Hosting Services for Grails Application'/><author><name>mano</name><uri>http://www.blogger.com/profile/15553914675115659782</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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1320821505637683427.post-3297608796149556433</id><published>2008-03-22T03:35:00.000-07:00</published><updated>2010-08-09T15:29:32.014-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><title type='text'>License management plugin for Grails application</title><content type='html'>I have been recently working on a plugin that provides ability to securely create, install and verify license for closed source grails applications. This plugin utilizes &lt;a href="https://truelicense.dev.java.net/"&gt;TrueLicense&lt;/a&gt; Library Collection (TLC). You can download the plugin &lt;a href="http://grails.org/plugin/license"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Installation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;grails install-plugin&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Usage&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;* Generate license file: grails generate-license&lt;br /&gt;* Start app: grails run-app&lt;br /&gt;* Instal/verify license at http://localhost:8080/your_app/license. If you try to access your app without installing license, you will be redirected to this page.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Components&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;* /plugins/license-0.1/etc/privateKey.store - private key file. This never gets included in your WAR. (You should generate your own private/public keys with keytool command. see tips section below)&lt;br /&gt;* /plugins/license-0.1/etc/LicensePrivateConfig.properties - holds all necessary configuration to create a license such as issuer, holder, validity etc. Again not included in WAR&lt;br /&gt;* /plugins/license-0.1/conf/publicCerts.store - public key file. This is included in WAR&lt;br /&gt;* /plugins/license-0.1/conf/LicensePublicConfig.groovy - holds all necessary information required for the client. Included in WAR&lt;br /&gt;* /plugins/license-0.1/controller/LicenseController - Install, verify license&lt;br /&gt;* /plugins/license-0.1/services/LicenseService - Install, verify license&lt;br /&gt;* /plugins/license-0.1/conf/LicenseFilter - defines which controllers, actions need to be protected.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Tips&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;* To generate private key:&lt;br /&gt;keytool -genkey -alias privatekey -keystore privateKeys.store&lt;br /&gt;* To generate public key&lt;br /&gt;keytool -export -alias privatekey -file certfile.cer -keystore privateKeys.store&lt;br /&gt;keytool -import -alias publiccert -file certfile.cer -keystore publicCerts.store&lt;br /&gt;* The system preferences are stored in the registry in windows and file system (/etc/.java/) in Linux. You may need appropriate permissions to be able to do this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1320821505637683427-3297608796149556433?l=blog.manoharviswanathan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.manoharviswanathan.com/feeds/3297608796149556433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.manoharviswanathan.com/2008/03/license-management-plugin-for-grails.html#comment-form' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/3297608796149556433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/3297608796149556433'/><link rel='alternate' type='text/html' href='http://blog.manoharviswanathan.com/2008/03/license-management-plugin-for-grails.html' title='License management plugin for Grails application'/><author><name>mano</name><uri>http://www.blogger.com/profile/15553914675115659782</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>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1320821505637683427.post-2720810452277620745</id><published>2007-12-12T02:33:00.000-08:00</published><updated>2010-08-09T15:30:53.320-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='News'/><title type='text'>Picasa Google Gadget - Updated</title><content type='html'>Last year, I created a simple gadget to fetch my Picasa albums. Since then, I have received numerous requests to provide additional features and functionality. While I continued to support the gadget and provided simple enhancements, I couldn’t find time to look at the major ones. Finally, I did spend some time and I have just released an updated version with the following features:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Display random photos from Picasa albums at specified intervals&lt;/li&gt;&lt;li&gt;Display description of the photo&lt;/li&gt;&lt;li&gt;Auto width and height adjustment based on screen size&lt;/li&gt;&lt;li&gt;Display private albums&lt;/li&gt;&lt;li&gt;Display albums for your friends&lt;/li&gt;&lt;li&gt;Complete player controls - play, pause, forward, rewind&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;If interested, check this out:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://fusion.google.com/add?moduleurl=http://picasa-google-gadget.googlecode.com/svn/trunk/picasaRandomPhotos.xml"&gt;&lt;img alt="" class="alignnone" height="17" src="http://buttons.googlesyndication.com/fusion/add.gif" title="Add Picasa Gadget" width="104" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1320821505637683427-2720810452277620745?l=blog.manoharviswanathan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.manoharviswanathan.com/feeds/2720810452277620745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.manoharviswanathan.com/2007/12/picasa-google-gadget-updated.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/2720810452277620745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/2720810452277620745'/><link rel='alternate' type='text/html' href='http://blog.manoharviswanathan.com/2007/12/picasa-google-gadget-updated.html' title='Picasa Google Gadget - Updated'/><author><name>mano</name><uri>http://www.blogger.com/profile/15553914675115659782</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>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1320821505637683427.post-1792893726174953534</id><published>2007-11-05T02:32:00.000-08:00</published><updated>2010-07-25T15:51:24.435-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><title type='text'>Triple boot - Mac OS X, Windows XP &amp; Ubuntu Linux on Intel PC</title><content type='html'>Okay! You decided to have three OS on your machine. After experimenting with various procedures, this worked well for me. Here are the steps:&lt;br/&gt;&lt;br/&gt;Note: This procedure involves re-partioning your system, hence you would lose your data. Please BACKUP your data before you try any of these.&lt;br/&gt;&lt;strong&gt;I. Instal Mac OS X 10.4&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;* Boot your machine with Mac CD. From the Disk Utilities menu, make 3 partitions. I created partitions with sizes 16GB for Mac, 8GB for Windows and 13GB for Ubuntu.&lt;br/&gt;* Format Mac partition with Mac OS X journaled, Windows partition with NTFS and Linux partition with Linux types.&lt;br/&gt;* Instal Mac OS X on Mac partition.&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;II. Instal Windows&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;* Insert windows CD, make sure you select the windows partition.&lt;br/&gt;* Just follow the instructions and complete the installation.&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;III. Instal Ubuntu Linux&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;* Restart the machine with Ubuntu Feisty CD.&lt;br/&gt;* Select the linux partition. You may also need to create a 1GB partition for swap&lt;br/&gt;* Follow instructions and complete installation.&lt;br/&gt;&lt;br/&gt;Now restart the system. GRUB starts and you will have options to choose Ubuntu and Windows. But where is Mac option? Don’t panic! Log into Ubuntu. Add the following entry to /boot/grub/menu.lst&lt;br/&gt;&lt;br/&gt;title Mac OS X (Tiger)&lt;br/&gt;root (hd0,0)&lt;br/&gt;makeactive&lt;br/&gt;chainloader +1&lt;br/&gt;&lt;br/&gt;Restart now. Hopefully you now have options to choose all three OS.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1320821505637683427-1792893726174953534?l=blog.manoharviswanathan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.manoharviswanathan.com/feeds/1792893726174953534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.manoharviswanathan.com/2007/11/triple-boot-mac-os-x-windows-xp-ubuntu.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/1792893726174953534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/1792893726174953534'/><link rel='alternate' type='text/html' href='http://blog.manoharviswanathan.com/2007/11/triple-boot-mac-os-x-windows-xp-ubuntu.html' title='Triple boot - Mac OS X, Windows XP &amp;amp; Ubuntu Linux on Intel PC'/><author><name>mano</name><uri>http://www.blogger.com/profile/15553914675115659782</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>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1320821505637683427.post-176088893225263559</id><published>2007-09-07T03:28:00.000-07:00</published><updated>2010-07-25T15:51:24.403-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><title type='text'>Setting Wireless Network in Ubuntu Feisty 7.04</title><content type='html'>Recently I installed Ubuntu Feisty 7.04 on my Dell Latitude D600 laptop, but still had to do some work to get wireless working.&lt;br/&gt;For those interested, here are the steps involved:&lt;br/&gt;&lt;br/&gt;    * Determine your Wireless card.&lt;br/&gt;&lt;br/&gt;      lspci | grep -i network&lt;br/&gt;      02:03.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)&lt;br/&gt;    * Disable BCM43XX Driver&lt;br/&gt;&lt;br/&gt;      sudo -s&lt;br/&gt;      echo blacklist bcm43xx &gt;&gt; /etc/modprobe.d/blacklist&lt;br/&gt;      exit&lt;br/&gt;    * Instal ndiswrapper. This enables wireless network cards on Linux by implementing the Windows kernel and NDIS APIs and dynamically linking the vendor’s Windows drivers&lt;br/&gt;&lt;br/&gt;      sudo apt-get install ndiswrapper-utils&lt;br/&gt;    * Get your windows driver&lt;br/&gt;&lt;br/&gt;      wget http://ftp.us.dell.com/network/R151517.EXE&lt;br/&gt;    * Extract driver to MYDRIVER directory&lt;br/&gt;&lt;br/&gt;      unzip -a R151517.EXE&lt;br/&gt;    * Install the driver&lt;br/&gt;&lt;br/&gt;      cd MYDRIVER&lt;br/&gt;      sudo ndiswrapper -i bcmwl5.inf&lt;br/&gt;    * Verify driver, hardware&lt;br/&gt;&lt;br/&gt;      sudo ndiswrapper -l&lt;br/&gt;    * configure ndsiwrapper&lt;br/&gt;&lt;br/&gt;      sudo ndiswrapper -m&lt;br/&gt;      sudo modprobe ndiswrapper&lt;br/&gt;      sudo -s&lt;br/&gt;      echo ndiswrapper &gt;&gt; /etc/modules&lt;br/&gt;      exit&lt;br/&gt;&lt;br/&gt;    * Reboot now!&lt;br/&gt;&lt;br/&gt;    * Test wireless&lt;br/&gt;&lt;br/&gt;      sudo iwlist scanning&lt;br/&gt;&lt;br/&gt;If this is your lucky day, you should have your wireless up and ready.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1320821505637683427-176088893225263559?l=blog.manoharviswanathan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.manoharviswanathan.com/feeds/176088893225263559/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.manoharviswanathan.com/2007/09/setting-wireless-network-in-ubuntu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/176088893225263559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/176088893225263559'/><link rel='alternate' type='text/html' href='http://blog.manoharviswanathan.com/2007/09/setting-wireless-network-in-ubuntu.html' title='Setting Wireless Network in Ubuntu Feisty 7.04'/><author><name>mano</name><uri>http://www.blogger.com/profile/15553914675115659782</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-1320821505637683427.post-5430036825123355242</id><published>2006-12-13T02:26:00.000-08:00</published><updated>2010-08-09T15:32:54.631-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><title type='text'>Licence Management for Java Web Applications Using Aspects</title><content type='html'>This post provides step by setp instruction on implementing license management for Java web applications. I have used open source product &lt;a href="https://truelicense.dev.java.net/"&gt;TrueLicense &lt;/a&gt;for license management and &lt;a href="http://www.eclipse.org/aspectj"&gt;aspects&lt;/a&gt; to weave the license verification into the code.&lt;br /&gt;&lt;br /&gt;TrueLicense Library Collection(TLC) is a collection of Java packages to securely create, install and verify license for closed source products. TLC is rich in features - License can be perpetual or temporary, bound to users, systems or other entity, free trial period implementation, privacy of license content using password based encryption provided by Java Cryptography Extension (JCE), authenticity of license using digital signature mechanism provided by Java Security API etc.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to implement License management&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;What you (Developer) need to do:&lt;br /&gt;&lt;br /&gt;1. You already have your web application (say HelloWorld) and you would like to implement License Management. If this is your case, read on.&lt;br /&gt;2. You may want to add a new page for licene management. The client should be able to see the validity of the current license, and instal new license from this page.&lt;br /&gt;3. Write an ascpect to verify license. The pointcut will specify the critical areas of the application. The right approach is to have the licence verification done in every critical functionality of the application. License verification is a ‘cross-cutting’ concern, and hence we can effectively use aspects to weave license verification into our code.&lt;br /&gt;4. Generate private and public key using keytool command.&lt;br /&gt;5. Generate license file. A license file contains encrypted, digitally signed information.&lt;br /&gt;6. Use AspectJ compiler to compile your application.&lt;br /&gt;7. Use a good Code Obfuscator, such as Proguard to guard against Decompilation tools. This is a very important step in real life situtation. If this step is skipped, hackers could exchange your public key and KeyStoreParam implementation with their their own code and bypass the license verification. Since this is a demo app and I’m lazy, this step is skipped. :)&lt;br /&gt;8. Build your application along with the public key.&lt;br /&gt;9. Distribute application and license file to your client. (NEVER give your private key)&lt;br /&gt;&lt;br /&gt;What your client needs to do:&lt;br /&gt;&lt;br /&gt;1. Pays $$$ and buys your HelloWorld application&lt;br /&gt;2. Fires up the app, navigates to the licenese management page, instals the license file.&lt;br /&gt;3. Uses the app. If the license is expired or not installed, he will not be able to use the application.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Demo Application&lt;/b&gt;&lt;br /&gt;The demo application can be used with Tomcat. &lt;a href="https://sites.google.com/site/manoharviswanathan/Home/LicenseDemo.zip"&gt;Download LicenseDemo&lt;/a&gt;. Please refer README before using the demo app.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to use this Demo&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;1. Unzip HelloWorld-Licensed.zip&lt;br /&gt;2. Run ‘ant clean generateLicense’ from /buildtools folder. This creates a file called sample.lic&lt;br /&gt;3. Run ‘ant clean dist’. This creates HelloWorld-Licensed.war in dist folder.&lt;br /&gt;4. Drop the HelloWorld-Licensed.war file in your webapps folder of Tomcat installation. You are all done!&lt;br /&gt;5. Access the application by http://localhost:8080/HelloWorld-Licensed&lt;br /&gt;&lt;br /&gt;First, access the Greetings page without installing license. The error message should be dislayed.&lt;br /&gt;Next, instal sample.lic from the License management page and then access Greetings page. Later, allow the license to expire and access the Greetings page again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1320821505637683427-5430036825123355242?l=blog.manoharviswanathan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.manoharviswanathan.com/feeds/5430036825123355242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.manoharviswanathan.com/2006/12/licence-management-for-java-web.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/5430036825123355242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/5430036825123355242'/><link rel='alternate' type='text/html' href='http://blog.manoharviswanathan.com/2006/12/licence-management-for-java-web.html' title='Licence Management for Java Web Applications Using Aspects'/><author><name>mano</name><uri>http://www.blogger.com/profile/15553914675115659782</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-1320821505637683427.post-3132735010346225183</id><published>2006-11-22T22:45:00.000-08:00</published><updated>2010-07-25T15:51:24.383-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='News'/><title type='text'>Turkey day is Ubuntu day</title><content type='html'>What do you do on Thanksgiving day when you don’t cook turkey, everything is closed, its raining and too cold to go outside? Say bye to Win-doze and welcome Ubuntu.&lt;br/&gt;&lt;br/&gt;I’m actually surprised that it has taken a long time to make this move ‘cos I use Linux/Unix a lot at work. Now, it feels great for two reasons:&lt;br/&gt;&lt;br/&gt;    * Ubuntu is cool and I love it&lt;br/&gt;    * No more blue screen of death!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1320821505637683427-3132735010346225183?l=blog.manoharviswanathan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.manoharviswanathan.com/feeds/3132735010346225183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.manoharviswanathan.com/2006/11/turkey-day-is-ubuntu-day.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/3132735010346225183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/3132735010346225183'/><link rel='alternate' type='text/html' href='http://blog.manoharviswanathan.com/2006/11/turkey-day-is-ubuntu-day.html' title='Turkey day is Ubuntu day'/><author><name>mano</name><uri>http://www.blogger.com/profile/15553914675115659782</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-1320821505637683427.post-3842245656501417020</id><published>2006-08-29T23:43:00.000-07:00</published><updated>2010-07-25T15:51:24.137-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><title type='text'>Running multiple JBoss instances on the same machine</title><content type='html'>Did you ever had the requirement to run multiple JBoss instances on the same machine? Its a trivial task if you exactly know the parameters to be tweaked.&lt;br/&gt;&lt;br/&gt;Carryout the following steps with your second instance (This is applicable for JBoss 4.0.3):&lt;br/&gt;&lt;br/&gt;    * default/deploy/jbossweb-tomcat55.sar/server.xml&lt;br/&gt;          o change 8080 to 18080&lt;br/&gt;&lt;br/&gt;    * default/conf/jboss-service.xml&lt;br/&gt;          o change 1099 to 11099&lt;br/&gt;          o change 1098 to 11098&lt;br/&gt;          o change 4445 to 14445&lt;br/&gt;          o change 4444 to 14444&lt;br/&gt;&lt;br/&gt;    * default/conf/jboss-minimal.xml&lt;br/&gt;          o change 1099 to 11099&lt;br/&gt;          o change 1098 to 11098&lt;br/&gt;&lt;br/&gt;    * default/deploy/jms/uil2-service.xml&lt;br/&gt;          o change 8093 to 18093&lt;br/&gt;&lt;br/&gt;Voila! You’re done!!&lt;br/&gt;&lt;br/&gt;Update (04/24/2008):&lt;br/&gt;&lt;br/&gt;Many of you requested steps for current release of JBoss 4.2.2 GA, here it goes:&lt;br/&gt;&lt;br/&gt;    * deploy/jboss-web.deployer/server.xml&lt;br/&gt;          o change 8080 to 18080&lt;br/&gt;          o change 8443 to 18443&lt;br/&gt;          o change 8009 to 18009&lt;br/&gt;    * deploy/http-invoker.sar/META-INF/jboss-service.xml&lt;br/&gt;          o change 8080 to 18080&lt;br/&gt;    * deploy/jbossws.sar/jbossws.beans/META-INF/jboss-beans.xml&lt;br/&gt;          o change 8080 to 18080&lt;br/&gt;          o change 8443 to 18443&lt;br/&gt;    * deploy/ejb3.deployer/META-INF/jboss-service.xml&lt;br/&gt;          o change 3873 to 13873&lt;br/&gt;    * deploy/jms/uil2-service.xml&lt;br/&gt;          o change 8093 to 18093&lt;br/&gt;    * conf/jboss-service.xml&lt;br/&gt;          o change 8083 to 18083&lt;br/&gt;    * conf/jboss-minimal.xml&lt;br/&gt;          o change 1099 to 11099&lt;br/&gt;          o change 1098 to 11098&lt;br/&gt;    * conf/jboss-service.xml&lt;br/&gt;          o change 1099 to 11099&lt;br/&gt;          o change 1098 to 11098&lt;br/&gt;          o change 4444 to 14444&lt;br/&gt;          o change 4445 to 14445&lt;br/&gt;          o change 4446 to 14446&lt;br/&gt;&lt;br/&gt;There can be many entries of these port numbers in these files. Make sure you change all of them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1320821505637683427-3842245656501417020?l=blog.manoharviswanathan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.manoharviswanathan.com/feeds/3842245656501417020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.manoharviswanathan.com/2006/08/running-multiple-jboss-instances-on.html#comment-form' title='29 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/3842245656501417020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/3842245656501417020'/><link rel='alternate' type='text/html' href='http://blog.manoharviswanathan.com/2006/08/running-multiple-jboss-instances-on.html' title='Running multiple JBoss instances on the same machine'/><author><name>mano</name><uri>http://www.blogger.com/profile/15553914675115659782</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>29</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1320821505637683427.post-1350752998489626885</id><published>2006-07-17T23:40:00.000-07:00</published><updated>2010-08-09T15:35:50.253-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><title type='text'>Developing RESTful Web Services in Java</title><content type='html'>When you think of Web services, SOAP immediately comes to your mind. Not any more! Thanks to REST, there is a simpler way to develop web services. While SOAP is well established with most vendors supporting it, REST is really catching up.&lt;br /&gt;&lt;br /&gt;Representational State Transfer (REST) is an architectural style for distributed hypermedia systems. REST relies on a single application protocol (HTTP), universal resource indicators (URI) and standardized data formats, through XML. It employs established HTTP methods such as GET and POST to direct applications.&lt;br /&gt;&lt;br /&gt;I’m not attempting to explain the concept of REST, there are already enough stuff all over the Internet. You may have noticed that most of the Internet giants offer their services as REST web services. They may be good APIs but not RESTful.&lt;br /&gt;&lt;br /&gt;What is not REST?&lt;br /&gt;&lt;br /&gt;* APIs that involve Plain Old XML over HTTP are not necessarily REST.&lt;br /&gt;&lt;br /&gt;* Using GET for all operations - including insert, updates etc is not REST&lt;br /&gt;&lt;br /&gt;Creating a new Person resource:&lt;br /&gt;GET myhost/api?action=create&amp;amp;item=person&amp;amp;name=mano  Incorrect&lt;br /&gt;POST myhost/api/person&lt;br /&gt;name=mano  Correct&lt;br /&gt;&lt;br /&gt;* Not having distinct URI for first class objects is also a violation of the REST way.&lt;br /&gt;&lt;br /&gt;Retrieving a Person resource&lt;br /&gt;GET myhost/api?item=person&amp;amp;id=202  Incorrect&lt;br /&gt;GET myhost/api/person/202  Correct&lt;br /&gt;&lt;br /&gt;A RESTful service has use http methods such as POST, GET, PUT and DELETE to achieve the basic CRUD operations (create, read, update, and delete). All resources are identified using distinct URIs.&lt;br /&gt;&lt;br /&gt;Framework in Java&lt;br /&gt;&lt;br /&gt;I found Restlet to be a good framework. Restlet ensures that your application can easily be developed in a RESTful manner. Each concept of REST has a corresponding Java interface or class in the Restlet API. Another advantage is the ability to work with multiple protocols (HTTP, JDBC, SMTP, etc.) using the exact same API.&lt;br /&gt;&lt;br /&gt;However, I could not find a good example for restlet + spring + tomcat integration, I took the liberty of writing one. You can download the restdemo application here. Just run ant, drop the WAR in your webapps folder - you are all set.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://sites.google.com/site/manoharviswanathan/Home/RestDemo.zip"&gt;Download RestDemo ZIP&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1320821505637683427-1350752998489626885?l=blog.manoharviswanathan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.manoharviswanathan.com/feeds/1350752998489626885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.manoharviswanathan.com/2006/07/developing-restful-web-services-in-java.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/1350752998489626885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/1350752998489626885'/><link rel='alternate' type='text/html' href='http://blog.manoharviswanathan.com/2006/07/developing-restful-web-services-in-java.html' title='Developing RESTful Web Services in Java'/><author><name>mano</name><uri>http://www.blogger.com/profile/15553914675115659782</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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1320821505637683427.post-162131503984179299</id><published>2006-04-02T04:01:00.000-07:00</published><updated>2010-07-25T15:51:24.069-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><title type='text'>Better jUnit-ing</title><content type='html'>jUnit has been around for a long time. But there are always better techniques to implement old ways. I have provided below an efficient junit aprroach integrated with DbUnit and Spring with support for transaction and hibernate open session. Significant features are:&lt;br/&gt;&lt;br/&gt;    * Integration with DbUnit: DbUnit puts database into a known state between test runs. Pre-loads database with known data set before the test&lt;br/&gt;    * Transaction support using spring: After each test all changes made by the test are rolled back. Hence there is no need to programatically undo channges made by the test. Much cleaner code. (Thanks, Jim)&lt;br/&gt;    * After each test, clear the pre-loaded data set from database&lt;br/&gt;    * Support for open session in view: Web applications using Hibernate with lazy loading need to keep the session open till the view is rendered. (Read more)&lt;br/&gt;&lt;br/&gt;/**&lt;br/&gt;* Junit test integrated with DbUnit and spring. Provides support for&lt;br/&gt;* transaction and open session. This wraps each test method with a&lt;br/&gt;* transaction and rollbacks after the method exits. DbUnit&lt;br/&gt;* is used to load up the table with initial set of values.&lt;br/&gt;*/&lt;br/&gt;&lt;br/&gt;public class MyTest extends AbstractTransactionalDataSourceSpringContextTests {&lt;br/&gt;&lt;br/&gt;private SessionFactory sessionFactory;&lt;br/&gt;private Session session;&lt;br/&gt;private static ConfigurableApplicationContext factory;&lt;br/&gt;private final String[] TABLES = { “EmployeeTable”, “DepartmentTable” };&lt;br/&gt;private final String DATA_FILE = “data.xml”;&lt;br/&gt;private final String[] CONFIG_LOCATIONS = { “spring-context.xml” };&lt;br/&gt;&lt;br/&gt;public static Test suite() {&lt;br/&gt;return new TestSuite(MyTest.class);&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;protected String[] getConfigLocations() {&lt;br/&gt;return CONFIG_LOCATIONS;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;// This method is used to perform any setup operations, such as&lt;br/&gt;// populating a database table, within the transaction.&lt;br/&gt;protected void onSetUpInTransaction() throws Exception {&lt;br/&gt;super.onSetUpInTransaction();&lt;br/&gt;if (factory == null) {&lt;br/&gt;factory = new ClassPathXmlApplicationContext(getConfigLocations());&lt;br/&gt;}&lt;br/&gt;// Load test data using DBUnit&lt;br/&gt;DataSource ds = (DataSource) factory.getBean(”dataSource”);&lt;br/&gt;Connection con = DataSourceUtils.getConnection(ds);&lt;br/&gt;IDatabaseConnection dbUnitCon = new DatabaseConnection(con);&lt;br/&gt;IDataSet dataSet = new FlatXmlDataSet(Thread.currentThread().&lt;br/&gt;getContextClassLoader().getResourceAsStream(DATA_FILE));&lt;br/&gt;try {&lt;br/&gt;DatabaseOperation.CLEAN_INSERT.execute(dbUnitCon, dataSet);&lt;br/&gt;} finally {&lt;br/&gt;DataSourceUtils.releaseConnection(con, ds);&lt;br/&gt;}&lt;br/&gt;// Support of open session&lt;br/&gt;sessionFactory = (SessionFactory) factory.getBean(”sessionFactory”);&lt;br/&gt;session = sessionFactory.openSession();&lt;br/&gt;TransactionSynchronizationManager.bindResource(sessionFactory, new SessionHolder(session));&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;protected void onTearDownAfterTransaction() throws Exception {&lt;br/&gt;// delete table entries&lt;br/&gt;deleteFromTables(TABLES);&lt;br/&gt;// release session&lt;br/&gt;SessionHolder holder = (SessionHolder) TransactionSynchronizationManager.getResource(sessionFactory);&lt;br/&gt;session = holder.getSession();&lt;br/&gt;TransactionSynchronizationManager.unbindResource(sessionFactory);&lt;br/&gt;SessionFactoryUtils.releaseSession(session, sessionFactory);&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;public void testSomething() throws Exception {&lt;br/&gt;// …&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1320821505637683427-162131503984179299?l=blog.manoharviswanathan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.manoharviswanathan.com/feeds/162131503984179299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.manoharviswanathan.com/2006/04/better-junit-ing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/162131503984179299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/162131503984179299'/><link rel='alternate' type='text/html' href='http://blog.manoharviswanathan.com/2006/04/better-junit-ing.html' title='Better jUnit-ing'/><author><name>mano</name><uri>http://www.blogger.com/profile/15553914675115659782</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-1320821505637683427.post-3831401137403883491</id><published>2006-03-31T02:03:00.000-08:00</published><updated>2010-07-25T15:51:24.060-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><title type='text'>Access denied error in MySQL</title><content type='html'>Have you been frustrated with Access denied for user ‘chinnu’@’localhost’ errors even though as root you granted following privileges:&lt;br/&gt;&lt;br/&gt;GRANT ALL PRIVILEGES ON MyDb.* to 'chinnu'@'%' WITH GRANT OPTION;&lt;br/&gt;&lt;br/&gt;While % means any host, you probably did not see the behavior you expected.&lt;br/&gt;&lt;br/&gt;MySQL performs access control in two stages. First, it tries to connect you with the username/password provided. Next, it checks if you have the privileges to perform your request. Entries in tables user, db and host of mysql database are used for access control.&lt;br/&gt;&lt;br/&gt;Lets say this is our user table:&lt;br/&gt;&lt;br/&gt;--------------------&lt;br/&gt;Host      |  User&lt;br/&gt;--------------------&lt;br/&gt;%         |  root&lt;br/&gt;%         |  chinnu&lt;br/&gt;localhost |  root&lt;br/&gt;localhost |&lt;br/&gt;-------------------&lt;br/&gt;&lt;br/&gt;% in Host means ‘any host’ and blank in User means any user or anonymous user. Note that the value % is less specific when compared to value localhost. MySQL, when performing access control, sorts this table with the most-specific Host at the top. So, we have something like&lt;br/&gt;&lt;br/&gt;--------------------&lt;br/&gt;Host      |  User&lt;br/&gt;--------------------&lt;br/&gt;localhost |  root&lt;br/&gt;localhost |&lt;br/&gt;%         |  chinnu&lt;br/&gt;%         |  root&lt;br/&gt;-------------------&lt;br/&gt;&lt;br/&gt;When chinnu tries to login from localhost, there are two matching rows. Guess what, the first match wins. This means that chinnu is effectively logged in as an anonymous user. The anonymous user may not have privileges for MyDb, hence the access denied errors.&lt;br/&gt;&lt;br/&gt;How to verify?&lt;br/&gt;If you managed to connect execute SELECT CURRENT_USER(). If you get result as @localhost and not chinnu@localhost, you have the issue described above.&lt;br/&gt;&lt;br/&gt;How to solve this?&lt;br/&gt;Solution-1: Grant privileges for ‘chinnu’@’localhost’ in addition to ‘chinnu’@’%’&lt;br/&gt;Solution-2: Just get rid of the anonymous user&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1320821505637683427-3831401137403883491?l=blog.manoharviswanathan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.manoharviswanathan.com/feeds/3831401137403883491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.manoharviswanathan.com/2006/03/access-denied-error-in-mysql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/3831401137403883491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/3831401137403883491'/><link rel='alternate' type='text/html' href='http://blog.manoharviswanathan.com/2006/03/access-denied-error-in-mysql.html' title='Access denied error in MySQL'/><author><name>mano</name><uri>http://www.blogger.com/profile/15553914675115659782</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-1320821505637683427.post-5227671838879516004</id><published>2006-01-21T01:55:00.000-08:00</published><updated>2010-07-25T15:51:24.042-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='News'/><title type='text'>Hello Blog world!</title><content type='html'>Hello Blog World! Here I come!!&lt;br/&gt;&lt;br/&gt;Being a web savvy and software geek, I’m probably a late entrant to the blogosphere. But, better late than never.&lt;br/&gt;&lt;br/&gt;Every day in software development, we encounter new problems and we learn new tricks and techniques to solve them. It is interesting to note that most of us have similar issues and are trying to solve the same problem again and again. So, I decided I will make an effort to share my knowledge hoping these would help somebody. While I’m not sure if I would find enough time to put my thoughts in writing, I’m going to give it a fair shot! (Believe it or not, playing with my 2 year old son is lot more fun than geek stuff)&lt;br/&gt;&lt;br/&gt;Happy blogging …&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1320821505637683427-5227671838879516004?l=blog.manoharviswanathan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.manoharviswanathan.com/feeds/5227671838879516004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.manoharviswanathan.com/2006/01/hello-blog-world.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/5227671838879516004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1320821505637683427/posts/default/5227671838879516004'/><link rel='alternate' type='text/html' href='http://blog.manoharviswanathan.com/2006/01/hello-blog-world.html' title='Hello Blog world!'/><author><name>mano</name><uri>http://www.blogger.com/profile/15553914675115659782</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>
