dev@glassfish.java.net

Re: Two G/F instances on same box

From: Sameer Tyagi <Sameer.Tyagi_at_Sun.COM>
Date: Sat, 28 Oct 2006 09:40:20 -0400

The reason I need tow instances is that I need to use two different
version so of WSIT
and they are loaded via classpath-prefix from the lib directory.

I landed up doing a second install and it works - but I see how the
create-domain command
makes more sense.

So here is what I assume should be done
-Create another domain
- Modify the classpath-prefix from
classpath-prefix="${com.sun.aas.installRoot}/lib/webservices-rt.jar
to
classpath-prefix="${com.sun.aas.instanceRoot}/lib/webservices-rt.jar

Put the two different jars in the doman1\lib and domain2\lib directory

Are the class loaders isolated at the domain level and wll the
different versions of
webservices-rt.jar be picked up for each domain ?

Thanks
/s



kedar wrote:

> I agree with Vince, partially.
> Also see: Issue Tracker issue # 90.
>
> But for this purpose, please don't do another installation.
> It is a huge overhead and is needless.
>
> Darn! We should document/publicize "asadmin create-domain" command more.
> That is a supported way of doing it. You can create as many
> instances/domains
> as you want (on the same box).
>
> GlassFish users/developers: Please get used to "asadmin create-domain
> --adminuser
> admin --adminport xyzz" command. No need to play around with setup.xml or
> setup-cluster.xml. It is error prone *and* does additional things
> (apart from creating
> the domain, which might negatively side-effect you).
>
> Do I need to blog about this? How about:
>
> http://blogs.sun.com/bloggerkedar/entry/concept_of_a_glassfish_domain
>
> Kedar
>
> vince kraemer wrote:
>
>> Sameer Tyagi wrote:
>>
>>> How do I set up 2 GF instances on the same box ?
>>>
>>> I copied the existing dir and edited the paths in all the files in
>>> the bin dir, edited the configs\asenv
>>> and edited all the ports in the domain.xml.
>>
>>
>> I guess I would recommend doing the 'install' a second time... in
>> your second location...
>>
>> Editing all the various paths and ports is bound to be error prone...
>>
>> If you need to create a second domain (instead of a second install,
>> you might want to try using asadmin's create-domain subcommand.
>>
>> vbk
>>
>>>
>>> However it just hangs after this line
>>> C:\Glassfish2\bin>asadmin start-domain domain1
>>> Starting Domain domain1, please wait.
>>> Log redirected to C:\glassfish2\domains\domain1\logs\server.log.
>>>
>>> Any ideas ?
>>>
>>> /s
>>