windows vista shadowstorage

April 29, 2010 Comments off

I did a recovery on my laptop running vista, and after that had my partitions split from my c: to several other drives. After a few days, the free space on my c: reduced drastically, even though i did not install any software or store any huge files. And doing a “Properties” on the folders would show only a lesser amount of space, but the drive shows only 8GB free out of 150GB. Not sure of whats going and googling around for a while, found this command to cleanup all the used space.
“vssadmin list shadowstorage” – will show how much space will be used up for shadowstorage, and it was showing 98GB in my laptop.
“vssadmin resize shadowstorage /on=C: /for=C: /MaxSize=500MB”, would reduce the size taken in the disk for shadowstorage. After restarting windows, all the free space was reclaimed. A simple setting but most of my friends suggested it was a bug with vista.

Categories: random Tags: , ,

Accessing private members outside a Java class…

March 18, 2010 Comments off

In a discussion with my colleague, who was bored of writing getter and setter methods for member variables in a Java class, was wondering if there is way to access a private variable or a method of a class outside its scope in a different class. In C++ world, this is quite very much possible using friend classes or probably accessing the address of the object to the class…

In the Java world as well, this is a long existing feature since the introduction of the reflection APIs. A sample code below illustrates how it can be done simply:

A TestObject that has a private member without any public getter and setter methods.

package one;

public class TestObject {
    private String testStr = "Hello World!";

An AccessTest class that reads the value of testStr private member using an object of TestObject class.

package two;

import java.lang.reflect.Field;

import one.TestObject;

public class AccessTest {

    public static void main(String[] args) {
        try {
            Class tObjClass = Class.forName("one.TestObject");
            Field tField = tObjClass.getDeclaredField("testStr");
            System.out.println("TestStr Value: "+tField.get(new TestObject()));
        } catch (Exception e) {

Using the java.lang.reflect APIs any private member or method of a class can be accessed from anywhere. One way to prevent this access is to run the program using a security manager as below:

java – AccessTest

would give the below exception:

access denied (java.lang.reflect.ReflectPermission suppressAccessChecks)

This feature is quite useful in unit testing when there is a need to test the private methods using a test suite.

Categories: tech Tags: , ,

Weekend @ Houston

March 16, 2010 Comments off

Almost for 6 months, all my weekends have been just movies and shopping. Putting together a quick plan to get away from Dallas and spend a weekend sounds better and easier than coding Java. With most of the folks here new to Dallas, everyone were anxious to go on a trip. So Parthi and family, Mugunth, Kishore, Senthil readily accepted the invitation to join the trip. Most of them being first timers to long trips, made the group more bubbling with excitement. Mugunth and myself made the initial arrangements, renting a car, booking the tickets to the attractions at Houston (nothing but just NASA), and most important of all buying the snacks from the Indian store. Even though we planned to leave Dallas by 4AM on Saturday, as usual we started late by more than an hour. With some devotional songs filling the air, Mugunth finally drove us out of Dallas.  03132010032

As the CDs kept changing, “hasile fisile en raasamani” continued by interesting-totally-waste-of-time discussions on movies, heroes and all the comedies. Almost an hour passed by, it was about sunrise after 6AM, and our veteran was in full form with his goggles on… Soon, Senthil, the youngest of all (Kutti – we call him), raised his interest to drive on the highway for the first time. We agreed to let him drive if he would stop his dry poor jokes. After coffee @ Starbucks, continued by breakfast @ BK, Kishore and then Parthi drove, and by the time we reached Houston it was half past 11AM, but Kutti never drove, as he never stopped his PJs in the entire trip.


Meenakshi Amman Temple, one of the biggest temples in US, I would say, is one of the most peaceful too. After praying to Goddess Meenakshi, Lord Sundareswara and Lord Vishnu for “World Peace” and our own prosperity, we went around the temple more than once to find if any “unda katti” is being served. With a camera in everyone’s hand, there was no one to pose for pictures, :)  finally a casual shot from Ramya…who was very happy clicking the Sony cam in whichever angle she could, after I abandoned it since my E72. I did not even care if she was taking a photo, being busy with my phone processing all the photos I took proudly with…Kutti was as usual in his own feelings, no one knows what it is…Parthi and wife were the only ones who seemed to be giving a pose…and no comments on what Mugunth and Kishore were trying to do :)   As the noon sun was bright up on the sky, we started moving towards Pongal and Puliyodharai. With a nominal priced canteen at the temple, we ordered each and everything on the menu and decided to share. Eventually we went for second serving on most of the items. DSC05030

Our next destination was the Space Center, NASA. It was 10 miles away from the temple, and we reached there in about 15 minutes. As soon as we entered the space center, cameras started taking shots of anything and everything that met the eyes. After watching a short movie followed by a run through the exhibits of a space station, highly impressed, Ramya and I decided to buy a plane for ourselves instead of our favorite yellow Corvette… ;)

More than the short movie, the space center had quite a number of exhibits and simulation games, which was worth learning and watching. I was expecting a EPCOT kind of space simulation ride, but that is way too much of an expectation for the ten bucks ticket cost. Only after the trip, talking to my uncle I came to know that NASA has exhibited the famous quotes of  “ஔவையார்”  (Auvaiyar)

“கற்றது கை மண் அளவு, கல்லாதது உலகளவு”

“What you have learnt is a mere handful, What you haven’t is like the world in its size”

which I never came across in this space center.

Next was the tram tour to the “Rocket Park” and “Mission Control Center”. The Mission Control Center, the way it looks, is more like my old Unix lab at college, ignoring what is being done at both places…then the Rocket park, reminded me of my visit to RCI, Hyderabad…watching a real Saturn V, was worth missing two return trams to the space center. It was time to try out the panorama mode on my phone camera, and I guess its not too bad for a mobile cam.


So that was all at Space Center, it was almost sunset, and Galveston Beach was 45 minutes away from NASA. Though it would be dark when we reach there, we still drove all the way. With nothing to see at the beach, we returned immediately. With several options for dinner…seeing Olive Garden crowded to the streets, we finally ended up grabbing several of those “5$ foot longs” from Subway, and headed our way back to Dallas.

Shutter Island

March 10, 2010 Comments off

Martin Scorsese’s main stream film starring Leonardo DiCaprio for the fourth consecutive time, Shutter Island, is based on the novel by Dennis Lehane. The story line is quite usual repeated in many movies of a psycho, killer, dual personality, etc. etc. But the movie is still a classic, portrays the experience of Martin Scorsese as a director. Leonardo has once again given a dramatic performance as in Blood Diamond and The Departed.


The movie is set in 1954, in an island hospital treating insane criminals. The story starts with  Edward (TEDDY) Daniels (Leonardo DiCaprio) from US Marshalls along with Chuck Aule (Mark Ruffalo), deputed for an investigation of a missing person in the hospital. With lot of resistance from the hospital chief Dr.Cawley (Ben Kingsley) to cooperate, Teddy takes the help of Chuck to explore the island and sets out in finding the truth.  In his attempt to reach the lighthouse, meets Rachel Solando the missing person, which unfolds the entire mystery about the island and Teddy decides to get away from the island.  When his accomplice Chuck goes missing, Teddy goes to lighthouse in search of Chuck. He does find Dr.Cawley and Chuck in the lighthouse.  What happens after that is the movie all about…

The movie ends with a question to the audience…

“Do you think it would be worse to live as a monster or die as a good man?”

Yet another classic from Martin Scorsese, depicting the concepts of guilt and redemption. Must watch! Definitely a nominee for Academy Awards!!!

Categories: random

Oracle TimesTen

March 4, 2010 Comments off

Database operations have always been expensive for any high volume application. There have been several techniques to cache data either during application deployment or application activation. Several cache loading mechanisms offer efficient algorithms for replacement policies as well.

The problem I would like to discuss here is a little different. An existing application probably with no thoughts of scalability has been designed and implemented without any caching mechanism. As a stable application, it works for low volume of data, but fails when the data volume exponentially increases. There is a need to plug-in a caching implementation somewhere to handle the suddenly increasing load. The complication comes when the caching mechanism has to connect to a database and sync up data very frequently and the application is deployed across multiple servers distributed. This requirement probably needs a design / code change in most of the situations. Most of the caching software that I came across so far does need a application design change at some point. Some of them do not support ANSI SQL or the Oracle standard.

On the other hand, application development and testing environments can afford mostly up to one or two database instances for several developers working simultaneously. It is not very uncommon that applications store all the configuration data in database tables and the configuration does differ for each environment. One thought would be to have a switch, to change between configurations in a db for functional testing and in a xml file for local / unit testing. But there definitely is a more effective solution to this.

TimesTen is a lightweight in-memory database and also provides caching with Oracle Database (only Oracle). TimesTen is simple to configure as a separate footprint. Does not involve the complexity of creating database, table space, etc. It could be easily connected to any Oracle database remote or local, with some few steps configurations. Not only that, from an application perspective, just a change in the data source configurations were required to enable caching.

In Windows, it took me exactly 10 minutes to configure TimesTen for my Weblogic Application server (more application servers are supported). Initial configuration needs a “System DSN” to be created from the Control Panel. The first time connect to the DSN using “ttisql” command line interface, a database gets created automatically. All the usual SQL commands can be then used to create users, tables, etc.

To connect with an Oracle DB and enable caching, just create a table space and a user in the Oracle DB for TimesTen to store its cache grids. And then its all configuration on the TimesTen database to create dynamic cache loading and performance tuning. I am not getting into any details, better to refer the extensive timesten docs.

Of course this solution for caching is very much limited to Oracle DB but is an ideal solution when an application code change is not viable. For the latter problem, this is one of the fitting solution, where each developer can have a separate instance of TimesTen and sync up with the remote oracle db whenever needed.

Categories: tech

Nokia E72

Nokia E72 – its been a week I bought it.

I have read several reviews of this phone, and most people have been comparing this with iPhone. Apples and Oranges are not same. Clearly this is a phone for business segment, and it does its job really well. Having said that, I must explain why.

A quick glance at its specifications would say most of what it can do. With a 16 million color display and 2.4 inch screen, a good enough resolution to watch a video on YouTube. Symbian S60 3rd Edition running on an ARMS 600Mhz with 128MB RAM and 4GB microSD extension, fast enough to run email, chat and other software. 5MP camera with a powerful flash, can take clear pictures even in low light. The keypad does invite one to type more, adding to it the optical navi key is certainly a smooth way to scroll through the items. The battery is a strong 1500mAh Li-ion and holds for a solid 2 days being connected to mobile internet or Wi-Fi as well as GPS when driving. With such a high end spec better than a Blackberry Bold and its thinner than iPhone, a price tag reading 300 USD is worth the buy.


The basic email and chat applications support Mail for Exchange, Lotus Notes, Google and Yahoo. The phone comes with Office 2007 editor from Quick Office package. It also has a VPN client, printer setup and multi-scanner (card reader software). If you need even more, Nokia Ovi does not let you down with a huge collection of apps to download. The Ovi maps are definitely a plus, with maps downloadable for most of the countries free. Fring and Nimbuzz are supported very well.

More than all this, the phone has a much better camera (5MP) unusual in a business phone, all the music software (MP3, FM, Recorder) and a good number of games.

A get-used-to factor which I count as negative in a way is the applications are installed all over the place. It really is difficult to remember and access them quickly whenever I need them. There definitely is a way to re-group the applications to where I need those, yet to figure out.

To conclude, this phone has certainly re-defined how a business phone should be. Definitely a competitor for all the RIM’s out there.

Categories: reviews

Sonar and Continuous Integration

July 29, 2009 Comments off

My previous blog was about Sonar – the open source code quality management tool. Deploying Sonar in a machine, and then running it manually for every code change is not desirable for many of us. Definitely there must be an automation step possible, to run Sonar whenever there is a change in the code base. It would be really wonderful if a nightly build or a weekly build software can trigger Sonar, and just publish reports about the violations in the code changes recently done. I never expected it be more easier than integrating Hudson with Sonar. Hudson is a widely used continuous integration tool, that works with any kind of version control software like CVS, VSS, SVN, Clear Case, etc.

Hudson is another web based tool where various types of projects can be scheduled to build in any specific interval. Hudson supports projects with Maven, Ant and those do not have any build script as well. It is quite simple to setup Hudson, just download Hudson and start using the command: java –jar hudson.war.

Before configuring a project, install the Sonar plug-in for Hudson from Dashboard –> Manage Hudson –> Manage Plugins –> Available plug-in list. Hudson must be restarted for the plug-in to be applied.

To setup a project in Hudson, create a New Job from the dashboard. Provide a job name and select what type of project needs to be created.


The next page shows up is the job configuration. There are several options that can be configured, from source code management software, build triggers, build settings and post build actions. The post build actions feature Sonar which must be enabled for Sonar to run automatically after the build is complete. Sonar configurations can also be changed appropriately.

Job Configuration


There is a little manual configuration that needs to be done here. The maven project configuration in Hudson does not allow you to specify an absolute path for the pom.xml to be used to build the project. When the project configuration is saved, a workspace directory is created. The pom.xml file used for the project build must be manually copied to the workspace directory for Hudson to perform the build. I wished there is a configuration to specify the pom.xml from any directory. Unfortunately no! Once all the configurations are done, its time to build the project.

From the Hudson dashboard, click on the project name and then do a Build Now, and the project build starts. A progress bar is shown when the build is in progress. Once build is successful, the build history is updated with the build results.


Now the Sonar dashboard can be accessed to view the updated reports. Sonar over-writes the reports that were generated earlier for the same project. So, to compare results of build history, the version in pom.xml must be changed every time manually before the build.


The integration between Sonar and Hudson has been very simple and without much manual work. But still more exploration is needed to find out how Sonar can show incremental differences in the violations rather than over-writing the entire report.

With a whole lot of plug-ins and ease of use Sonar, Hudson & Maven can provide a complete build process solution for any organization.


Get every new post delivered to your Inbox.