Question

I have two different databases where I need to connect and update the tables dynamically. But it looks like I cannot keep two sessions related information in configuration file. Is there any way to handle this ?

Was it helpful?

Solution

Well, as you noticed, the root element of Hibernate's XML configuration file must declare one and only one <session-factory> element as per the DTD:

<!ELEMENT hibernate-configuration (session-factory,security?)>

So if you want to configure multiple session factories, either:

References

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top