Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350808 - EJBConfiguration cannot be set on HBEntityDataStore
Summary: EJBConfiguration cannot be set on HBEntityDataStore
Status: RESOLVED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Teneo (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Martin Taal CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-30 08:16 EDT by heinzl CLA
Modified: 2011-07-05 02:12 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description heinzl CLA 2011-06-30 08:16:45 EDT
Build Identifier: org.eclipse.emf.teneo.hibernate_1.2.0.v201104261907

Hi!

In the April version of Teneo the initialization of the HbEntityDataStore has been changed. Now the ejbconfiguration is set to null at the beginning of the initialization. I use Teneo from a self-written Hibernate Persistence Provider from within JBoss. Up to now I have used the configure method of the EJBconfiguration to forward the PersistenceUnitInfo and the properties map. The PersistenceUnitInfo also contains the information of the associated data source that is deployed to JBoss. Without it, I don't know how to provide the data source information to the datastore. 

 public EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo info, Map properties)
  {
    HbEntityDataStore dataStore = new HbEntityDataStore();
    ...    
    dataStore.setDataStoreProperties(p);
    dataStore.getConfiguration().configure(info, properties);
    dataStore.initialize();
    return dataStore.getEntityManagerFactory();
  }

Right now, I'm using the old version again. I don't know how to circumvent that problem.

Reproducible: Always
Comment 1 Martin Taal CLA 2011-07-05 02:12:46 EDT
Hi,
I added an extra method to the datastore:
setResetConfigurationOnInitialization(..)

if you call this with false as a parameter then the configuration won't be cleared when initializing.

See the latest build of Teneo.

gr. Martin