[
https://issues.jboss.org/browse/JBIDE-10507?page=com.atlassian.jira.plugi...
]
Dmitry Geraskov resolved JBIDE-10507.
-------------------------------------
Resolution: Done
Collapsing of the node is a small synchronisation issue. It does not connected with this,
so close this as fixed
Hibernate Console Configurations should try and ensure configurations
does not load JTA and other remote server options
-----------------------------------------------------------------------------------------------------------------------
Key: JBIDE-10507
URL:
https://issues.jboss.org/browse/JBIDE-10507
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: hibernate
Affects Versions: 3.3.0.M5
Reporter: Max Rydahl Andersen
Assignee: Dmitry Geraskov
Priority: Critical
Fix For: 3.3.0.Beta3
Both H3 and H4 will default to use JTA tx managers and load datasources if configured so
- i.e. JPA/EJB3 mode enables it by default.
In Seam 2 we generated a hibernate-console.properties file that sets a few properties to
"convince" H3 to not load these things.
The important properties are:
hibernate.connection.provider_class=org.hibernate.connection.DriverManagerConnectionProvider
hibernate.datasource=
hibernate.transaction.manager_lookup_class=
Here are my recollection of the reasons:
hibernate.connection.provider_class needs to use DriverManager since otherwise it will
load datasources.
hibernate.datasource needs to be overwritten/set to blank to ensure it will not lookup
datasources
hiberante.transaction.manager_lookup_class needs to be overwritten/blank to ensure we
don't get:
org.hibernate.HibernateException: The chosen transaction strategy requires access to the
JTA TransactionManager
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:401)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1385)
at
org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
at org.hibernate.console.ConsoleConfiguration$4.execute(ConsoleConfiguration.java:268)
at
org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:107)
at
org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:263)
at
org.hibernate.eclipse.console.actions.ExecuteQueryAction.execute(ExecuteQueryAction.java:79)
at
org.hibernate.eclipse.console.actions.ExecuteQueryAction.run(ExecuteQueryAction.java:55)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at
org.hibernate.eclipse.console.actions.ExecuteQueryAction.runWithEvent(ExecuteQueryAction.java:59)
Currently we probably just handle this when the settings are set to blank, but I think it
starts to make sense to set these always.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira