Package java.lang.reflect

Examples of java.lang.reflect.Proxy


        for (Class businessIntfClass : localBusinessIntfs) {
            EJBLocalObjectInvocationHandlerDelegate delegate =
                new EJBLocalObjectInvocationHandlerDelegate(
                        businessIntfClass, getContainerId(), handler);
            Proxy proxy = (Proxy) Proxy.newProxyInstance(
                    loader, new Class[] { IndirectlySerializable.class,
                                   businessIntfClass}, delegate);
            localBusinessObjImpl.mapClientObject(businessIntfClass.getName(),
                    proxy);
        }
View Full Code Here


        Class businessIntfClass = ejbGeneratedOptionalLocalBusinessIntfClass;
        EJBLocalObjectInvocationHandlerDelegate delegate =
            new EJBLocalObjectInvocationHandlerDelegate(
                    businessIntfClass, getContainerId(), handler);
        Proxy proxy = (Proxy) Proxy.newProxyInstance(
                loader, new Class[] { IndirectlySerializable.class,
                               businessIntfClass}, delegate);

        String beanSubClassName = ejbGeneratedOptionalLocalBusinessIntfClass.getName() + "__Bean__";
View Full Code Here

/* 178 */       if (this.jndiEnv != null)
/* 179 */         ic = new InitialContext(this.jndiEnv);
/*     */       else {
/* 181 */         ic = new InitialContext();
/*     */       }
/* 183 */       Proxy proxy = (Proxy)ic.lookup(this.jndiName);
/*     */
/* 186 */       InvocationHandler ih = Proxy.getInvocationHandler(proxy);
/* 187 */       return (EJBObject)ih.invoke(proxy, GET_EJB_OBJECT, new Object[] { this.id });
/*     */     }
/*     */     catch (RemoteException e)
View Full Code Here

/* 378 */         return this.server.invoke(this.objectName, "equals", new Object[] { args[0] }, new String[] { "java.lang.Object" });
/*     */       }
/*     */
/* 383 */       if (Proxy.isProxyClass(args[0].getClass()))
/*     */       {
/* 385 */         Proxy prxy = (Proxy)args[0];
/* 386 */         return new Boolean(equals(Proxy.getInvocationHandler(prxy)));
/*     */       }
/*     */
/* 390 */       return new Boolean(equals(args[0]));
/*     */     }
View Full Code Here

/*     */   {
/*     */     try
/*     */     {
/* 168 */       InitialContext ic = InitialContextFactory.getInitialContext(this.jndiEnv);
/*     */
/* 170 */       Proxy proxy = (Proxy)ic.lookup(this.jndiName);
/*     */
/* 172 */       return (EJBObject)proxy;
/*     */     }
/*     */     catch (Throwable t)
/*     */     {
View Full Code Here

/*     */   {
/*     */     try
/*     */     {
/*  93 */       InitialContext ic = InitialContextFactory.getInitialContext(this.jndiEnv);
/*     */
/*  95 */       Proxy proxy = (Proxy)ic.lookup(this.jndiName);
/*     */
/*  97 */       return (EJBObject)proxy;
/*     */     }
/*     */     catch (Throwable t)
/*     */     {
View Full Code Here

                            }
                            return null;
                        }
                    });

                Proxy proxy = (Proxy) proxyField.get(managedBean);

                InterceptorInvoker invoker = (InterceptorInvoker) Proxy.getInvocationHandler(proxy);

                managedBeanInstance = invoker.getTargetInstance();
View Full Code Here


        // Proxy invocation handler. Also implements InterceptorInvoker.
        InterceptorInvocationHandler invoker = new InterceptorInvocationHandler();

        Proxy proxy = (Proxy) Proxy.newProxyInstance(
            subClass.getClassLoader(), new Class[] { subClassIntf }, invoker);


        // Object passed back to the caller.
        OptionalLocalInterfaceProvider provider =
View Full Code Here

            localObj = (EJBLocalObjectInvocationHandlerDelegate) Proxy.getInvocationHandler(ejbRef);
           
        } catch(IllegalArgumentException iae) {

            Proxy proxy;

            if( ejbRef instanceof OptionalLocalInterfaceProvider ) {

                try {
View Full Code Here

    public Object createMessageBeanProxy(InvocationHandler handler) throws Exception {

        if (isModernMessageListener(messageListenerType_)) {
            // EJB 3.2 No-interface MDB View

            Proxy proxy = (Proxy) Proxy.newProxyInstance(loader, new Class[]{messageBeanInterface_}, handler);
            OptionalLocalInterfaceProvider provider = (OptionalLocalInterfaceProvider) messageBeanSubClass_.newInstance();
            provider.setOptionalLocalIntfProxy(proxy);

            return provider;
        } else {
View Full Code Here

TOP

Related Classes of java.lang.reflect.Proxy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.