Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Object Relational Mapping
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Object Relational Mapping
Can we Write more than 2 hibernate.cfg.xml's?
Barry Van
Greenhorn
Posts: 22
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
Can we Write more than 2 hibernate.cfg.xml's?
If yes, How to add sessions? please give with exampls?
Barry Van
Greenhorn
Posts: 22
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
This code rite? please check..if wrong.. how can we use 2 cfg.xml's?
Configuration cfg = new Configuration();
cfg.addFile("hibernate.cfg.xml");
cfg.addFile("hibernate2.cfg.xml");
sessionFactory = cfg.buildSessionFactory();
Barry Van
Greenhorn
Posts: 22
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi All,
Please any one resolve the above Issues..
Reehan Lalkhanwar
Ranch Hand
Posts: 106
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I don't think that is possible.
Look at the below code. Hope that might be of some help.
new Configuration().configure( "hibernate.cfg.xml" ) .setProperty( "property", "value" ) .setProperty( "hibernate.dialect", "org.hibernate.dialect.Oracle10gDialect" ) .addResource( "some.hbm.xml" )
Thank you,
Reehan
Barry Van
Greenhorn
Posts: 22
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi All,
Please check this code.. Is it write..?
Is it Possible to use morethan one cfg xmls?
Configuration cfg = new Configuration();
cfg.configure("hibernate1.cfg.xml");
cfg.configure("hibernate2.cfg.xml");
// sessionFactory = new Configuration().configure().buildSessionFactory();
sessionFactory = cfg.buildSessionFactory();
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Can we write Entity Bean for a table which does not have a Primary Key defined?
how can remove number of keys from session?
Use of Interface
Related to Deployment Descriptor
more than one create() method for Entity Bean?
More...