Skip to main content

Posts

Showing posts from June, 2010

Hot Deploy resource file in Spring.

The general way to read a Resource file in Spring is something like this
new ClassPathResource(pathToFile).getInputStream()
However, this will cache the contents of the file (stream) in the class loader. Although this is not a major problem, there may be cases where reading the file fresh everytime (Hot deployable file) is required.

That can be achieved with the following code
new FileInputStream(new ClassPathResource(templateFile) .getFile().getAbsoluteFile());
This will gives cache free control on the file and its content.

(Important) Note:
* Doing the AbsoluteFile way, will always read the content of the file. So if it is being done on a High frequency, A Managed Caching layer must be considered
* AbsoluteFile call will NOT work for resource files inside jars, they have to be in classpath folders (e.g.WEB-INF/classes)

Google Wave: How to create a Live Page on your website using a Public Wave

Yesterday, I created a public live readonly wave and posted it on my blog. Here is how you get it. You need a Wave account. You log into your wave inbox. and start a wave.







Add participant "Public". Note that "Public" is not in your address book. But shows up when start typing public.





Then make the "Public" participant's Access to this wave readonly.






Then get the code to insert from the *Link to wave* menu.








Copy paste it on your website and You get your self a live reporter.

Google Voice for Everyone

Gates are now open. Google voice is now open for public. No invites necessary. I am not sure how Google will be able to give a number for EVERY google account (we have two each, My wife and I), or how it will restrict NON-US users (a billion numbers? NOT possilble) - But from google - "SURPRISE, we are open."

Here is what they have posted:
A little over a year ago, we released an early preview of Google Voice, our web-based platform for managing your communications. We introduced one number to ring all your phones, voicemail that works like email, free calls and text messages to the U.S. and Canada, low-priced international calls and more—the only catch was you had to request and receive an invite to try it out. Today, after lots of testing and tweaking, we’re excited to open up Google Voice to the public, no invitation required.

Father's Day..

For Everyone who is celebrating Father's Day..
May you have the best friend from god, close to you, close to heart..



Miss you Dad. I love you.

Back to US. Back in Time.

And Back to work on Monday.

The US is just as it was when I left. Missing India already. But very excited to start work tomorrow. The journey was very tiring. In the last 6 years, this is the first time I felt so, after flying to or from US. Probably this accounts to the old flights on British Airways.

Note to self: Next time, avoid BA. Old flights, Bad Entertainment system (worst among all airlines so far), Psuedo-Friendly Staff and Customer service. However, Food was exceptional. Overall - Not worth it. Go Qatar (for its Service, Newer aircrafts) or Air India (For Food, Newer aircrafts).

Water Bobbles – no more water bottles waste

Don't buy those water bottles again. Bobbles – is a pet bottle that can be your very own personal water filter – on the GO!! It filters out chlorine and other contaminants as you drink. The filter, replaceable, lasts for about 300 bottles. Does the job for about two months. The filters are available separately.

The Bobble is also a good idea environmentally speaking. As the Bobble website notes, 1.5 million barrels of oil are used annually to make plastic water bottles, most of which are then casually discarded. We had been buying bottled water. Looks like now we'll be drinking from our Bobbles.

(This trip to India this time lasted 6 months. I wish I came to know about this before. I would have saved so many water bottles)

That way

Just back from Vinukonda, AP, India. This trip to India is taking a toll. I am moving around a lot of places and very quickly. Its a lot different from travelling in US. We have a lot more tools and *own* or rental cars. In India you typically travel in public transport (rail or road) - Not many places you want to go can be reached by flight directly. So you generally donot need directions.

But once I had to travel on personal car. There are very few GPSes, let alone - their reliability. However, Google now does come handy. It not only shows directions from one city/town. But is also helpful in taking directions in Cities like Hyderabad, Bangalore and Chennai. The text directions may not be really as good as the *helpful* bystander - but the directions will definitely give a better picture.