If you're using Hibernate, one thing we do with this, to make sure the
target database is up to snuff (all the right tables/columns, etc.) is to
run a test case that executes the verifier from Hibernate against the schema
(our test cases don't usually touch the real database; they run against an
in-memory HSQLDB database).

On Wed, Dec 3, 2008 at 11:25 AM, Anton Veretennikov <
[EMAIL PROTECTED]> wrote:

> Thank you, James!
>
> On Wed, Dec 3, 2008 at 7:45 PM, James Carman <[EMAIL PROTECTED]>
> wrote:
> > We use "profiles" in Maven2 to decide which configuration parameters to
> > build with.  Take a look at the example project for Wicketopia for an
> > example of how we do that:
> > https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/example/
> >
> > Basically, we add in a special resources directory that's based on a
> > parameter (called "configuration") defined in the pom:
> >
> >        <resources>
> >            <resource>
> >                <directory>src/main/conf/${configuration}</directory>
> >            </resource>
> >            <resource>
> >                <directory>src/main/resources</directory>
> >            </resource>
> >            <resource>
> >                <directory>src/main/java</directory>
> >                <includes>
> >                    <include>**</include>
> >                </includes>
> >                <excludes>
> >                    <exclude>**/*.java</exclude>
> >                </excludes>
> >            </resource>
> >        </resources>
> >
> > Then, we use Spring to load a properties file (using
> > PropertyPlaceholderConfigurer) that's inside that directory.  So, all you
> > have to do to build a different version is:
> >
> > mvn -Pprod install
> >
> > and it'll run with the "production" profile.
> > On Wed, Dec 3, 2008 at 1:37 AM, Anton Veretennikov <
> > [EMAIL PROTECTED]> wrote:
> >
> >> Hello Wicket users,
> >>
> >> I test my app on local Tomcat and update it frequently on remote. They
> >> have different MySQL DB connection params.
> >> What is the easiest way to decide which params to choose depending on
> >> where Tomcat is running without editing of xml-files?
> >>
> >> I need to know it during init() of Application because I must run
> >> upgrades of db tables / data when new version of app is uploaded.
> >> Tomcat thinks it is running on "localhost" on remote server
> >> (configured as Proxy Pass).
> >>
> >> Thank you
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to