users@glassfish.java.net

Re: Coping a GlassFish installation from one PC to another

From: <glassfish_at_javadesktop.org>
Date: Mon, 31 Mar 2008 16:33:25 PST

Glassfish doesn't use the registry currently (though I don't know about the Sun installer, it might for its own purposes, but Glassfish per se does not).

In you glassfish/bin directory is an asenv.bat file that has the bulk of the hard coded paths that might need changing.

But truth is, the actual domains are pretty standalone and portable.

The simplest way to migrate is simply install a fresh glassfish on the new machine, and then copy over the domain folder (glassfish/domains/domain1 for example) over to the new machine.

Since the domains hold (or at least should hold) the deploy specific jars, as well as all of the config data, I find it moves quite handily.

There ARE a couple of hard coded paths in the domain, though I don't recall the specifics.

I will say they aren't affecting ME that I know of, but when crawled through a domain tree once looking for paths, I know I found 2 or 3 of them.

Also, there's a jms-host entry that refers to you machine by name for its JMS use. That's in the domain.xml, and can be changed either to localhost (and thus becoming portable) or can be changed after you copy over the domain.

I suggest you undeploy your applications and clear out the log files before you copy the domain over, makes for a cleaner archive. Then deploy you apps normally on the new machine.

All that said, the best solution is to document what changes are needed to your domain (what jars you may need, notably JDBC drivers, connection pools, queues, listeners, javamail, resources, etc.), install fresh, copy the jars over, and key in the changes in through the console. For many, this doesn't take that long, and it has a really good chance of success without a bunch of potentially strange errors and arcane stack dumps.
[Message sent by forum member 'whartung' (whartung)]

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