db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject RE: [torque newbie] Torque in source tree of web app?
Date Wed, 06 Jul 2005 06:35:35 GMT




Hi,

the usual organisation is like that:
- put torque.jar and the jar for the database driver into WEB-INF/lib
- I tend not to include the source files into the web application itself,
but into an extra source folder outside of the web app. Reason is that one
does not need the sources for running the app, so why would one want to
increase the application size by including the souces ?
- the WEB-INF directory is really the place for the configuration files. I
usually create a subfolder WEB-INF/config and put the configuration files
there. In my opinion, the only real alternative is to put the configuration
files into some fixed path on the server (like /etc/sysconfig/<myapp>), but
whether this is desirable or not depends on many things. For the beginning
I would recommend WEB-INF/config.
- I would not include maven in the web app. Build the web application from
outside, as you suggested, and hand out the db scripts. There is too much
which could go wrong if things are not set up as you think they might (or
should) be, e.g. the database user used to access the database later might
have not the permission to create tables etc.

    Thomas



"Scrut Inizer" <scrut999@hotmail.com> schrieb am 05.07.2005 17:35:44:

> Let's assume I want to write a web-application using Torque (and other
> libraries).
> How do I organize the tree now? Where do I put everything?
>
> I mean:
> I have
>
> webappname
>     /META_INF
>     /WEB-INF
>         /classes
>         /lib
>         /src
>
> Now I assume I put the torque-3.1.1.jar into /web-inf/lib, right?
> But where do I place all those configuration files?
> I really don't want them anywhere in the source or class folders. There
must
> be a way where I can keep those config files (the ones torque and maven
use,
> resource bundles, logger configurations and so on) away from the web-inf
> dir. Is meta-inf meant for that?
> But then I assume that torque wouldnt work anymore.
>
> And where do I place the db driver?
>
> Would I include maven so that the web-app can automatically build the db?
Or
> would I rather do a "maven torque" once, then compile the sources and
> deliver a .war plus a db-create script that the user has to manually
execute
> during the installation process of the web-app?
>
> Are there any conventions for all of this? I assume there must be because

> this seems like a trivial question to me that experienced developers
handle
> daily without thinking.
>
> Thanks
>
> scrut
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message