users@javaee-spec.java.net

[javaee-spec users] Re: [jsr342-experts] Platform SPI for determining service availability

From: michael keith <michael.keith_at_oracle.com>
Date: Wed, 12 Dec 2012 14:46:11 -0500

Hi Jim,

The pending configuration service JSR would allow such environment
settings to be both configured and queried for, and at some point it
would provide notification to interested parties when certain settings
were created/active. Since this will be an EE 8 endeavor it
unfortunately won't help us in EE 7, though.

-Mike

On 12/12/2012 2:22 PM, Jim Knutson wrote:
>
> We have a number of specs that are now defining requirements along the
> lines of "when running in an environment that supports XYZ
> specification, you must do blah blah blah." However, there is no
> common way to determine if an environment actually supports XYZ.
>
> In a modular runtime, we could get notified when a specific service
> was registered in a service registry. Maybe someday we will get
> there, but in the meantime, is there some common pattern we can use to
> declare that XYZ is available in the environment? Possibilities that
> come to mind are well known JNDI name strings or system properties. A
> more sophisticated pattern would be to bind an SPI to the JNDI name
> that provided state (i.e. the service is initializing or ready to
> receive requests). Anyway, I think it would be nice if we could come
> up with a more portable way to deal with these "optional" behaviors
> defined in the specs.
>
> Thanks,
> Jim Knutson
> WebSphere Java EE Architect
>