{
throw new IllegalArgumentException("JbpmConfiguration not found in JNDI", ne);
}
}
DbPersistenceServiceFactory dbpsf = (DbPersistenceServiceFactory) jbpmConfiguration.getServiceFactory("persistence");
if (Naming.getInitialContextProperties()!=null)
{
// Prefix regular JNDI properties for Hibernate
Hashtable<String, String> hash = Naming.getInitialContextProperties();
Properties prefixed = new Properties();
for (Map.Entry<String, String> entry: hash.entrySet() )
{
prefixed.setProperty( Environment.JNDI_PREFIX + "." + entry.getKey(), entry.getValue() );
}
try
{
dbpsf.getConfiguration().getProperties().putAll(prefixed);
}
catch (HibernateException he)
{
log.info("could not set JNDI properties for jBPM persistence: " + he.getMessage());
}