The problem with something like "priority" is that it either requires
an absolute priority scale, or another configuration file with an
option like load-on-startup specified for every jar file used.
What really needs to be done is a specification of dependencies.
jar A needs to be able to specify that it's dependent on jar B, C, and
D being processed first. This keeps things relative and doesn't
force either the user or the jar developer from having to specify
(and, more importantly, understand) the individual loading
dependencies for every jar that might be used.
I think it could be something as simple as a list of dependencies
stored somewhere. The loader itself would be responsible for merging
all of the lists into a "safe" loading order (or throwing an exception
if there are dependency cycles). I also think that using the jar
names is unsafe, and using the manifest's "Implementation-Title:" (or
something else that's not subject to arbitrary renaming) would be
better.
For those jars that don't specify a dependency order, it could fall
back to the Issue #: 121 loading (alphabetical by file name)
On 9/28/05, Martin Marinschek <[EMAIL PROTECTED]> wrote:
> You are right - simple naming rules are great! But RoRs naming rules
> try to make it simpler for the user - this one makes it more complex,
> as he has to take care of this ordering.
>
> The users won't want to rename the libs to make this work...
>
> I have carefully thought about it, and I think we will end up with the
> need for a "priority", just like the Z-INDEX in CSS. With all its
> problems, with all its advantages.
>
> @Mike: customizing the comparator doesn't help anything - you finally
> land at the problem again that every lib can provide it's comparator -
> which one is wrapping which, which one takes precedence?
>
> regards,
>
> Martin
>
> P.S.: apart from this, I think the real advantage of RoR is that you
> don't have to restart your ServletContainer on a small change...
>
> On 9/28/05, Ed Burns <[EMAIL PROTECTED]> wrote:
> > >>>>> On Wed, 28 Sep 2005 20:57:34 +0200, Martin Marinschek <[EMAIL
> > >>>>> PROTECTED]> said:
> >
> > MM> What happens if we (or the user) needs to change the ordering?
> > MM> e.g. myfaces-sandbox.jar needs to make sure that the faces-config.xml
> > MM> of myfaces-tomahawk.jar is parsed first.
> >
> > MM> We probably won't rename tomahawk to aaa_tomahawk ;)
> >
> > *You* won't, but the end user can, if it matters that much. Granted,
> > it seems hacky, and it is, but it is very simple. How does RoR solve
> > this sort of thing? They seem to be all about simple naming rules,
> > right? Let's hear some other ideas!
> >
> > Ed
> >
> > --
> > | [EMAIL PROTECTED] | {home: 407 869 9587, office: 408 884 9519 OR x31640}
> > | homepage: | http://purl.oclc.org/NET/edburns/
> > | aim: edburns0sunw | iim: [EMAIL PROTECTED]
> >
> >
>
>
> --
>
> http://www.irian.at
> Your JSF powerhouse -
> JSF Trainings in English and German
>