Short note how JNLP is screwed up in the GlassFish.
You like GlassFish, aren't ya? Now, consider, you want distribute your application over JNLP, as
I did on my radio website. It is an MP3 player with an ability send SMS messages, so far. Note, the website is in Ukrainian language, but you can simply click on that whacky image somewhere in the middle of the article. :-)
Since it is Java Web Start, the way you put it to the GlassFish is using Enterprise Application, then create a client to it, and then put your stuff there, pack as an ".ear" and deploy. Sounds cool, right? Yes, sounds very-very cool. Note that since it is Java Web Start, you don't want to listen to your complaining users for like "WTF is this?!" etc., instead you want your application:
- Be damn fast.
- Be damn small.
- Be damn quick.
However, not with Enterprise Application. Once you've packed your app as ".ear", it will suck up a sh*tload of useless jar's, verify each by unpacking, checking etc. On an average user's Vista laptop, where all the resources went to antivirus and antimalware package, you do not want it happen ever. Some of my users complained they had to wait 8 (eight, EIGHT) minutes to load a very little tiny application, like that one. Take a look what you've got in your cache among other crap: Java EE jar! Application Server runtime! OMG!..
Now... The obvious question is how to cure all this mess to make your 200K application start literally in a moment? Forget stupid Enterprise Application, once you go with JNLP. It is still good if you do EJB things (I do, so far so good). Never touch JEE for client part (make sure it is server thing in your app) and deploy as a simple GUI that talks to your server via webservices (REST or SOAP is fine). Deploy it just manually, as a static data somewhere on the server.
How deploy it manually on GlassFish. I assume you're using NetBeans? If no, you should. :-) So go to the properties of your Project, select "Web Start enabled", sign your jars with an SSL certificate and rebuild all the stuff. In your Project's "dist" folder you will find ready to go app (almost). Then edit codebase URL in order it point to your website over HTTP instead using file:// from local system. Tar/gzip all the dist/ folder with everything inside, scp to your server and unpack to the static folder of the GlassFish ($ROOT/domains/$DOMAIN/docroot) or, if it is GlassFish + Liferay, then look inside deployed Liferay package.
That's it.
P.S. Sun, I hope Oracle will kick your ass very hard to gently encourage you think properly and organize your technology the way it be once actually usable for everyone.