Details
Description
Properties of Persistence xml needs to be externalized.
Changes with need to be done
1) org.apache.juddi.config.Property.java
public final static String PERSISTENCE_PROVIDER ="persistenceProvider";
public final static String DATASOURCE ="hibernate.connection.datasource";
public final static String HBM_DDL_AUTO ="hibernate.hbm2ddl.auto";
public final static String DEFAULT_SCHEMA ="hibernate.default_schema";
public final static String HIBERNATE_DIALECT ="hibernate.dialect";
2) org.apache.juddi.config.AppConfig.java
private void loadConfiguration() throws ConfigurationException
{
....
if(propConfig.getString(Property.PERSISTENCE_PROVIDER).equalsIgnoreCase("Hibernate"))
....
}
3) org.apache.juddi.config. PersistenceManager.java
protected static void initializeEntityManagerFactory(String persistenceUnitName,Map<String, String> properties) {
try {
if (emf == null ){
if(properties != null)
else
{ emf = Persistence.createEntityManagerFactory(persistenceUnitName); }}
}
}