You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "simon.kitching@chello.at" <si...@chello.at> on 2008/04/02 14:53:06 UTC
Shared module (was Re: JspStateManagerImpl into shared?)
Manfred Geiler schrieb:
> Mario, you are not alone in hating the shared concept. ;-)
>
> This is exactly where the "myfaces-commons-xxx" library comes into
> play, I often mentioned before.
> What we need is a module, that
> 1) has a super stable API
> 2) is used (ie. shared) by the myfaces core(!) as well as other myfaces projects
>
Personally, I think the shared concept works fine.
One problem with a "commons" jar used by core is that Sun Mojarra will
need two jars (jsf-api, jsf-impl) and myfaces will need three (jsf-api,
jsf-impl, commons-whatever.jar). This is rather ugly.
I'm also sceptical that it will be possible to create a "super stable
API". Just look at what is in shared at the moment! And in addition to
the API, the *implementation* will also need to be super-stable. For
example, if a Tomahawk issue (whether bug or new feature) needs changes
in the "commons" module to resolve, then deploying that commons change
will immediately impact myfaces-core too. Suddenly people will be
running a version of myfaces-core together with a commons version that
it was never tested against. I don't like that idea at all. It was
precisely this issue that the shared repackaging idea was invented for.
We can improve the build process by having a maven plugin that
imports-then-renames, rather than messing with the shared project to
generate the per-user variant. That's really quite simple, and could be
a nice general-purpose plugin. The maven-shade-plugin does something
similar, but at the binary level.
Earlier releases of myfaces did not include the "shared" source in the
-sources jar which was a major nuisance. But that is now fixed. So for
most users, there is no need to ever deal with the original shared project.
Regards,
Simon
Re: Shared module (was Re: JspStateManagerImpl into shared?)
Posted by "simon.kitching@chello.at" <si...@chello.at>.
Matthias Wessendorf schrieb:
>
>> I'm also sceptical that it will be possible to create a "super stable
>> API". Just look at what is in shared at the moment! And in addition to
>> the API, the *implementation* will also need to be super-stable. For
>> example, if a Tomahawk issue (whether bug or new feature) needs changes
>> in the "commons" module to resolve, then deploying that commons change
>> will immediately impact myfaces-core too. Suddenly people will be
>>
> +1 that's a side effect
>
>
>> running a version of myfaces-core together with a commons version that
>> it was never tested against. I don't like that idea at all. It was
>> precisely this issue that the shared repackaging idea was invented for.
>>
> yup, I guess I now move to your direction, or...
> base-tomahawk :-) but... that doesn't fly at all.
>
I guess what we really want is for servlet engines to explicitly permit
OSGi use. Then myfaces-core can depend on version X of the "common" lib,
while tomahawk can run in the same webapp using version Y. That would
solve my major objection.
Package-renaming is just a hack to get a similar effect without having
to mess with classloaders.
But with this setup, we would still have people complaining that they do
not know where to put their breakpoints. In fact, it's even worse. At
least with the current stuff, you can clearly see
"o.a.m.shared_core.Foo", rather than dealing with two different
concurrently-loaded versions of the "o.a.m.Foo" class.
How do people interactively debug OSGi apps, I wonder..
Regards,
Simon
Re: Shared module (was Re: JspStateManagerImpl into shared?)
Posted by Matthias Wessendorf <ma...@apache.org>.
> Personally, I think the shared concept works fine.
fine is a bit to much, right? But, yeah it works
>
> One problem with a "commons" jar used by core is that Sun Mojarra will
> need two jars (jsf-api, jsf-impl) and myfaces will need three (jsf-api,
> jsf-impl, commons-whatever.jar). This is rather ugly.
true. but since everybody uses maven... that shouldn't be a big deal, IMO
but I can see that both approves have their "issues"
> I'm also sceptical that it will be possible to create a "super stable
> API". Just look at what is in shared at the moment! And in addition to
> the API, the *implementation* will also need to be super-stable. For
> example, if a Tomahawk issue (whether bug or new feature) needs changes
> in the "commons" module to resolve, then deploying that commons change
> will immediately impact myfaces-core too. Suddenly people will be
+1 that's a side effect
> running a version of myfaces-core together with a commons version that
> it was never tested against. I don't like that idea at all. It was
> precisely this issue that the shared repackaging idea was invented for.
yup, I guess I now move to your direction, or...
base-tomahawk :-) but... that doesn't fly at all.
> We can improve the build process by having a maven plugin that
> imports-then-renames, rather than messing with the shared project to
> generate the per-user variant. That's really quite simple, and could be
> a nice general-purpose plugin. The maven-shade-plugin does something
> similar, but at the binary level.
>
> Earlier releases of myfaces did not include the "shared" source in the
> -sources jar which was a major nuisance. But that is now fixed. So for
> most users, there is no need to ever deal with the original shared project.
+1
-M
>
> Regards,
> Simon
>
>
--
Matthias Wessendorf
further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org