congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
LocalBeanProxyFactory.generateProxy
Code IndexAdd Tabnine to your IDE (free)

How to use
generateProxy
method
in
org.apache.openejb.util.proxy.LocalBeanProxyFactory

Best Java code snippets using org.apache.openejb.util.proxy.LocalBeanProxyFactory.generateProxy (Showing top 2 results out of 315)

origin: org.apache.openejb/openejb-core

public static Class createProxy(final Class<?> classToProxy, final ClassLoader cl, final String proxyName, final Class... interfaces) {
  final String classFileName = proxyName.replace('.', '/');
  try {
    return cl.loadClass(proxyName);
  } catch (final Exception e) {
    // no-op
  }
  final ReentrantLock lock = LocalBeanProxyFactory.LOCK;
  lock.lock();
  try {
    try { // Try it again, another thread may have beaten this one...
      return cl.loadClass(proxyName);
    } catch (final Exception e) {
      // no-op
    }
    final byte[] proxyBytes = generateProxy(classToProxy, classFileName, interfaces);
    return Unsafe.defineClass(classToProxy, proxyName, proxyBytes);
  } catch (final Exception e) {
    throw new InternalError("LocalBeanProxyFactory.createProxy: " + Debug.printStackTrace(e));
  } finally {
    lock.unlock();
  }
}
origin: org.apache.tomee/openejb-core

public static Class createProxy(final Class<?> classToProxy, final ClassLoader cl, final String proxyName, final Class... interfaces) {
  final String classFileName = proxyName.replace('.', '/');
  try {
    return cl.loadClass(proxyName);
  } catch (final Exception e) {
    // no-op
  }
  final ReentrantLock lock = LocalBeanProxyFactory.LOCK;
  lock.lock();
  try {
    try { // Try it again, another thread may have beaten this one...
      return cl.loadClass(proxyName);
    } catch (final Exception e) {
      // no-op
    }
    final byte[] proxyBytes = generateProxy(classToProxy, classFileName, interfaces);
    return Unsafe.defineClass(cl, classToProxy, proxyName, proxyBytes);
  } catch (final Exception e) {
    throw new InternalError("LocalBeanProxyFactory.createProxy: " + Debug.printStackTrace(e));
  } finally {
    lock.unlock();
  }
}
org.apache.openejb.util.proxyLocalBeanProxyFactorygenerateProxy

Popular methods of LocalBeanProxyFactory

  • createProxy
  • isProxy
  • newProxyInstance
  • constructProxy
  • createArrayDefinition
    pushes an array of the specified size to the method visitor. The generated bytecode will leave the n
  • getAsmTypeAsString
    Converts a class to a String suitable for ASM.
  • getCastType
    Gets the string to use for CHECKCAST instruction, returning the correct value for any type, includin
  • getDeclaredField
  • getInvocationHandler
  • getMethodSignatureAsString
  • getNonPrivateMethods
  • getPrimitiveLetter
    Returns the single letter that matches the given primitive in bytecode instructions
  • getNonPrivateMethods,
  • getPrimitiveLetter,
  • getPrimitiveMethod,
  • getReturnInsn,
  • getVarInsn,
  • getWrapperType,
  • isOverridden,
  • processMethod,
  • pushIntOntoStack

Popular in Java

  • Finding current android device location
  • setRequestProperty (URLConnection)
  • getResourceAsStream (ClassLoader)
  • getSharedPreferences (Context)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Notification (javax.management)
  • Table (org.hibernate.mapping)
    A relational table
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now