Hi,

I have multiple services invoved in my web-application that are used in other sub-projects too. That's why it would be useful to be able to manually set the file name for the hibernate configuration to be used (default is always hibernate.cfg.xml).

I tried to do the following in AppModule


public void contributeHibernateSessionSource (OrderedConfiguration<HibernateConfigurer> conf) {
        class MHibernateConfigurer implements HibernateConfigurer {

public void configure(org.hibernate.cfg.Configuration configuration) {
                        configuration.configure("hibernate_foo.cfg.xml");       
                      
                        }
        };
        
                conf.add("Default", new MHibernateConfigurer());
    }

But it tells me that the "Default" Configuration is already there and it cannot be changed.
Is there another way I can achieve this?

Regards

Moritz

Reply via email to