Friday, March 03, 2006

Lammpix, Lamppix Mini, XAMMP and Live CDs

Just another night of hunting for small linux distributions and/or live cds, hovered mostly on Knoppix, Damn Small Linux, and Puppy Linux, when suddenly I came up to Lamppix and Lamppix Mini. I have used XAMMP before, and I'd say that XAMMP is very easy and nifty. And then another very nifty idea: XAMMP (and more) on a live cd. From what I understand from skimming the Lamppix site, Lammpix Mini is intended to be the blank template on which you will install your web application to, and afterwards it should be ready for handing out (most probably as a demo cd). And the docs say that you will (most probably) have to use the BIG Lammpix for your web application development. I infer that you could also make your demo cd the install cd also if you want to. I imagine that you may do this on the boot like "boot demo" or "boot install", similar to most *nix installations.

Unfortunately for those who can't understand German, some XAMMP addons are documented in German. Even some FAQs are in German. And if I may ask (a possibly frequently asked question), what does it all mean in English? One very interesting addon for me is the Tomcat addon (documented in German), and unfortunately I can't understand German.

As for multisession live cds, we may now have use for the space not taken up by installing small-sized ISOs.

References:
http://www.xammp.org
http://www.apachefriends.org
http://www.apachefriends.org/en/xampp.html
http://lamppix.tinowagner.com
http://lamppix.tinowagner.com/en/mini/
http://www.knoppix.org/
http://www.knoppix.net/
http://www.damnsmalllinux.org/
http://www.puppylinux.org/
http://www.puppylinux.com/
http://www.pupweb.org/

Wednesday, March 01, 2006

Hibernate mappings for Internet-disconnected applications

Some time before, my officemates were looking for a way to make the HBMs work even if the application sits on top of a network-disconnected computer. It's only now that I chanced upon the entry in the Hibernate Users FAQ pertaining to this problem. That entry is "Hibernate tries to connect to http://hibernate.sourceforge.net at startup!" The first solution is to use a better XML parser, but in our case, our interest is in using SYSTEM id instead of PUBLIC id in the HBMs.

Simple difference between Hibernate get() and load()

get() and load() both...

Return the persistent instance of the given entity class with the given identifier

but get()...

[returns] null if there is no such persistent instance. (If the instance, or a proxy for the instance, is already associated with the session, return that instance or proxy.)

and load()...

assumes that the instance exists.

therefore...

You should not use this method [load()] to determine if an instance exists (use get() instead). Use load() only to retrieve an instance that you assume exists, where non-existence would be an actual error.

Links:
HIbernate 3 Session API (org.hibernate.Session)
Session.get()
Session.load()