• Post Reply Bookmark Topic Watch Topic
  • New Topic

SessionFactory configuration

 
Bob Ciazoratione
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I currently use an Hibernate configuration file as follows:


When the Hibernate Configuration is initialized, I assume both SessionFactory's are bound to the JNDI context.
Now, for convenience, I would like to load the mappings from the Hibernate Configuration file and add the properties programmaticaly. I modified my Hibernate configuration file as follows:


And I initialize my Configuration as follows:


The problem is that I can't specify which properties belong to which SessionFactory (since there are 2 Factories bound to the JNDI context).

Any help?

Thanx,
Stijn
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Grand Puba"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it

here.

Thanks! and welcome to the JavaRanch!

Mark
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!