Tuesday, July 27, 2010

Deploying a snapshot onto Artifactory

Can't deploy your artifact onto Artifact? Check the permissions -
Managing Permissions on Artifactory

*Remember to check the Deploy box ;)

Tuesday, May 11, 2010

Get your annotated hibernate tablename :D

Thanks to stackoverflow, I now know how to use reflection with annotations in hibernate!!

Thursday, April 29, 2010

How to profile your app with Memory Analyzer and JConsole



Start java app
Start JConsole and attach as Local (pid for eclipse will be seen once the JConsole starts)
Enter pathname to a *.hprof memory dump file in the dumpHeap (p0 value) in JConsole's MBean tab > HotSpotDiagnostic > Operation
Open the hprof file in Memory analyser in Eclipse

Wednesday, January 6, 2010

Check out what the java compiler is doing to the class file...

with javap command!

*Slap *Slap

From Effective C++, by Scott Meyers :

"Anytime you find yourself writing code of the form "if the object is of type T1, then do something, but if it's of type T2, then do something else," slap yourself.

solution : overriding the method