UserTransaction ut = new UserTransactionImpl();
try
{
field.set(instance, ut);
}
catch (IllegalAccessException e)
{
throw new RuntimeException(e); //To change body of catch statement use Options | File Templates.
}
catch (IllegalArgumentException e)
{
throw new RuntimeException("Failed in setting EntityManager on setter field: " + field.toString());
}