{
BeanUtils.setProperty(message, propertyName, propertyValue);
}
catch (IllegalAccessException e)
{
throw new DistributedTestException("Unable to set property " + propertyName + " :" + e.getMessage(), e);
}
catch (InvocationTargetException e)
{
if (e.getCause() instanceof JMSException)
{
throw ((JMSException) e.getCause());
}
else
{
throw new DistributedTestException("Unable to set property " + propertyName + " :" + e.getMessage(), e);
}
}
}