// if we don't have a configuration persisted in JCR already, force a reload from XML and save the resulting configuration
if (pcm == null)
{
pcm = session.insert(ProducerConfigurationMapping.class, PRODUCER_CONFIGURATION_PATH);
ProducerConfigurationService service = new SimpleXMLProducerConfigurationService(defaultConfigurationIS);
service.reloadConfiguration();
configuration = service.getConfiguration();
pcm.initFrom(configuration);
}
else
{
configuration = pcm.toProducerConfiguration();