Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 350808

Summary: EJBConfiguration cannot be set on HBEntityDataStore
Product: [Modeling] EMF Reporter: heinzl
Component: TeneoAssignee: Martin Taal <mtaal>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

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