Skip to content

Author Archives: Priyatam

The best 59$, a java developer can ever invest

If you don’t buy this now, you’re either dumb. Or just plainly stupid. For the impatient: it’s a small jar that lets you compile/run/deploy java instantly, like php. I’ts the real HOT DEPLOY that jvm lacks out of the box. No more restarting the server, ever again, even after reconfiguring Spring beans. I used this [...]

JBoss Seam 2.1 Presentation at Java Meetup

Here’s my presentation on JBoss Seam 2.1 from the Boston Java meetup group Introduction To JBoss Seam 2.1 View more presentations from Priyatam M.

Generic Entity Converter for JSF / Spring / JPA

If you’ve come across Seam’s <s:convertEntity> and wondered why isn’t one there for JSF, here you go: Before using this, you should’ve designed your domain model to extend a Base Class (do it, it’s a good practice). In my case, I have BaseIdentityEntity which has an @Id, @Version properties import java.io.Serializable; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; [...]

CAPTCHA Overview and alternatives

I recently evaluated CAPTCHA for a client requirement. Here is a brief overview (Source: blogs, wiki, white papers found on google search) CAPTCHA stands for: “Completely Automated Public Turing test to Tell Computers and Humans Apart”. It refers to a technology familiar to anyone who’s registered on a popular website – the “what word is [...]

Mapping a clob type in hibernate and oracle 9i/10g

The easiest way to map a CLOB type of Oracle to a pojo in Hibernate, is to setup a user defined type in Hibernate, which converts Oracle’s ClobType to a String and vice versa. So you’re pojo’s property is going to be a “String” type. There are only two steps to setting this up: 1) [...]

amazon kindle 2 first impressions & review — it sucks

Amazon is the best place to buy books, cds, electronics and other memorabilia. But what happens if you want your hands in all the pies? After a sloppy launch of Kindle 1, a year ago, Amazon released Kindle 2, hoping that it would be the next best thing, something of a revolutionary device like IPhone. [...]

hotels.com & priceline.com only make bookings in Central Time *only*

So, I was driving on I99, towards San Francisco, two hours away from the airport. I opened the browser on my iPhone. Hotels.com has an iPhone interface. Sweet. It was 9:50pm, I searched for hotels near the SF airport area for the same day. I got 6 results. Now for some reason, the radio was [...]

The next generation of building Swing Applications

A lot of you (including me) have forgotten about Swing, ever since Web 2.0 has taken precedence over rich clients. However, good is coming back! I was browsing through the Java 7 features the other day and came across Swing Application Framework. It brings in the best of the breed concepts of Web and Desktop [...]

Horrible Java Generics syntax

Class Formatter public interface Formatter <t extends Foo> { public List<list<string>> format(List<t> foos); } Class FooFormatter implements Formatter and is strongly typed public class FooFormatter<foo> implements Formatter { public List<list<string>> format(List<foo> beans) { return null; } } When you compile the above (or see the red marks in your IDE), you get the following compiler [...]

Converting checked exceptions to Runtime, as a language feature

You might already know how frustrating it is to add a try catch block on those java.io api and date parsing API. The reality is, when such exceptions occur, something terrible most probably happened and you don’t want your application to proceed normally. Ofcourse, you can have a try catch block and convert checked exceptions [...]