[jbosstools-issues] [JBoss JIRA] (JBIDE-10507) Hibernate Console Configurations should try and ensure configurations does not load JTA and other remote server options

Dmitry Geraskov (JIRA) jira-events at lists.jboss.org
Fri Feb 17 02:27:36 EST 2012


     [ https://issues.jboss.org/browse/JBIDE-10507?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Geraskov resolved JBIDE-10507.
-------------------------------------

    Resolution: Done

    
> 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.Beta1
>
>
> 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

        


More information about the jbosstools-issues mailing list