dev@glassfish.java.net

Re: lopsidedness of domaindir usage?

From: Rochelle Raccah <Rochelle.Raccah_at_Sun.COM>
Date: Wed, 10 Sep 2008 17:27:04 -0700

Hi Kedar,

I'm trying to find out why we use java -jar instead of start-domain from
Ludo. He put in that particular part of the code and I'm guessing there
was a good reason for it, but I don't know what it is =).

Thanks,
Rochelle

Kedar Mhaswade wrote:
> Rochelle,
>
> In V2, in retrospect, we made a mistake. The value of --domaindir
> option on *-domain commands should really assume the value of the
> parent folder of folder where domain's config resides. Thus, --domaindir
> /Users/kedar/domains domain3 implies the command applies to a domain
> whose folder is domain3 in /Users/kedar/domains.
>
> Calling this folder --domaindir is definitely confusing. But it has been
> this way in V2 and is carried forward in v3 as-is for compatibility.
>
> The java -jar way of invoking (introduced in v3) seems to have corrected
> that mistake and probably has created another confusion in that you have
> to specify both domain's folder and domain's name. I am not sure why this
> is so, but what's not clear to me is why you are not using the supported
> and documented "asadmin create/start-domain --domaindir <parent-folder>
> <domain-name>" in your plugin?
>
> Just so it's clear, there is a significant difference in starting the
> server using "asadmin start-domain" and "java -jar ..." and that's you
> take the responsibility of specifying system properties and JVM options
> of interest. Domain.xml is NOT read while doing java -jar, whereas it
> is, while doing "asadmin start-domain".
>
> Hope this reduces the confusion.
>
> -Kedar
>
> Rochelle Raccah wrote:
>> Another question from my experiences in trying to get domaindir
>> support added to the glassfish plugin for eclipse....
>>
>> Assume I have a domain in /Users/rochelle/mydomains/domainMine
>>
>> Using start-domain/stop-domain/list-domains, the domaindir expects the
>> directory which is parent of the domain:
>>
>> ./asadmin start-domain --domaindir /Users/rochelle/mydomains domainMine
>> ./asadmin stop-domain --domaindir /Users/rochelle/mydomains domainMine
>> ./asadmin list-domains --domaindir /Users/rochelle/mydomains domainMine
>>
>> I believe I've tried all of these in both V2 and V3.
>>
>> In V3, I also have the option of using java -jar, but domaindir now
>> expects it to have the domain name in both places! This does not work:
>> java -jar
>> /Users/rochelle/glassfishv3-M1/glassfish/modules/glassfish-10.0-V3-PRELUDE-M1-SNAPSHOT.jar
>> --domaindir /Users/rochelle/mydomains --domain domainMine
>>
>> This does work:
>> java -jar
>> /Users/rochelle/glassfishv3-M1/glassfish/modules/glassfish-10.0-V3-PRELUDE-M1-SNAPSHOT.jar
>> --domaindir /Users/rochelle/mydomains/domainMine --domain domainMine
>>
>>
>> Is this difference in how to specify domaindir intentional? If so,
>> why? I found it extremely confusing...
>>
>> Thanks,
>> Rochelle
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>