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

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (Timer)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • 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