Tabnine Logo
LocalBeanProxyFactory.createProxy
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.apache.openejb/openejb-core

public static Class createProxy(final Class<?> classToProxy, final ClassLoader cl, final Class... interfaces) {
  return createProxy(classToProxy, cl, classToProxy.getName() + "$$LocalBeanProxy", interfaces);
}
origin: org.apache.tomee/openejb-core

public static Class createProxy(final Class<?> classToProxy, final ClassLoader cl, final Class... interfaces) {
  return createProxy(classToProxy, cl, classToProxy.getName() + "$$LocalBeanProxy", interfaces);
}
origin: org.apache.openejb/openejb-core

public static Object newProxyInstance(final ClassLoader classLoader, final InvocationHandler handler, final Class classToSubclass, final Class... interfaces) throws IllegalArgumentException {
  try {
    final Class proxyClass = createProxy(classToSubclass, classLoader, interfaces);
    return constructProxy(proxyClass, handler);
  } catch (final Throwable e) {
    throw new InternalError("LocalBeanProxyFactory.newProxyInstance: " + Debug.printStackTrace(e));
  }
}
origin: org.apache.tomee/openejb-core

public static Object newProxyInstance(final ClassLoader classLoader, final InvocationHandler handler, final Class classToSubclass, final Class... interfaces) throws IllegalArgumentException {
  try {
    final Class proxyClass = createProxy(classToSubclass, classLoader, interfaces);
    return constructProxy(proxyClass, handler);
  } catch (final Throwable e) {
    throw new InternalError("LocalBeanProxyFactory.newProxyInstance: " + Debug.printStackTrace(e));
  }
}
origin: org.apache.tomee/tomee-catalina

private static void eagerInitOfLocalBeanProxies(final Collection<BeanContext> beans, final ClassLoader classLoader) {
  for (final BeanContext deployment : beans) {
    if (deployment.isLocalbean() && !deployment.isDynamicallyImplemented()) { // init proxy eagerly otherwise deserialization of serialized object can't work
      final List<Class> interfaces = new ArrayList<>(2);
      interfaces.add(Serializable.class);
      interfaces.add(IntraVmProxy.class);
      final BeanType type = deployment.getComponentType();
      if (BeanType.STATEFUL.equals(type) || BeanType.MANAGED.equals(type)) {
        interfaces.add(BeanContext.Removable.class);
      }
      try {
        LocalBeanProxyFactory.createProxy(deployment.getBeanClass(), classLoader, interfaces.toArray(new Class<?>[interfaces.size()]));
      } catch (final Exception e) {
        // no-op: as before
      }
    }
  }
}
origin: org.apache.openejb/openejb-core

public ProxyClass(final BeanContext beanContext,
         final Class<?>[] interfaces) {
  Class<?> clazz;
  try {
    clazz = LocalBeanProxyFactory.createProxy(
      beanContext.getBeanClass(),
      beanContext.getClassLoader(),
      interfaces);
  } catch (final Throwable e) { // VerifyError
    logger.debug(beanContext.getBeanClass().getName() + " is not proxiable", e);
    clazz = null;
  }
  this.proxy = clazz;
}
origin: org.apache.tomee/openejb-core

public ProxyClass(final BeanContext beanContext,
         final Class<?>[] interfaces) {
  Class<?> clazz;
  try {
    clazz = LocalBeanProxyFactory.createProxy(
      beanContext.getBeanClass(),
      beanContext.getClassLoader(),
      interfaces);
  } catch (final Throwable e) { // VerifyError
    logger.debug(beanContext.getBeanClass().getName() + " is not proxiable", e);
    clazz = null;
  }
  this.proxy = clazz;
}
origin: org.apache.openejb/openejb-core

public EndpointFactory(final ActivationSpec activationSpec, final MdbContainer container, final BeanContext beanContext, final MdbInstanceFactory instanceFactory, final XAResourceWrapper xaResourceWrapper) {
  this.activationSpec = activationSpec;
  this.container = container;
  this.beanContext = beanContext;
  this.instanceFactory = instanceFactory;
  classLoader = container.getMessageListenerInterface().getClassLoader();
  interfaces = new Class[]{container.getMessageListenerInterface(), MessageEndpoint.class};
  this.xaResourceWrapper = xaResourceWrapper;
  final BeanContext.ProxyClass proxyClass = beanContext.get(BeanContext.ProxyClass.class);
  if (proxyClass == null) {
    proxy = LocalBeanProxyFactory.createProxy(beanContext.getBeanClass(), beanContext.getClassLoader(), interfaces);
    beanContext.set(BeanContext.ProxyClass.class, new BeanContext.ProxyClass(beanContext, interfaces));
  } else {
    proxy = proxyClass.getProxy();
  }
}
origin: org.apache.tomee/openejb-core

public EndpointFactory(final ActivationSpec activationSpec, final BaseMdbContainer container, final BeanContext beanContext, final MdbInstanceFactory instanceFactory, final MdbInstanceManager instanceManager, final XAResourceWrapper xaResourceWrapper, boolean usePool) {
  this.activationSpec = activationSpec;
  this.container = container;
  this.beanContext = beanContext;
  this.instanceFactory = instanceFactory;
  this.instanceManager = instanceManager;
  classLoader = container.getMessageListenerInterface().getClassLoader();
  interfaces = new Class[]{container.getMessageListenerInterface(), MessageEndpoint.class};
  this.xaResourceWrapper = xaResourceWrapper;
  this.usePool = usePool;
  final BeanContext.ProxyClass proxyClass = beanContext.get(BeanContext.ProxyClass.class);
  if (proxyClass == null) {
    proxy = LocalBeanProxyFactory.createProxy(beanContext.getBeanClass(), beanContext.getClassLoader(), interfaces);
    beanContext.set(BeanContext.ProxyClass.class, new BeanContext.ProxyClass(beanContext, interfaces));
  } else {
    proxy = proxyClass.getProxy();
  }
}
org.apache.openejb.util.proxyLocalBeanProxyFactorycreateProxy

Popular methods of LocalBeanProxyFactory

  • isProxy
  • newProxyInstance
  • constructProxy
  • createArrayDefinition
    pushes an array of the specified size to the method visitor. The generated bytecode will leave the n
  • generateProxy
  • 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

  • Reading from database using SQL prepared statement
  • setContentView (Activity)
  • getSharedPreferences (Context)
  • getContentResolver (Context)
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Join (org.hibernate.mapping)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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