List of usage examples for javax.jms XASession getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:com.atomikos.jms.AtomikosJmsXaSessionProxy.java
public static Object newInstance(XASession s, XATransactionalResource jmsTransactionalResource, SessionHandleStateChangeListener pooledConnection, SessionHandleStateChangeListener connectionProxy) throws JMSException { AtomikosJmsXaSessionProxy proxy = new AtomikosJmsXaSessionProxy(s, jmsTransactionalResource, pooledConnection, connectionProxy); Set<Class> interfaces = PropertyUtils.getAllImplementedInterfaces(s.getClass()); //see case 24532 interfaces.add(DynamicProxy.class); Class[] interfaceClasses = (Class[]) interfaces.toArray(new Class[0]); Set<Class> minimumSetOfInterfaces = new HashSet<Class>(); minimumSetOfInterfaces.add(Reapable.class); minimumSetOfInterfaces.add(DynamicProxy.class); minimumSetOfInterfaces.add(javax.jms.Session.class); Class[] minimumSetOfInterfaceClasses = (Class[]) minimumSetOfInterfaces.toArray(new Class[0]); List<ClassLoader> classLoaders = new ArrayList<ClassLoader>(); classLoaders.add(Thread.currentThread().getContextClassLoader()); classLoaders.add(s.getClass().getClassLoader()); classLoaders.add(AtomikosJmsXaSessionProxy.class.getClassLoader()); return (Session) ClassLoadingHelper.newProxyInstance(classLoaders, minimumSetOfInterfaceClasses, interfaceClasses, proxy);//from w w w .ja v a2s .c om }