dev@glassfish.java.net

Re: detecting api versions for Java EE 6 Profile determination....

From: Bill Shannon <bill.shannon_at_sun.com>
Date: Fri, 16 May 2008 12:48:14 -0700

Vince Kraemer wrote:
> I was reading through the ejb 3.1 spec and found the required APIs list
> (section 21.2)
>
> It seems like tools will need to be able to detect which APIs a
> container is supporting at a pretty fine grained level...
>
> Do all/any of the apis listed have a sure-fire way to determine the
> version/subset that is available?
>
> Obviously, I can write a tester... that queries the container to
> determine if all the necessary API are present and have the correct
> version, by doing things like looking up classes and methods, etc....
>
> Do the APIs listed have something better?
>
> For example...could the EJB 3.1 have a method that would tell me whether
> the container had the "full" API or just the "required" subset?
>
> This would be very helpful...

Are you looking for a GlassFish-specific answer, or are you looking
for something that will work with all Java EE 6 products?

With GlassFish you might be able to get some of this information
from OSGi, but I'm not sure we've decided how "stable" the bundle
information is.

At the Java EE level we could require the information used by
java.lang.Package, if that would help.