admin@glassfish.java.net

Re: Fwd: Re: A question on getAvailabilityServiceEnabled()

From: Shing Wai Chan <shing.wai.chan_at_oracle.com>
Date: Thu, 14 Jul 2011 11:03:17 -0700

Yes, this is how we choose to which feature factory to used.
Btw, please cc email explicit in the discussion as I am not in the alias.
I will do the option C with both config-api and domain.xml template changes.
If there is any further comments, then please let me know.
Shing Wai Chan
>
>
> -------- Original Message --------
> Subject: Re: A question on getAvailabilityServiceEnabled()
> Date: Thu, 14 Jul 2011 10:38:39 -0700
> From: Mahesh.Kannan_at_Oracle.Com <Mahesh.Kannan_at_oracle.com>
> Reply-To: admin_at_glassfish.java.net
> To: admin_at_glassfish.java.net
>
>
>
> Agree with Jerome that Option C is the easiest.
>
> Regarding why there are so many different settings, yes it is possible
> to deploy an app that has web container ha 'on' but ejb container ha
> 'off'. Its been like this since 8.x days
>
> Having said that, I looked into the WebContainer.java and it looks like
> the call to habitat.getComponent(WebContainerFeatureFactory.class,
> featureFactoryname) may be modified to avoid loading
> HAWebContainerFeatureFactoryImpl. I could be wrong here but will discuss
> this with Shing Wai.
>
> Thanks,
> --Mahesh
>
> On 07/14/2011 02:43 AM, Jerome Dochez wrote:
> > I think c) is probably the least risky.
> >
> > Do we know why we have all those different availability settings ? It's not like we can have web container in HA mode and ejb container not, correct ?
> >
> > Mahesh, any feedback ?
> >
> > jerome
> > On Jul 13, 2011, at 5:42 PM, Shing Wai Chan wrote:
> >
> >> While investigatinghttp://java.net/jira/browse/GLASSFISH-17041
> >> I notice that serverConfigLookup.getWebContainerAvailabilityEnabledFromConfig() = true
> >> out of the box. In other words, we are using HA by default. I don't think this is the desirable behavior.
> >>
> >> While investigating, I find the following:
> >> 1. In domain.xml, we have
> >> <availability-service>
> >> <web-container-availability></web-container-availability>
> >> <ejb-container-availability sfsb-store-pool-name="jdbc/hastore"></ejb-container-availability>
> >> <jms-availability></jms-availability>
> >> </availability-service>
> >>
> >> 2. In admin/config-api:
> >> For AvailabilityService, WebContainerAvailability, EjbContainerAvailability, getAvailabilityEnabled()
> >> has a "true" as default.
> >> Note that JmsAvailability.getAvailabilityEnabled() has a "false" as default.
> >>
> >> There are several possibilities to resolve this issue:
> >> a) remove the<availability-service> in the domain.xml
> >> I do not know whether there is any side effect in admin / admin console side
> >>
> >> b) add availability-enabled="false" to availability-service, web-container-availability, ejb-container-availability
> >> At least, we have to add it to web-container-availability and ejb-container-availability.
> >>
> >> c) change the default value of getAvailabilityServiceEnabled() in AvailabilityService, WebContainerAvailability, EjbContainerAvailability of config-api.
> >>
> >> Any comment?
>