Friday, 23 September 2005

Installing blojsom

« mayatecnologie | Main | The PostMailerPlugin »

I've choosen blojsom after a quick comparison with some other blog software and, in truth, it hasn't been a very meditated decision. Anyway, now I'm enthusiastic of blojsom, in my opinion it is really lightweight and powerful and looks different from the tipical java application, in fact it is inspired by bloxsom and it is really perlish!

Installing blojsom (version 2.26) was easy. I did it on mayatecnologie (system configuration) where tomcat is running with a SecurityManager enabled. Perhaps somebody could find useful my policy configuration:

// blojsom
grant codeBase "file:/usr/share/tomcat4/pic/blojsom/-"
 {
 // deducted by inspection of exceptions' traces in catalina.out
 permission java.lang.RuntimePermission "getClassLoader";

 // deducted by an error message concerning CompressionFilter and
 // exceptions' traces in catalina.out  
 permission java.lang.RuntimePermission 
   "accessClassInPackage.org.apache.catalina.*";
 permission java.lang.RuntimePermission 
   "defineClassInPackage.org.apache.catalina.*";

 // more liberal runtime permissions
 //permission java.lang.RuntimePermission "*";

 permission java.io.FilePermission 
   "/usr/share/tomcat4/pic/blojsom/-", "read, write, delete";
 permission java.io.FilePermission 
   "/var/lib/tomcat4/blojsom/-", "read, write, delete";
 // used by WeatherPlugin
 permission java.net.SocketPermission "www.nws.noaa.gov", "connect";
 // used by PingPlugin
 permission java.net.SocketPermission "rpc.weblogs.com", "connect";
 permission java.net.SocketPermission "rpc.pingomatic.com", "connect";
 // to send mail
 permission java.net.SocketPermission "localhost:25", "connect";

 // more liberal socket permissions
 //permission java.net.SocketPermission "*", "connect";

 permission java.util.PropertyPermission
   "blojsom.installation.directory", "read, write";
 permission java.util.PropertyPermission
   "org.apache.xmlrpc.TypeFactory", "read";

 //permission java.security.AllPermission;

 }
 ;
// end blojsom

Another suggestion for who is using the tomcat4 debian package:
I noted that the RefererLogPlugin wasn't able to write its log on tomcat's shutdown, this was due to the init script that kills every JVM processes without waiting their natural termination. From /etc/init.d/tomcat4:

 su -p $TOMCAT4_USER -c "\"$DAEMON\" stop" \
         >/dev/null 2>&1 || true 
 # Fallback to kill the JVM process in case stopping didn't work
 sleep 2
 start-stop-daemon --stop --oknodo --quiet \
         --pidfile "$PIDFILE" --user "$TOMCAT4_USER" 

I commented out "start-stop-daemon --stop ...", I suppose that it could cause troubles in many other situations other than installing blojsom (especially in application that creates a lot of threads, I guess).

2005-Nov-13 CET: update.

Posted by Nicola Piccinini at 4:03 PM CEST in blojsom/