-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: creating multtiple session factory
PostPosted: Fri Mar 02, 2007 8:10 am 
Beginner
Beginner

Joined: Mon Feb 05, 2007 2:33 am
Posts: 32
Hibernate version:[/3.0]

[b]Mapping documents:


Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Can i know how to create two session factory .

where i am need of connecting two database.

i have pluged in the hibenateplugin in the struts-config.xml

where as i am facing the problem of when i specify to create two session factory

<plug-in className="roseindia.net.plugin.HibernatePlugIn">
<set-property property="configFilePath" value="/b2c.cfg.xml" />
<set-property property="configFilePath" value="/crm.cfg.xml" />
</plug-in>

The second one is alone created.

i think that the first one have been overwritten.

how can i overcome this problem

in this case both cfg files are two different tables.

please help me


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 02, 2007 11:37 am 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
Quote:
<set-property property="configFilePath" value="/b2c.cfg.xml" />
<set-property property="configFilePath" value="/crm.cfg.xml" />


you're using the same property twice. the second one overwrites the first one.

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.