users@glassfish.java.net

What's the workaround for hardcoded hostnames on Amazon EC2?

From: <glassfish_at_javadesktop.org>
Date: Wed, 20 Jan 2010 08:44:22 PST

I'm trying to build a Linux image on EC2 that includes Glassfish. I know that Sun has provided some pre-built glassfish AMIs, but for various reasons I need to create my own. When Glassfish is installed on Linux it hardcodes the hostname in a number of config files an also in WSDL files. When I bundle this image and launch a new instance using that bundled image, each time the hostname will be different.

I'm not really sure why the hostname has to be hardcoded into all these places, or what the impacts would be of changing them all to something like "localhost" .

I haven't tried out the pre-configured Glassfish AMIs but I would have to think they have found a solution to this problem. Maybe a startup script that modifies the config files?

I've also created Glassfish images for Windows and these seem to have no problems.
[Message sent by forum member 'malcolm83' (mmcrober_at_harris.com)]

http://forums.java.net/jive/thread.jspa?messageID=381982