Monday, August 18, 2008

JBoss AOP Made Easy (Included Eclipse WTP)

First of all the documentation is correct, but it's hard to find out the correct steps to follow, so I'll give here a few quick steps valid in case of JBoss 4.x and Java 5 or Java 6.

  • delete server/default/deploy/jboss-aop-jdk50.deployer and replace it with jboss-40-install/jboss-aop-jdk50.deployer
  • move into the new folder and delete common-softvaluehashmap.jar
    (already available) and move javassist.jar to ../../lib/javassist.jar (to replace the jboss providen library)
  • edit server/default/deploy/jboss-aop-jdk50.deployer/META-INF/jboss-service.xml and set the EnableLoadtimeWeaving parameter to true
  • edit the run.bat or run.sh script and add the java option -javaagent:$JBOSS_HOME/bin/pluggable-instrumentor.jar
Now you can start JBoss from command line, but not from Eclipse as it still misses some parameters: just open the Servers view, double click on your JBoss server and in the editor window click on the Open launch configuration link now you have select the Arguments tab and to append the -javaagent:pluggable-instrumentor.jar directive on the list.

Monday, August 11, 2008

Eclipse Plugins

Eclipse is my preferred IDE and here follows a list of plugins I commonly use:
  • Resource Bundle Editor (http://sourceforge.net/projects/eclipse-rbe/)
  • Log4E (http://log4e.jayefem.de/)
  • Maven Integration (http://m2eclipse.codehaus.org/)
  • Subclipse (http://subclipse.tigris.org/)
  • Wicked Shell (http://www.wickedshell.net/)
  • QuickREx (http://www.bastian-bergerhoff.com/eclipse/features)
  • FindBugs (http://findbugs.cs.umd.edu/eclipse)

Saturday, August 9, 2008

PostgreSQL on Windows Vista

Today I experienced a strange behavior of that strange operating system called Windows Vista Premium Edition: I wasn't able to correctly install PostgreSQL 8.2 nor 8.3

At a first look the installation process was ending correctly but whenever I try to start the service or the stand alone server nothing happens. When I tried to start the server from the command line I got something was missing from the installation folder... the entire data subfolder was missing!

After trying without success many installation options I tried to digg into the problem and what I've found is very strange: I don't have the permissions to create that folder!

The strange thing is I had the permission to create the parent installation folder, all the sibling folders containing binaries, extensions and clients... but not the data folder!

I got the short way: I created the data folder, added myself as a user having all rights on the folder then I runned bin\initdb.exe -D data et voilĂ ... the database is ready and working.