burriad wrote:
>
> In the initial context, I put the following line to get rid of the MySQL
> dialect:
> p.put("exampleDatabase.hibernate.dialect",
> "org.hibernate.dialect.HSQLDialect");
>
> If I don't do that, is the value from persistence.xml taken, or can I
> get rid of this property for the initial context as well?
>
> (The question's probably stupid... I assume that the line
> p.put("exampleDatabase", "new://Resource?type=DataSource");
> creates a new data source with all default parameters anyway, ignoring
> the persistence.xml altogether... but what are the Hibernate default
> parameters... I don't think that I fully understood what's going on
> behind the scene...)
>
Hi,
I think you no more need this property.
AFAIK, when connecting to the database, Hibernate gets database metadata in
order to set properly the dialect. If not possible, it fires an exception.
So with some databases, you need to add the dialect as a property in the
persistence.xml (and make it dynamic if needed).
Hope it helps.
Jean-Louis
--
View this message in context:
http://www.nabble.com/Multiple-Persistence-Units-tp25027340p25045834.html
Sent from the OpenEJB User mailing list archive at Nabble.com.