ActivationSpec instance = ActivationSpec.class.cast(clz.newInstance());
instance.setResourceAdapter(ra);
if (valueProperties != null && valueProperties.size() > 0)
{
Injection injector = new Injection();
Iterator<Map.Entry<String, String>> it = valueProperties.entrySet().iterator();
while (it.hasNext())
{
String propertyName = null;
String propertyValue = null;
try
{
Map.Entry<String, String> entry = it.next();
propertyName = entry.getKey();
propertyValue = entry.getValue();
injector.inject(instance, propertyName, propertyValue);
}
catch (Throwable t)
{
log.debug("Ignoring: " + propertyName + " (" + propertyValue + ")", t);
}