users@javaee-spec.java.net

[javaee-spec users] [jsr342-experts] Re: Re: Re: Modularization Framework/SPI

From: Werner Keil <werner.keil_at_gmail.com>
Date: Thu, 26 Jul 2012 13:58:58 +0200

On Thu, Jul 26, 2012 at 1:41 PM, Jeff Genender <jgenender_at_savoirtech.com>wrote:

> Hi Craig... thanks for the response and I darned well agree with a lot in
> this email ;-)
>
> answers in line...
>
> On Jul 25, 2012, at 7:30 PM, Craig Ringer wrote:
>
> > On 07/25/2012 09:53 PM, Jeff Genender wrote:
> >> In my world, I am seeing users pushing modularity in front of JavaEE
> and we are really missing this boat. A large section of my clients are
> moving to OSGi stacks picking and choosing what they want in their stacks,
> with some building their own JavaEE light containers (JTA, JPA).
> >
> > Can you explain in a bit more detail what problems they're encountering
> that leave them forced to take this option? Application and business
> problems, not just the common "we need X because we've always used it"
> issues I see come up sometimes.
>
> Here are what I usually hear:
>
> 1) The comments made come along the line of the thick stack and having
> resources used by major components that aren't used. Complaint is EE-bloat.
> 2) Ability to hot deploy/undeploy without corrupting the classloaders.
> Example... try to deploy/deploy a war many times in a standard JavaEE
> container until an OutOf Memory exception occurs.
> 3) Ability to provision applications and services on the fly without
> having to reboot - think cloud-like Applications As A Service (AaaS).
> 4) Ability to prevent class clashing with multiple versions. Wanting to
> run multiple applications in the same container without worry for parent
> classloading corruption - the class tree classloading issues.
> 5) Dependent execution. The ability to run transitive dependencies on
> other applications/jars, much like a Unix inti.d or Windows services model.
> i.e. an application can;t run until its other dependent applications are
> running.
>
> OSGi seems to wor in this model, albeit with a great amount of pain.
>
>
> >
> > Do you have people who really must swap out the JTA implementation in a
> an app server with a different one in order to meet business or application
> requirements? JPA I fully understand, but JTA? I'm surprised and interested
> by that.
> >
>
> Yes, many of my clients are interested in the Blueprint JTA implementation
> or use a local resource like Spring. Hence those who want to use Spring
> local transactions can rip out the JTA, or if they need XA, they wire up
> Aries/Blueprint and enable aries-transaction. I see this choice a lot.
>
>
We used ActiveMQ in a project mostly as a temporary and more portable
solution than the WL MQ the client finally managed to get working (somehow[?])
Unfortunately they did not consider e.g. Aries for XA Transactions, but
Spring which you mentioned was sufficient for local transactions, but not
so good for XA, that is what they painfully learned if they really did by
now?[?]


> >
> > I'm having very frustrating problems with the lack of plugability of
> some of the upper layer stuff myself. Hibernate is a very poor fit for the
> needs of an app I'm working on, but getting EclipseLink to integrate well
> into AS7 is a major pain. I appreciate the need for pluggability at least
> at the higher levels of the stack, and it's been a major source of pain for
> me since I started working with Java EE.
> >
> > My comments were specific to CDI and some low level, tightly integrated
> components in the server like the EJB3 implementation, JTA, JCA, etc. These
> are tightly integrated and - from what I've seen in AS7's sources and on
> the bug tracker - the existing SPIs appear inadeaute to allow them to
> simply be swapped out and replaced. I'd *love* to be wrong about this, but
> my experience even trying to swap out theoretically pluggable things like
> JPA implementations argues against it.
> >
> > I would like to see a certain baseline of infrastructure locked in place
> as something thatthe app server does not have to support replacing (it
> still may if it chooses). In exchange, certain higher level components like
> JSF2, JPA2, maybe JAX-RS, etc would *have* to support being swapped out
> with either app-bundled implementations or modules installed in the app
> server. This would give vendors realistic test targets and narrow the
> number of configurations to something (almost) testable. It would also make
> it clearer which specs need really complete SPIs as a priority.
> >
> > As for needing a module system: I could not possibly agree more, and
> think that things like CDI *should* be modules within the app server - for
> app server maintainability and good design. Sure enough you'll see that all
> the low level components in AS7 are modules. I just don't think the spec
> should require the server vendor to support applications swapping out
> arbitrary modules; that needs to be confined to modules implementing specs
> where there's a good enough SPI.
> >
> > The trouble with the module system issue is that JBoss modules is
> probably a bit too basic, and OSGi is (IMO) convoluted and horrible to work
> with. There isn't a really good candidate.
> >
>
> I completely agree with you... but I am just concerned we are going to
> miss the boat if we keep putting this off. ;-)
>
> Jeff
>
>
> > --
> > Craig Ringer
>
>
The assessments about the alternatives almost sound like those about some
of the logging frameworks, but at least Java has SOME (not the best either)
logging mechanism of its own, while there is no equivalent on the
Modularity front.

Werner




35F.gif
(image/gif attachment: 35F.gif)

347.gif
(image/gif attachment: 347.gif)