Showing posts with label glassfish. Show all posts
Showing posts with label glassfish. Show all posts

Wednesday, November 5, 2008

Two More Failures

Two more issues with the production server have been resolved. First, GlassFish JVM settings were modified to make it actually work with only 512MB memory when deploying large .war files. I changed -client to -server and I reduced the max from 512 to 384. Not on the first try mind you. My first guess was to increase the perm gen but then nothing else would run on the server. It also took a lot of research to figure out how to have OpenSolaris forward http requests on port 80 to GlassFish running on port 8080. Most of the information I was initially finding was for using iptables on Linux. OpenSolaris doesn't have iptables and the previous way of using the inetd.conf file is no longer correct. So it took forever to find what is a very easy change. Enable ipfilter like so:

svcadm enable network/ipfilter
Then create an ipnat.conf file in the /etc/ipf directory with the following contents:

rdr xnf0 your.ip.add.ress/32 port 80 -> 127.0.0.1 port 8080 tcp

Load the file by using the -f attribute with ipnat:

ipnat -f /etc/ipf/ipnat.conf

Now the application can be deployed. But... in an effort to shrink the .war file, which was originally just short of 30 MB, I took out the fun features. This has left Q2OH an extremely simple application. So Q2OH 1.0 will be the Internet's simplest application.

Thursday, October 23, 2008

Now This Is Cool

This sounds like an interesting demo. Sun has GlassFish playing two-player Tic Tac Toe over the Internet in a browser. Check out the blog post here.

Monday, October 20, 2008

Have a Test Server Ready

If we are trying to take advantage of free hosting, how did we happen to have a test server ready? Motivated by an excellent article, Build a (Very) Inexpensive Solaris 10 Workstation, I built a server out of spare parts and $150. One of the things that kept the cost so low is the long list of compatible hardware for OpenSolaris. We re-used a case (including power supply), optical drive, and hard drive. Newly purchased for the project were motherboard, CPU, CPU cooling fan, and memory. The easy-to-use package manager made installing GlassFish and MySQL a breeze, even without much experience running Solaris. Configured with a static IP address instead of using NWAM and an account at DynDNS the test environment was a lot less expensive then paying monthly hosting costs for a virtual server with similar specs.

Thursday, October 9, 2008

First Failure

Well that didn't take long. Filters seem to be working differently between the development and test environments. This is why we test, right. Dev is a Windows XP notebook running Jetty. Test is an OpenSolaris x86 box running GlassFish. I am glad to have a test server running OpenSolaris and GlassFish so this didn't happen on the production site. I am using a filter with a uri which works fine in dev but appears to not do anything at all in test. It should force all requests to the login page for any user that is not already logged in. I will switch to using (controller:'*', action:'*') in the filter and see if that changes the behavior on GlassFish. I suspect the way GlassFish uses domains might require the uri to be different from what works on Jetty. Or I could have done something that works for one OS and not the other.