admin@glassfish.java.net

Re: [Fwd: Re: Finding out a domains profile???]

From: Lloyd L Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Tue, 13 Feb 2007 14:23:00 -0800

Should some of these queries be added as AMX SystemInfo "features" eg:

final SystemInfo systemInfo = .domainRoot.getSystemInfo();
final boolean usesNSS = systemInfo.supportsFeature
( NSS_KEYSTORE_FEATURE );

javadoc:

https://glassfish.dev.java.net/nonav/javaee5/amx/javadoc/com/sun/
appserv/management/base/SystemInfo.html

Lloyd

On Feb 2, 2007, at 4:59 PM, kedar wrote:

> [as-tech folks: I have copied you all to make sure that we
> have no confusion regarding the "usage profiles" feature for
> GlassFish V2. Again, I know I have to send it to dev alias,
> but I am planning to do much better to explain this feature
> to all. Till then, I am copying you all because I think the
> questions that our QE engineers have are relevant to all.
>
> Sorry for a long e-mail.]
>
>
> Hi Sankar,
>
>
> We don't have an explicit command like that, but we
> do have the AMX API that can tell you whether a particular
> feature is available or not. Also, I have improved the
> returned message when:
>
> - you try to invoke "create-cluster" on a domain that does
> not have cluster support, for example.
>
> Regarding the enterprise and cluster profile differences,
> strictly speaking, there are no differences other than the
> "third-party" software it uses out-of-the box:
> - NSS/JKS
> - HADB ("ha") and in-memory ("replicated")
>
> Both these things can be found out simply by querying the domain
> with e.g. dotted names or JVM options, e.g.
>
> - A particular domain uses NSS if a JVM option
> "-Dcom.sun.appserv.nss.db=${com.sun.aas.instanceRoot}/config
> is defined. It uses JKS, if JSSE properties are defined at
> the JVM level.
> -Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/
> keystore.jks
> -Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/
> cacerts.jks
>
> - A particular domain's clusters (not the domain itself) uses
> HADB, for session persistence, if
> web-container-availability says that the "persistence-type is "ha"
> ejb-container-availability says that the "sfsb-ha-persistence-type
> is "ha"
> and it uses in-memory session replication, if:
> web-container-availability says that the "persistence-type is
> "replicated"
> ejb-container-availability says that the "sfsb-ha-persistence-type
> is "replicated"
>
> So, before you run the positive tests, you should make sure
> that the environment is appropriately setting this stuff. Thus, the
> security
> tests should use JSSE after confirming that server is configured to
> use JKS.
> The only correlation between cluster profile and JKS is that *by
> default* you
> get JKS on a cluster profile domain.
>
> Going ahead, like I have always said, we might have an on-demand
> switching
> on of certain capabilities. e.g. to begin with, a domain might not
> have clusters.
> It may be the case that it switches gears when a node-agent
> suddenly communicates
> with it and it recognizes it.
>
> This is why I want to keep the profile of a domain its "fluid"
> property.
> If I don't do that, we become a 3-profile product and not a 2-
> edition product.
> It gives rise to isPE, isEE kind of code that we *must* defeat in both
> source code and testing code.
>
> I'll urge you to take a look at Issue tracker issue no. 2300 which
> I have
> recently fixed. With that fix, it is possible to create a domain
> like this:
>
> "asadmin create-domain --profile performance ..."
> and if you have a folder like:
> lib/install/templates/performance
> with appropriate things in it, a domain.xml tailored to your
> requirements is created.
>
> I have worked hard on conveying this message. So, please, please
> distribute this e-mail to all you know so that we are on the same
> page.
>
> I have taken liberty to copy "as-tech" on this e-mail and if anyone
> has any questions,
> please let me know.
>
> Regards,
> Kedar
>
>
> Sankar Neelakandan wrote:
>> Hi Kedar,
>> > What are the situations that will make you know a
>> domain's capabilities a priority? Are there test execution issues
>> here?
>>
>> After I create a domain and If I forgot with which profile I
>> created a domain, or simply one doesn't know what are the
>> capabilities of the domain, how should the user can proceed in
>> this situation ?. Delete the existing domain , create a new domain
>> with desired profile , or execute a command like asadmin create-
>> cluster and if it fails assume it is a developer. But again be
>> confused with whether the domain type is cluster or
>> enterprise :-) . There are several occasions in which one would
>> like to find out what are the capabilities of a domain.
>>
>> We need a command like asadmin version -v which provides the build
>> number right away if one is not sure of build id.
>>
>> thanks
>> Sankar
>>
>> shaline gowda wrote:
>>> If anyone needs this info for your testing....
>>>
>>> Shaline.
>>>
>>>
>>> --------------------------------------------------------------------
>>> ----
>>>
>>> Subject:
>>> Re: Finding out a domains profile???
>>> From:
>>> kedar <Kedar.Mhaswade_at_Sun.COM>
>>> Date:
>>> Fri, 02 Feb 2007 11:36:01 -0800
>>> To:
>>> shaline gowda <Shaline.Gowda_at_Sun.COM>
>>>
>>> To:
>>> shaline gowda <Shaline.Gowda_at_Sun.COM>
>>> CC:
>>> Sudipa Bhattacharya <Sudipa.Bhattacharya_at_Sun.COM>
>>>
>>>
>>> Shaline,
>>>
>>> Do you mind copying everyone in the QE org?
>>>
>>> This is a good question and the one that comes often.
>>> And it will be help others if they too have it.
>>>
>>> All I'd say at this point (and like I have always said
>>> and believed in past :) ) is that a domain's create-time
>>> profile is only a fluid property. It is a convenience to
>>> "create" a domain with certain facilities, rather than
>>> morphing a given domain into something that behaves in a
>>> certain manner. This is the reason I have cut the links between
>>> a domain's runtime behavior and the profile used for its
>>> creation.
>>>
>>> I agree that it is a rather confusing at the first sight, but
>>> we must look into where we are going with it. Check out the
>>> issue tracker issue no. 2300 (https://glassfish.dev.java.net/
>>> issues/show_bug.cgi?id=2300)
>>> for which I have checked in the changes yesterday.
>>>
>>> Basically, a profile is like a blue-print or a skeleton. It
>>> - decides what configuration the domain has to start with, and
>>> - provides an easy means to preconfigure a domain to have
>>> certain capabilities.
>>>
>>> With the support for 2300, the possibilities are infinite. You,
>>> as a user can:
>>> - provide your own domain.xml style sheets
>>> - look into guidelines on how we invoke them (I will document it)
>>>
>>> create a domain of your choice.
>>>
>>> Coming back to the issue of knowing what profile the domain *was*
>>> created,
>>> at the moment, we don't provide any way to do that owing to above
>>> reasons.
>>>
>>> Going ahead, like I conveyed to Judy He, we should depend on a
>>> functionality,
>>> rather than installation type, because cluster profile IS
>>> available on
>>> PE installer. In fact, if you have any installer, you can get any
>>> profile.
>>> See bug 6511165 that will make things clear.
>>>
>>> What are the situations that will make you know a domain's
>>> capabilities
>>> a priori? Are there test execution issues here?
>>>
>>> Hope this helps.
>>>
>>> Regards,
>>> Kedar
>>>
>>> shaline gowda wrote:
>>>> Hi Kedar,
>>>> I want to know how do we find out which profile a domain is in
>>>> 9.1 ??? I know we can get the developer profile from a PE
>>>> installer and enterprise profile from a EE installer. But is
>>>> there a CLI command which will tell which profile the domain is
>>>> for any installation ??
>>>>
>>>> Or should we always go look around for the configuration
>>>> parameters of the domain to find out .
>>>>
>>>> Thank you
>>>> Shaline.
>>>>
>>>>
>>>>