This is what execution modes are about.

Execution modes map to modules; those modules are only loaded if the
execution mode is active. It is entirely for these particular kinds of
environmental customizations.


On Tue, Nov 20, 2012 at 3:14 PM, bhorvat <horvat.z.bo...@gmail.com> wrote:

> I have a few execution environments like prod, qa, dev and such and I want
> to
> set a certain property based on that. Basically I want to set config
> property progrematically inside QAMode,ProdMode and DevMode
>
>     @Contribute(HibernateSessionSource.class)
>     public void
> addHibernateSessionSource(OrderedConfiguration<HibernateConfigurer> conf,
>             @Value("${config}") final String executionMode) {
>
>         conf.add("HibernateConfig", new HibernateConfigurer() {
>             @Override
>             public void configure(org.hibernate.cfg.Configuration
> configuration) {
>                 configuration.configure("scripts/db/" + config +
> "/hibernate.cfg.xml");
>             }
>         });
>     }
>
> Thanks for help.
>
> Cheers
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Adding-new-properties-from-AppModule-tp5718137.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

Reply via email to