Package org.jboss.proxy

Examples of org.jboss.proxy.ClientContainer


         {
            String secDomain = container.getSecurityManager().getSecurityDomain();
            context.setValue(InvocationKey.SECURITY_DOMAIN, secDomain);
         }
        
         ClientContainer client = null;
         EJBProxyFactoryContainer pfc = (EJBProxyFactoryContainer) container;
         Class[] ifaces = {pfc.getHomeClass(), Class.forName("javax.ejb.Handle")};
         if( includeIClientIface )
         {
            ifaces = new Class[] {IClientContainer.class, pfc.getHomeClass(),
                           Class.forName("javax.ejb.Handle")};
            client = new ClientContainerEx(context);
         }
         else
         {
            client = new ClientContainer(context);
         }
         loadInterceptorChain(homeInterceptorClasses, client);

         // Create the EJBHome
         this.home = (EJBHome) Proxy.newProxyInstance(
               // Class loader pointing to the right classes from deployment
               pfc.getHomeClass().getClassLoader(),
               // The classes we want to implement home and handle
               ifaces,
               // The home proxy as invocation handler
               client);

         // Create stateless session object
         // Same instance is used for all objects
         if(ejbMetaData.isStatelessSession() == true)
         {
            // Create a stack from the description (in the future) for now we hardcode it
            context = new InvocationContext();

            context.setObjectName(jmxNameHashInteger);
            context.setValue(InvocationKey.JNDI_NAME, jndiBinding);
            // The behavior for home proxying should be isolated in an interceptor FIXME
            context.setInvoker(beanInvoker);
            context.setInvokerProxyBinding(invokerMetaData.getName());
            context.setValue(InvocationKey.EJB_HOME, home);
           
            if(container.getSecurityManager() != null)
            {
               String secDomain = container.getSecurityManager().getSecurityDomain();
               context.setValue(InvocationKey.SECURITY_DOMAIN, secDomain);
            }

            Class[] ssifaces = {pfc.getRemoteClass()};
            if( includeIClientIface )
            {
               ssifaces = new Class[] {IClientContainer.class, pfc.getRemoteClass()};              
               client = new ClientContainerEx(context);              
            }
            else
            {
               client = new ClientContainer(context);
            }
            loadInterceptorChain(beanInterceptorClasses, client);

            this.statelessObject =
               (EJBObject)Proxy.newProxyInstance(
View Full Code Here


      {
         String secDomain = container.getSecurityManager().getSecurityDomain();
         context.setValue(InvocationKey.SECURITY_DOMAIN, secDomain);
      }
     
      ClientContainer client;
      if( includeIClientIface )
      {
         client = new ClientContainerEx(context);
      }
      else
      {
         client = new ClientContainer(context);
      }

      try
      {
         loadInterceptorChain(beanInterceptorClasses, client);
View Full Code Here

         {
            String secDomain = container.getSecurityManager().getSecurityDomain();
            context.setValue(InvocationKey.SECURITY_DOMAIN, secDomain);
         }
        
         ClientContainer client;
         if( includeIClientIface )
         {
            client = new ClientContainerEx(context);
         }
         else
         {
            client = new ClientContainer(context);
         }

         try
         {
            loadInterceptorChain(beanInterceptorClasses, client);
View Full Code Here

/*     */
/* 389 */       context.setInvoker(this.homeInvoker);
/* 390 */       context.setValue(InvocationKey.EJB_METADATA, this.ejbMetaData);
/* 391 */       context.setInvokerProxyBinding(this.invokerMetaData.getName());
/*     */
/* 393 */       ClientContainer client = null;
/* 394 */       EJBProxyFactoryContainer pfc = (EJBProxyFactoryContainer)this.container;
/* 395 */       Class[] ifaces = { pfc.getHomeClass(), Class.forName("javax.ejb.Handle") };
/* 396 */       if (this.includeIClientIface)
/*     */       {
/* 398 */         ifaces = new Class[] { IClientContainer.class, pfc.getHomeClass(), Class.forName("javax.ejb.Handle") };
/*     */
/* 400 */         client = new ClientContainerEx(context);
/*     */       }
/*     */       else
/*     */       {
/* 404 */         client = new ClientContainer(context);
/*     */       }
/* 406 */       loadInterceptorChain(this.homeInterceptorClasses, client);
/*     */
/* 409 */       this.home = ((EJBHome)Proxy.newProxyInstance(pfc.getHomeClass().getClassLoader(), ifaces, client));
/*     */
/* 419 */       if (this.ejbMetaData.isStatelessSession() == true)
/*     */       {
/* 422 */         context = new InvocationContext();
/*     */
/* 424 */         context.setObjectName(this.jmxNameHashInteger);
/* 425 */         context.setValue(InvocationKey.JNDI_NAME, this.jndiBinding);
/*     */
/* 427 */         context.setInvoker(this.beanInvoker);
/* 428 */         context.setInvokerProxyBinding(this.invokerMetaData.getName());
/* 429 */         context.setValue(InvocationKey.EJB_HOME, this.home);
/*     */
/* 431 */         Class[] ssifaces = { pfc.getRemoteClass() };
/* 432 */         if (this.includeIClientIface)
/*     */         {
/* 434 */           ssifaces = new Class[] { IClientContainer.class, pfc.getRemoteClass() };
/* 435 */           client = new ClientContainerEx(context);
/*     */         }
/*     */         else
/*     */         {
/* 439 */           client = new ClientContainer(context);
/*     */         }
/* 441 */         loadInterceptorChain(this.beanInterceptorClasses, client);
/*     */
/* 443 */         this.statelessObject = ((EJBObject)Proxy.newProxyInstance(pfc.getRemoteClass().getClassLoader(), ssifaces, client));
/*     */       }
View Full Code Here

/* 563 */     context.setInvoker(this.beanInvoker);
/* 564 */     log.debug("seting invoker proxy binding for stateful session: " + this.invokerMetaData.getName());
/* 565 */     context.setInvokerProxyBinding(this.invokerMetaData.getName());
/* 566 */     context.setValue(InvocationKey.EJB_HOME, this.home);
/* 567 */     context.setValue("InvokerID", Invoker.ID);
/*     */     ClientContainer client;
/*     */     ClientContainer client;
/* 570 */     if (this.includeIClientIface)
/*     */     {
/* 572 */       client = new ClientContainerEx(context);
/*     */     }
/*     */     else
/*     */     {
/* 576 */       client = new ClientContainer(context);
/*     */     }
/*     */
/*     */     try
/*     */     {
/* 581 */       loadInterceptorChain(this.beanInterceptorClasses, client);
View Full Code Here

/* 615 */       context.setCacheId(id);
/* 616 */       context.setValue(InvocationKey.JNDI_NAME, this.jndiBinding);
/* 617 */       context.setInvoker(this.beanInvoker);
/* 618 */       context.setInvokerProxyBinding(this.invokerMetaData.getName());
/* 619 */       context.setValue(InvocationKey.EJB_HOME, this.home);
/*     */       ClientContainer client;
/*     */       ClientContainer client;
/* 622 */       if (this.includeIClientIface)
/*     */       {
/* 624 */         client = new ClientContainerEx(context);
/*     */       }
/*     */       else
/*     */       {
/* 628 */         client = new ClientContainer(context);
/*     */       }
/*     */
/*     */       try
/*     */       {
/* 633 */         loadInterceptorChain(this.beanInterceptorClasses, client);
View Full Code Here

TOP

Related Classes of org.jboss.proxy.ClientContainer

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.