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

Reply via email to