/** * 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. */ 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 pooled 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. */ public static BrokerFactory getBrokerFactory(ConfigurationProvider conf, ClassLoader loader) { try { return invokeFactory(conf, loader, "getInstance", CONFIGURATION_CLASSLOADER_ARGS, new Object[] { conf, loader }); } catch (InvocationTargetException ite) { Throwable cause = ite.getTargetException(); if (cause instanceof OpenJPAException) throw (OpenJPAException) cause; throw new InternalException(s_loc.get("brokerfactory-excep", getFactoryClassName(conf, loader)), cause); } catch (Exception e) { throw new UserException(s_loc.get("bad-brokerfactory", getFactoryClassName(conf, loader)), e).setFatal(true); } }
/** * Return a pooled 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. */ public static BrokerFactory getBrokerFactory(ConfigurationProvider conf, ClassLoader loader) { try { return invokeFactory(conf, loader, "getInstance"); } catch (InvocationTargetException ite) { Throwable cause = ite.getTargetException(); if (cause instanceof OpenJPAException) throw (OpenJPAException) cause; throw new InternalException(s_loc.get("brokerfactory-excep", getFactoryClassName(conf, loader)), cause); } catch (Exception e) { throw new UserException(s_loc.get("bad-brokerfactory", getFactoryClassName(conf, loader)), e).setFatal(true); } }
/** * Return a pooled 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. */ public static BrokerFactory getBrokerFactory(ConfigurationProvider conf, ClassLoader loader) { try { return invokeFactory(conf, loader, "getInstance", CONFIGURATION_CLASSLOADER_ARGS, new Object[] { conf, loader }); } catch (InvocationTargetException ite) { Throwable cause = ite.getTargetException(); if (cause instanceof OpenJPAException) throw (OpenJPAException) cause; throw new InternalException(s_loc.get("brokerfactory-excep", getFactoryClassName(conf, loader)), cause); } catch (Exception e) { throw new UserException(s_loc.get("bad-brokerfactory", getFactoryClassName(conf, loader)), e).setFatal(true); } }
/** * Return a pooled 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. */ public static BrokerFactory getBrokerFactory(ConfigurationProvider conf, ClassLoader loader) { try { return invokeFactory(conf, loader, "getInstance", CONFIGURATION_CLASSLOADER_ARGS, new Object[] { conf, loader }); } catch (InvocationTargetException ite) { Throwable cause = ite.getTargetException(); if (cause instanceof OpenJPAException) throw (OpenJPAException) cause; throw new InternalException(s_loc.get("brokerfactory-excep", getFactoryClassName(conf, loader)), cause); } catch (Exception e) { throw new UserException(s_loc.get("bad-brokerfactory", getFactoryClassName(conf, loader)), e).setFatal(true); } }
/** * Return a pooled 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. */ public static BrokerFactory getBrokerFactory(ConfigurationProvider conf, ClassLoader loader) { try { return invokeFactory(conf, loader, "getInstance", CONFIGURATION_CLASSLOADER_ARGS, new Object[] { conf, loader }); } catch (InvocationTargetException ite) { Throwable cause = ite.getTargetException(); if (cause instanceof OpenJPAException) throw (OpenJPAException) cause; throw new InternalException(s_loc.get("brokerfactory-excep", getFactoryClassName(conf, loader)), cause); } catch (Exception e) { throw new UserException(s_loc.get("bad-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. */ public static BrokerFactory newBrokerFactory(ConfigurationProvider conf, ClassLoader loader) { try { BrokerFactory factory = invokeFactory(conf, loader, "newInstance", CONFIGURATION_ARG, new Object[] { conf }); factory.postCreationCallback(); return factory; } 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. */ public static BrokerFactory newBrokerFactory(ConfigurationProvider conf, ClassLoader loader) { try { BrokerFactory factory = invokeFactory(conf, loader, "newInstance", CONFIGURATION_ARG, new Object[] { conf }); factory.postCreationCallback(); return factory; } 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. */ public static BrokerFactory newBrokerFactory(ConfigurationProvider conf, ClassLoader loader) { try { BrokerFactory factory = invokeFactory(conf, loader, "newInstance", CONFIGURATION_ARG, new Object[] { conf }); factory.postCreationCallback(); return factory; } 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. */ public static BrokerFactory newBrokerFactory(ConfigurationProvider conf, ClassLoader loader) { try { BrokerFactory factory = invokeFactory(conf, loader, "newInstance", CONFIGURATION_ARG, new Object[] { conf }); factory.postCreationCallback(); return factory; } 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); } }