Re: Cayenne XML Names [wildcard resource lookup]

From: Mike Kienenberger (mkienen..mail.com)
Date: Wed Dec 19 2007 - 11:56:55 EST

  • Next message: Andrus Adamchik: "Re: Cayenne XML Names [wildcard resource lookup]"

    On Dec 19, 2007 11:27 AM, Andrus Adamchik <andru..bjectstyle.org> wrote:
    > > * Have Cayenne resolve all *.cayenne wrappers at the root of the
    > > CLASSPATH upon startup.
    >
    > How are you planning to do that? The only environment independent way
    > that I know of in Java is "ClassLoader.getResources(String)" which
    > requires an exact name, not a pattern. This would work for multiple
    > cayenne.xml in the root of different jars, but won't work for
    > "*.cayenne" (there are some workarounds that may potentially limit
    > portability).

    I think other projects have done this. Here's an issue I hit with it long ago.
    Note that both Spring and Facelets have apparently made this work. I
    don't know a lot about the details, but it's covered somewhat for
    facelets and spring in the following message.

    ---------- Forwarded message ----------
    From: <jaco..ookom.net>
    Date: Dec 23, 2005 1:34 PM
    Subject: Re: " Missing Built-in Tag Libraries!" under Oracle 10.1.2.0.0
    To: user..acelets.dev.java.net
    Cc: user..acelets.dev.java.net

    There are actually two different ways of handling this:

    1) Request the specific file, which works fine off of the resource
    loader: /META-INF/faces-config.xml

    2) Facelets needs to search for all taglib.xml files, so it does:

    /META-INF/

    Then walks through the classloader for each resource returned over
    /META-INF/ for any taglib.xmls

    This is working fine in all but OC4J :-/

    Mike Kienenberger <mkienen..mail.com> wrote on 12/23/2005, 06:54:15 PM:
    > On 12/23/05, Sebastián Fiorentini
    > wrote:
    > > Mike, I'm using OC4J and the only way to make things work is to specify the
    > > fecelets taglib in web.xml with the
    > >
    > >
    > > facelets.LIBRARIES
    > >
    > > There is a bug within OC4J ClassLoader.getResources that makes the things
    > > go wrong (for example, the Spring guys are dealing with the same horrible
    > > problem at
    > > http://opensource2.atlassian.com/projects/spring/browse/SPR-665).
    > > By the way it seems to be fixed by OC4J 10.1.3 (in EA phase now)
    >
    > The problem with that workaround is that I have to do it for all jars
    > with facelet config files, which I can do if that's the only issue.
    >
    > Any thoughts on why it works (I'm guessing it works, at least) with
    > META-INF/faces-config.xml files but not META-INF/*.taglib.xml files?
    >
    > Is MyFaces using a different methodology for finding faces-config.xml files?
    >
    > Is anyone successfully using OC4J 10.1.2 with MyFaces?
    >



    This archive was generated by hypermail 2.0.0 : Wed Dec 19 2007 - 11:57:43 EST