FAQ
Hi everyone,

I started using cayenne yesterday and got it up and running in my webapp
alongside wicket. I have question about configuration files: can i put
them somewhere else besides the source root (for wicket it is
src/main/java) and then define that location somewhere - e.g. filter
configuration in web.xml?
Point is I would very much like to have it under src/main/resources
(e.g. like hibernate does) but then I think it probably won't be able to
traceroute the location of mapping classes from package name.

TIA, regards

--
Marek Šabo
Chief Server Manager
Club SU CVUT Buben
Bubenečská Kolej
Terronská 28, Prague 16000
XMPP: zeratul021@gmail.com

Search Discussions

  • Michael Gentry at Dec 31, 2009 at 3:00 pm
    I put my Cayenne configuration files in src/main/resources, at least
    for Maven projects.

    mrg

    On Thu, Dec 31, 2009 at 6:39 AM, Marek Šabo wrote:
    Hi everyone,

    I started using cayenne yesterday and got it up and running in my webapp
    alongside wicket. I have question about configuration files: can i put them
    somewhere else besides the source root (for wicket it is src/main/java) and
    then define that location somewhere - e.g. filter configuration in web.xml?
    Point is I would very much like to have it under src/main/resources (e.g.
    like hibernate does) but then I think it probably won't be able to
    traceroute the location of mapping classes from package name.

    TIA, regards

    --
    Marek Šabo
    Chief Server Manager
    Club SU CVUT Buben
    Bubenečská Kolej
    Terronská 28, Prague 16000
    XMPP: zeratul021@gmail.com
  • Evgeny Ryabitskiy at Dec 31, 2009 at 3:56 pm
    Cayenne is looking for xml files in your jar/war by it's pass. pass is
    Relative (not absolute).
    So when you are building you jar/war you should care that this
    configuration files are placed in jar/war in same manner you are
    configured your application.

    You can use DefaultConfiguration / FileConfiguration to set path to cayenne.xml

    http://cayenne.apache.org/doc20/customizing-configuration.html

    Evgeny.

    2009/12/31 Michael Gentry <mgentry@masslight.net>:
    I put my Cayenne configuration files in src/main/resources, at least
    for Maven projects.

    mrg

    On Thu, Dec 31, 2009 at 6:39 AM, Marek Šabo wrote:
    Hi everyone,

    I started using cayenne yesterday and got it up and running in my webapp
    alongside wicket. I have question about configuration files: can i put them
    somewhere else besides the source root (for wicket it is src/main/java) and
    then define that location somewhere - e.g. filter configuration in web.xml?
    Point is I would very much like to have it under src/main/resources (e.g.
    like hibernate does) but then I think it probably won't be able to
    traceroute the location of mapping classes from package name.

    TIA, regards

    --
    Marek Šabo
    Chief Server Manager
    Club SU CVUT Buben
    Bubenečská Kolej
    Terronská 28, Prague 16000
    XMPP: zeratul021@gmail.com
  • Marek Šabo at Dec 31, 2009 at 4:12 pm
    Hi Evgeny,

    does it use the default configuration which looks in top of classpath,
    which is the src/main/java for me?
    As Michael said he has his conf in src/main/resources and it works
    without mentioning of overriding the default configuration. That
    shouldn't play along, or should it?

    Regards,

    Evgeny Ryabitskiy wrote:
    Cayenne is looking for xml files in your jar/war by it's pass. pass is
    Relative (not absolute).
    So when you are building you jar/war you should care that this
    configuration files are placed in jar/war in same manner you are
    configured your application.

    You can use DefaultConfiguration / FileConfiguration to set path to cayenne.xml

    http://cayenne.apache.org/doc20/customizing-configuration.html

    Evgeny.

    2009/12/31 Michael Gentry <mgentry@masslight.net>:
    I put my Cayenne configuration files in src/main/resources, at least
    for Maven projects.

    mrg

    On Thu, Dec 31, 2009 at 6:39 AM, Marek Šabo wrote:

    Hi everyone,

    I started using cayenne yesterday and got it up and running in my webapp
    alongside wicket. I have question about configuration files: can i put them
    somewhere else besides the source root (for wicket it is src/main/java) and
    then define that location somewhere - e.g. filter configuration in web.xml?
    Point is I would very much like to have it under src/main/resources (e.g.
    like hibernate does) but then I think it probably won't be able to
    traceroute the location of mapping classes from package name.

    TIA, regards

    --
    Marek Šabo
    Chief Server Manager
    Club SU CVUT Buben
    Bubenečská Kolej
    Terronská 28, Prague 16000
    XMPP: zeratul021@gmail.com


    --
    Marek Šabo
    Chief Server Manager
    Club SU CVUT Buben
    Bubenečská Kolej
    Terronská 28, Prague 16000
    XMPP: zeratul021@gmail.com
  • Michael Gentry at Dec 31, 2009 at 4:15 pm
    If you are using Maven, it merges src/main/java (at least the compiled
    classes) and src/main/resources into the top-level classpath.

    mrg
    On Thu, Dec 31, 2009 at 11:11 AM, Marek Šabo wrote:
    Hi Evgeny,

    does it use the default configuration which looks in top of classpath, which
    is the src/main/java for me?
    As Michael said he has his conf in src/main/resources and it works without
    mentioning of overriding the default configuration. That shouldn't play
    along, or should it?

    Regards,

    Evgeny Ryabitskiy wrote:
    Cayenne is looking for xml files in your jar/war by it's pass. pass is
    Relative (not absolute).
    So when you are building you jar/war you should care that this
    configuration files are placed in jar/war in same manner you are
    configured your application.

    You can use DefaultConfiguration / FileConfiguration to set path to
    cayenne.xml

    http://cayenne.apache.org/doc20/customizing-configuration.html

    Evgeny.

    2009/12/31 Michael Gentry <mgentry@masslight.net>:
    I put my Cayenne configuration files in src/main/resources, at least
    for Maven projects.

    mrg

    On Thu, Dec 31, 2009 at 6:39 AM, Marek Šabo wrote:


    Hi everyone,

    I started using cayenne yesterday and got it up and running in my webapp
    alongside wicket. I have question about configuration files: can i put
    them
    somewhere else besides the source root (for wicket it is src/main/java)
    and
    then define that location somewhere - e.g. filter configuration in
    web.xml?
    Point is I would very much like to have it under src/main/resources
    (e.g.
    like hibernate does) but then I think it probably won't be able to
    traceroute the location of mapping classes from package name.

    TIA, regards

    --
    Marek Šabo
    Chief Server Manager
    Club SU CVUT Buben
    Bubenečská Kolej
    Terronská 28, Prague 16000
    XMPP: zeratul021@gmail.com


    --
    Marek Šabo
    Chief Server Manager
    Club SU CVUT Buben
    Bubenečská Kolej
    Terronská 28, Prague 16000
    XMPP: zeratul021@gmail.com
  • Evgeny Ryabitskiy at Dec 31, 2009 at 4:20 pm
    Ahoj.

    Maven builder for JAR packaging has default-enabled resource plug-in
    with is coping all resource files from src/main/resources
    in root of your JAR while building so it will be available.
    Also if you are running your app from Eclipse(or other IDE) and
    src/main/resources is included into classpath all files in this dir
    will be also available.
    Cayenne is working with classpath by default so it depends how you are
    configured/build your app.

    Evgeny.

    2009/12/31 Marek Šabo <msabo@buk.cvut.cz>:
    Hi Evgeny,

    does it use the default configuration which looks in top of classpath, which
    is the src/main/java for me?
    As Michael said he has his conf in src/main/resources and it works without
    mentioning of overriding the default configuration. That shouldn't play
    along, or should it?

    Regards,

    Evgeny Ryabitskiy wrote:
    Cayenne is looking for xml files in your jar/war by it's pass. pass is
    Relative (not absolute).
    So when you are building you jar/war you should care that this
    configuration files are placed in jar/war in same manner you are
    configured your application.

    You can use DefaultConfiguration / FileConfiguration to set path to
    cayenne.xml

    http://cayenne.apache.org/doc20/customizing-configuration.html

    Evgeny.

    2009/12/31 Michael Gentry <mgentry@masslight.net>:
    I put my Cayenne configuration files in src/main/resources, at least
    for Maven projects.

    mrg

    On Thu, Dec 31, 2009 at 6:39 AM, Marek Šabo wrote:


    Hi everyone,

    I started using cayenne yesterday and got it up and running in my webapp
    alongside wicket. I have question about configuration files: can i put
    them
    somewhere else besides the source root (for wicket it is src/main/java)
    and
    then define that location somewhere - e.g. filter configuration in
    web.xml?
    Point is I would very much like to have it under src/main/resources
    (e.g.
    like hibernate does) but then I think it probably won't be able to
    traceroute the location of mapping classes from package name.

    TIA, regards

    --
    Marek Šabo
    Chief Server Manager
    Club SU CVUT Buben
    Bubenečská Kolej
    Terronská 28, Prague 16000
    XMPP: zeratul021@gmail.com


    --
    Marek Šabo
    Chief Server Manager
    Club SU CVUT Buben
    Bubenečská Kolej
    Terronská 28, Prague 16000
    XMPP: zeratul021@gmail.com

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriescayenne
postedDec 31, '09 at 11:40a
activeDec 31, '09 at 4:20p
posts6
users3
websitecayenne.apache.org

People

Translate

site design / logo © 2022 Grokbase