public TransactionManager getTransactionManager() throws Exception { if (_method == null) { ClassLoader loader = _conf.getClassResolverInstance(). getClassLoader(getClass(), null); _method = Class.forName(_clazz, true, loader) .getMethod(_methodName, null); } return (TransactionManager) _method.invoke(null, null); }
public TransactionManager getTransactionManager() throws Exception { if (_method == null) { ClassLoader loader = _conf.getClassResolverInstance(). getClassLoader(getClass(), null); _method = Class.forName(_clazz, true, loader) .getMethod(_methodName, null); } return (TransactionManager) _method.invoke(null, null); }
public TransactionManager getTransactionManager() throws Exception { if (_method == null) { ClassLoader loader = _conf.getClassResolverInstance(). getClassLoader(getClass(), null); _method = Class.forName(_clazz, true, loader) .getMethod(_methodName, null); } return (TransactionManager) _method.invoke(null, null); }
/** * Create an id from the result of an {@link #toString} call on another * instance. */ public Id(String str, OpenJPAConfiguration conf, ClassLoader brokerLoader) { this(str, (conf == null) ? brokerLoader : conf. getClassResolverInstance().getClassLoader(Id.class, brokerLoader)); }
public TransactionManager getTransactionManager() throws Exception { if (_method == null) { ClassLoader loader = _conf.getClassResolverInstance(). getClassLoader(getClass(), null); _method = Class.forName(_clazz, true, loader) .getMethod(_methodName, null); } return (TransactionManager) _method.invoke(null, null); }
/** * Create an id from the result of an {@link #toString} call on another * instance. */ public Id(String str, OpenJPAConfiguration conf, ClassLoader brokerLoader) { this(str, (conf == null) ? brokerLoader : conf. getClassResolverInstance().getClassLoader(Id.class, brokerLoader)); }
public TransactionManager getTransactionManager() throws Exception { if (_method == null) { ClassLoader loader = _conf.getClassResolverInstance(). getClassLoader(getClass(), null); _method = Class.forName(_clazz, true, loader) .getMethod(_methodName, null); } return (TransactionManager) _method.invoke(null, null); }
/** * Create an id from the result of an {@link #toString} call on another * instance. */ public Id(String str, OpenJPAConfiguration conf, ClassLoader brokerLoader) { this(str, (conf == null) ? brokerLoader : conf. getClassResolverInstance().getClassLoader(Id.class, brokerLoader)); }
/** * Create an id from the result of an {@link #toString} call on another * instance. */ public Id(String str, OpenJPAConfiguration conf, ClassLoader brokerLoader) { this(str, (conf == null) ? brokerLoader : conf. getClassResolverInstance().getClassLoader(Id.class, brokerLoader)); }
/** * Create an id from the result of an {@link #toString} call on another * instance. */ public Id(String str, OpenJPAConfiguration conf, ClassLoader brokerLoader) { this(str, (conf == null) ? brokerLoader : conf. getClassResolverInstance().getClassLoader(Id.class, brokerLoader)); }
/** * Look for META-INF/orm.xml, and if it doesn't exist, choose a default. */ private File defaultXMLFile() { ClassLoader loader = repos.getConfiguration(). getClassResolverInstance().getClassLoader(getClass(), null); URL rsrc = AccessController.doPrivileged( J2DoPrivHelper.getResourceAction(loader, "META-INF/orm.xml")); if (rsrc != null) { File file = new File(rsrc.getFile()); if ((AccessController.doPrivileged( J2DoPrivHelper.existsAction(file))).booleanValue()) return file; } return new File(dir, "orm.xml"); }
/** * Look for META-INF/orm.xml, and if it doesn't exist, choose a default. */ private File defaultXMLFile() { ClassLoader loader = repos.getConfiguration(). getClassResolverInstance().getClassLoader(getClass(), null); URL rsrc = (URL) AccessController.doPrivileged( J2DoPriv5Helper.getResourceAction(loader, "META-INF/orm.xml")); if (rsrc != null) { File file = new File(rsrc.getFile()); if (((Boolean) AccessController.doPrivileged( J2DoPriv5Helper.existsAction(file))).booleanValue()) return file; } return new File("orm.xml"); }
/** * Look for META-INF/orm.xml, and if it doesn't exist, choose a default. */ private File defaultXMLFile() { ClassLoader loader = repos.getConfiguration(). getClassResolverInstance().getClassLoader(getClass(), null); URL rsrc = AccessController.doPrivileged( J2DoPrivHelper.getResourceAction(loader, "META-INF/orm.xml")); if (rsrc != null) { File file = new File(rsrc.getFile()); if ((AccessController.doPrivileged( J2DoPrivHelper.existsAction(file))).booleanValue()) return file; } return new File(dir, "orm.xml"); }
/** * Sets the type of the partitions. * Each partition is a DataCache itself. * * @param type the name of the type that implements {@linkplain DataCache} interface. * Aliases such as <code>"concurrent"</code> is also recognized. * * @throws Exception if the given type is not resolvable to a loadable type. */ public void setPartitionType(String type) throws Exception { Value value = conf.getValue("DataCache"); ClassLoader ctxLoader = AccessController.doPrivileged(J2DoPrivHelper.getContextClassLoaderAction()); ClassLoader loader = conf.getClassResolverInstance().getClassLoader(null, ctxLoader); _type = (Class<? extends DataCache>) AccessController.doPrivileged( J2DoPrivHelper.getForNameAction(value.unalias(type), true, loader)); }
/** * Sets the type of the partitions. * Each partition is a DataCache itself. * * @param type the name of the type that implements {@linkplain DataCache} interface. * Aliases such as <code>"concurrent"</code> is also recognized. * * @throws Exception if the given type is not resolvable to a loadable type. */ public void setPartitionType(String type) throws Exception { Value value = conf.getValue("DataCache"); ClassLoader ctxLoader = AccessController.doPrivileged(J2DoPrivHelper.getContextClassLoaderAction()); ClassLoader loader = conf.getClassResolverInstance().getClassLoader(null, ctxLoader); _type = (Class<? extends DataCache>) AccessController.doPrivileged( J2DoPrivHelper.getForNameAction(value.unalias(type), true, loader)); }
/** * Return the {@link Class} for the given name, or null if name not valid. */ private Class toClass(String name) { if (_loader == null) _loader = _broker.getConfiguration().getClassResolverInstance(). getClassLoader(_class, _broker.getClassLoader()); try { return Strings.toClass(name, _loader); } catch (RuntimeException re) { } catch (NoClassDefFoundError ncdfe) { } return null; }
/** * Return the {@link Class} for the given name, or null if name not valid. */ private Class toClass(String name) { if (_loader == null) _loader = _broker.getConfiguration().getClassResolverInstance(). getClassLoader(_class, _broker.getClassLoader()); try { return Strings.toClass(name, _loader); } catch (RuntimeException re) { } catch (NoClassDefFoundError ncdfe) { } return null; }
/** * Return the {@link Class} for the given name, or null if name not valid. */ private Class toClass(String name) { if (_loader == null) _loader = _broker.getConfiguration().getClassResolverInstance(). getClassLoader(_class, _broker.getClassLoader()); try { return ClassUtil.toClass(name, _loader); } catch (RuntimeException re) { } catch (NoClassDefFoundError ncdfe) { } return null; }
/** * Return the {@link Class} for the given name, or null if name not valid. */ private Class toClass(String name) { if (_loader == null) _loader = _broker.getConfiguration().getClassResolverInstance(). getClassLoader(_class, _broker.getClassLoader()); try { return ClassUtil.toClass(name, _loader); } catch (RuntimeException re) { } catch (NoClassDefFoundError ncdfe) { } return null; }
/** * Return the {@link Class} for the given name, or null if name not valid. */ private Class toClass(String name) { if (_loader == null) _loader = _broker.getConfiguration().getClassResolverInstance(). getClassLoader(_class, _broker.getClassLoader()); try { return Strings.toClass(name, _loader); } catch (RuntimeException re) { } catch (NoClassDefFoundError ncdfe) { } return null; }