public static BrokerFactory newBrokerFactory(ConfigurationProvider conf,
ClassLoader loader) {
try {
return invokeFactory(conf, loader, "newInstance");
} catch (InvocationTargetException ite) {
Throwable cause = ite.getTargetException();
if (cause instanceof OpenJPAException)
throw (OpenJPAException) cause;
throw new InternalException(s_loc.get("new-brokerfactory-excep",
getFactoryClassName(conf, loader)), cause);
} catch (Exception e) {
throw new UserException(s_loc.get("bad-new-brokerfactory",
getFactoryClassName(conf, loader)), e).setFatal(true);
}
}
Return a new factory for the given configuration. The classloader
will be used to load the factory class. If no classloader is given,
the thread's context classloader is used. |