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

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

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

origin: org.apache.openejb/openejb-core

public static Object proxy(final BeanContext beanContext, final Class<?>[] itfs) {
  if (beanContext.isLocalbean()) {
    return LocalBeanProxyFactory.newProxyInstance(itfs[0].getClassLoader(), new Handler(beanContext), itfs[0], IntraVmProxy.class, Serializable.class);
  }
  return Proxy.newProxyInstance(itfs[0].getClassLoader(), itfs, new Handler(beanContext));
}
origin: org.apache.tomee/openejb-core

public static Object proxy(final BeanContext beanContext, final Class<?>[] itfs) {
  if (beanContext.isLocalbean()) {
    return LocalBeanProxyFactory.newProxyInstance(itfs[0].getClassLoader(), new Handler(beanContext), itfs[0], IntraVmProxy.class, Serializable.class);
  }
  return Proxy.newProxyInstance(itfs[0].getClassLoader(), itfs, new Handler(beanContext));
}
origin: org.apache.openejb/openejb-core

public static Object simpleProxy(final BeanContext beanContext, final Class<?>[] itfs) {
  if (beanContext.isLocalbean()) {
    return LocalBeanProxyFactory.newProxyInstance(itfs[0].getClassLoader(), new Handler(beanContext), itfs[0]);
  }
  return Proxy.newProxyInstance(itfs[0].getClassLoader(), itfs, new Handler(beanContext));
}
origin: org.apache.tomee/openejb-core

public static Object simpleProxy(final BeanContext beanContext, final Class<?>[] itfs) {
  if (beanContext.isLocalbean()) {
    return LocalBeanProxyFactory.newProxyInstance(itfs[0].getClassLoader(), new Handler(beanContext), itfs[0]);
  }
  return Proxy.newProxyInstance(itfs[0].getClassLoader(), itfs, new Handler(beanContext));
}
origin: org.apache.openejb/openejb-core

@Override
public MessageEndpoint createEndpoint(XAResource xaResource) throws UnavailableException {
  if (xaResource != null && xaResourceWrapper != null) {
    xaResource = xaResourceWrapper.wrap(xaResource, container.getContainerID().toString());
  }
  final EndpointHandler endpointHandler = new EndpointHandler(container, beanContext, instanceFactory, xaResource);
  try {
    return (MessageEndpoint) LocalBeanProxyFactory.constructProxy(proxy, endpointHandler);
  } catch (final InternalError e) { // should be useless
    //try to create the proxy with tccl once again.
    try {
      return MessageEndpoint.class.cast(LocalBeanProxyFactory.newProxyInstance(Thread.currentThread().getContextClassLoader(), endpointHandler, beanContext.getBeanClass(), interfaces));
    } catch (final InternalError ie) {
      try {
        return MessageEndpoint.class.cast(LocalBeanProxyFactory.newProxyInstance(classLoader, endpointHandler, beanContext.getBeanClass(), interfaces));
      } catch (final InternalError ie2) {
        // no-op
      }
    }
    throw e;
  }
}
origin: org.apache.tomee/openejb-core

@Override
public MessageEndpoint createEndpoint(XAResource xaResource) throws UnavailableException {
  if (xaResource != null && xaResourceWrapper != null) {
    xaResource = xaResourceWrapper.wrap(xaResource, container.getContainerID().toString());
  }
  InvocationHandler endpointHandler = null;
  if (usePool) {
    endpointHandler = new PoolEndpointHandler(container, beanContext, instanceManager, xaResource);
  } else {
    endpointHandler = new EndpointHandler(container, beanContext, instanceFactory, xaResource);
  }
  try {
    return (MessageEndpoint) LocalBeanProxyFactory.constructProxy(proxy, endpointHandler);
  } catch (final InternalError e) { // should be useless
    //try to create the proxy with tccl once again.
    try {
      return MessageEndpoint.class.cast(LocalBeanProxyFactory.newProxyInstance(Thread.currentThread().getContextClassLoader(), endpointHandler, beanContext.getBeanClass(), interfaces));
    } catch (final InternalError ie) {
      try {
        return MessageEndpoint.class.cast(LocalBeanProxyFactory.newProxyInstance(classLoader, endpointHandler, beanContext.getBeanClass(), interfaces));
      } catch (final InternalError ie2) {
        // no-op
      }
    }
    throw e;
  }
}
origin: org.apache.tomee/openejb-core

public static Object subclassProxy(final BeanContext beanContext) {
  try {
    return LocalBeanProxyFactory.newProxyInstance(beanContext.getModuleContext().getClassLoader(), new Handler(beanContext),
      beanContext.getBeanClass(), IntraVmProxy.class, Serializable.class);
  } catch (final InternalError ie) { // try without intravmproxy which is maybe not loadable (in OSGi it can happen)
    return LocalBeanProxyFactory.newProxyInstance(beanContext.getModuleContext().getClassLoader(), new Handler(beanContext),
      beanContext.getBeanClass(), Serializable.class);
  }
}
origin: org.apache.openejb/openejb-core

public static Object subclassProxy(final BeanContext beanContext) {
  try {
    return LocalBeanProxyFactory.newProxyInstance(beanContext.getModuleContext().getClassLoader(), new Handler(beanContext),
      beanContext.getBeanClass(), IntraVmProxy.class, Serializable.class);
  } catch (final InternalError ie) { // try without intravmproxy which is maybe not loadable (in OSGi it can happen)
    return LocalBeanProxyFactory.newProxyInstance(beanContext.getModuleContext().getClassLoader(), new Handler(beanContext),
      beanContext.getBeanClass(), Serializable.class);
  }
}
origin: org.apache.geronimo.ext.openejb/openejb-core

public Object createProxy(Object primaryKey) {
  try {
    InterfaceType objectInterfaceType = this.interfaceType.getCounterpart();
    EjbObjectProxyHandler handler = newEjbObjectHandler(getDeploymentInfo(), primaryKey, objectInterfaceType, this.getInterfaces());
    List<Class> proxyInterfaces = new ArrayList<Class>(handler.getInterfaces().size() + 1);
    proxyInterfaces.addAll(handler.getInterfaces());
    proxyInterfaces.add(IntraVmProxy.class);
    if (InterfaceType.LOCALBEAN.equals(objectInterfaceType)) {
      return LocalBeanProxyFactory.newProxyInstance(handler.getDeploymentInfo().getClassLoader(), handler.getDeploymentInfo().getBeanClass(), handler);
    } else {
      return ProxyManager.newProxyInstance(proxyInterfaces.toArray(new Class[]{}), handler);
    }
  } catch (IllegalAccessException iae) {
    throw new RuntimeException("Could not create IVM proxy for " + getInterfaces().get(0), iae);
  }
}
org.apache.openejb.util.proxyLocalBeanProxyFactorynewProxyInstance

Popular methods of LocalBeanProxyFactory

  • createProxy
  • isProxy
  • 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

  • Creating JSON documents from java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • runOnUiThread (Activity)
  • onCreateOptionsMenu (Activity)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Top 12 Jupyter Notebook Extensions
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