[Hibernate-JIRA] Created: (HBX-863) Hibernate Code Generation toolbar group is appearing in all Eclipse perspectives.
by John O'Shea (JIRA)
Hibernate Code Generation toolbar group is appearing in all Eclipse perspectives.
---------------------------------------------------------------------------------
Key: HBX-863
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-863
Project: Hibernate Tools
Type: Bug
Components: eclipse
Versions: 3.2beta9
Environment: All
Reporter: John O'Shea
Attachments: hib_tools.png
Currently the org.hibernate.eclipse.console plugin is contributing an action to the "org.eclipse.debug.ui.launchActionSet". Consequently, the icon for the action group containing the "Hibernate Code Generation....." action is appearing in all Eclipse perspectives. This is not really a good thing - it is polluting other perspectives that probably have no hibernate related functionality. For example the attached screenshot shows the Synchronize perspective toolbar, with the Hibernate group visible - not very useful (and perhaps confusing for users).
Could you perhaps move this action into a hibernate tools action set that is only displayed when the Hibernate Console (and maybe Java) perspective is active?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
17 years, 10 months
[Hibernate-JIRA] Created: (EJB-250) Ejb3Configuration class issue
by David Avenante (JIRA)
Ejb3Configuration class issue
-----------------------------
Key: EJB-250
URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-250
Project: Hibernate Entity Manager
Type: Bug
Versions: 3.2.0.ga
Environment: Hibernate version : 3.2.0.ga.
Db : H2
Reporter: David Avenante
Priority: Minor
Hi,
I try for my test to use my entityManager out of container.
For that i instanciate my entityManagerFactory through the Ejb3Configuration helper.
All it's ok (annoted classes found, connection ok ...) but not my transactionType !!!!
i try to add the property "javax.persistence.transactionType" ->"RESOURCE_LOCAL" without success
After inspection of sources it's seem this property is available through the configure() method who need the name of a file configuration.
But i don't want that a want define my entityManager only programaticly.
Ok so after some investigations.
Ejb3Configuration cfg = new Ejb3Configuration();
cfg.addProperties(getProperties());
cfg.addAnnotatedClass(User.class);
entityManagerFactory = cfg.buildEntityManagerFactory();
private static Properties getProperties() {
Properties properties = new Properties();
properties.setProperty(Environment.DRIVER, DATABASE_DRIVER_CLASS);
properties.setProperty(Environment.URL, MEMORY_DATABASE_URL);
properties.setProperty(Environment.USER, USERNAME);
properties.setProperty(Environment.PASS, PASSWORD);
properties.setProperty(Environment.DIALECT, DBDIALECT);
properties.put(Environment.SHOW_SQL, "true");
properties.put(Environment.FLUSH_BEFORE_COMPLETION, "false");
properties.put(Environment.TRANSACTION_STRATEGY, PersistenceUnitTransactionType.RESOURCE_LOCAL);
properties.put(Environment.HBM2DDL_AUTO, "create");
return properties;
}
This code don't work because my entityManagerFactory doesn't have TransactionStrategy attached.
But if i use this code
Ejb3Configuration cfg = new Ejb3Configuration();
cfg.addProperties(getProperties());
cfg.addAnnotatedClass(User.class);
cfg.configure("hibernate.cfg.xml");
entityManagerFactory = cfg.buildEntityManagerFactory();
with a empty hibernate.cfg.xml config file like that ...
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
</session-factory>
</hibernate-configuration>
the entityManagerFactory have a transaction manager attached !!!!
You can reply me hey guys all is ok good but not really. Because we can see the cfg.configure("hibernate.cfg.xml") don't use a resource or an input stream but a string. So the location of my file must be in my source directory but i dont want that. I want to use my file in my test directory tree.
So emmanuel ask me to open and issue ;)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
17 years, 11 months