users@javaee-spec.java.net

[javaee-spec users] Re: [jsr342-experts] Minimal profile ?

From: Craig Ringer <craig_at_postnewspapers.com.au>
Date: Mon, 02 Jul 2012 08:49:16 +0800

On 06/30/2012 05:34 AM, Antonio Goncalves wrote:
> Hi all,
>
> Four years ago, when we were building Java EE 6, we had this idea of a
> minimal profile that Roberto blogged about
> (http://weblogs.java.net/blog/robc/archive/2008/02/profiles_in_the.html).
> The idea was to standardise "Tomcat-like" application servers with a
> minimal profile containing Servlets and JSPs. So we would have had
> this "minimal" profile, the web profile and the full one. We mostly
> voted no on this minimal profile, and I was one of them.
>
> I've spent the week migrating a JSF 1.2 application running on Tomcat
> to JBoss 6 EAP (which comes with JSF 2.0). Now I'm trying to run an
> application with JAX-RS 2.0 running on GlassFish 3.x (which comes with
> JAX-RS 1.1). On both cases, it's hell. This would be easier if I could
> have used a JBoss 6 EAP Minimal Profile (or a GlassFish 3.x Minimal
> Profile) and bundle my own external jars like I do with Tomcat.

That'd be useful IMO. While in theory Java EE components like the JPA
implementation can be overridden or swapped out, in practice it can be
quite tricky to do so in some EE app servers because they make such
strong assumptions about what you'll be using.

A profile that doesn't activate any bundled JAX-RS, JAX-WS, JSF2 or JPA2
implementation would be nice. You still get JTA, EJB 3.1, CDI, etc, but
get to choose your own presentation/interaction technologies.

Theoretically this should be easy in JBoss AS 7.x because of its modular
nature allows you to turn built-in modules off using
jboss-deployment-structure.xml . In practice - it isn't well tested and
means that the default impl is often the only one that behaves well.

Having a clear separation between services that application servers
should support swapping out and services that're part of the
non-user-replaceable guts would IMO be quite helpful. "Change JPA
implementations if you want, but Weld is wired in and won't come out no
matter how hard you pull".

> I think having a new "Minimal Profile" (a better name would be a
> "Servlet Profile" with just Servlets, EL and JSP) would increase
> modularity in application servers and help applications to migrate to
> Java EE.
I'd want to include CDI support on that list; it doesn't do anything if
beans.xml is absent, it doesn't work well when bundled in a deployment,
and it costs almost zero.

--
Craig Ringer
POST Newspapers
276 Onslow Rd, Shenton Park
Ph: 08 9381 3088     Fax: 08 9388 2258
ABN: 50 008 917 717
http://www.postnewspapers.com.au/