Package org.jboss.invocation.iiop

Examples of org.jboss.invocation.iiop.ServantRegistries


         iri.finishBuild();
      }
     
      // TODO: obtain the iiop invoker name properly
      ObjectName invokerName = new ObjectName("jboss:service=invoker,type=iiop");
      ServantRegistries servantRegistries = (ServantRegistries) Registry.lookup(invokerName);
      if(servantRegistries == null)
         throw new Exception("can't find iiop invoker");
      ServantRegistryKind registryWithTransientPOA;
      ServantRegistryKind registryWithPersistentPOA;
      if(iiop.poa().equals(IIOP.POA_PER_SERVANT))
      {
         registryWithTransientPOA = ServantRegistryKind.TRANSIENT_POA_PER_SERVANT;
         registryWithPersistentPOA = ServantRegistryKind.PERSISTENT_POA_PER_SERVANT;
      }
      else if(iiop.poa().equals(IIOP.POA_SHARED))
      {
         registryWithTransientPOA = ServantRegistryKind.SHARED_TRANSIENT_POA;
         registryWithPersistentPOA = ServantRegistryKind.SHARED_PERSISTENT_POA;
      }
      else
         throw new IllegalArgumentException("@IIOP.poa can only be 'per-servant' or 'shared'");
      // Only works for session container
      this.servantRegistry = servantRegistries.getServantRegistry(registryWithTransientPOA);
      this.homeServantRegistry = servantRegistries.getServantRegistry(registryWithPersistentPOA); // TODO: why is home interface in persistent poa?
     
      // Hack in a WebCL (from org.jboss.ejb.EjbModule.initializeContainer)
      // TODO:  seting up a WebClassLoader needs to be done somewhere where
      ObjectName on = container.getObjectName();
      this.wcl = new EJB3IIOPWebClassLoader(on, (RealClassLoader) ((SessionContainer) container).getClassloader(), getJndiName());
View Full Code Here


/* 281 */         this.iri.mapClass(homeInterface);
/* 282 */       this.iri.finishBuild();
/*     */     }
/*     */
/* 286 */     ObjectName invokerName = new ObjectName("jboss:service=invoker,type=iiop");
/* 287 */     ServantRegistries servantRegistries = (ServantRegistries)Registry.lookup(invokerName);
/* 288 */     if (servantRegistries == null)
/* 289 */       throw new Exception("can't find iiop invoker");
/*     */     ServantRegistryKind registryWithPersistentPOA;
/* 292 */     if (iiop.poa().equals("per-servant"))
/*     */     {
/* 294 */       ServantRegistryKind registryWithTransientPOA = ServantRegistryKind.TRANSIENT_POA_PER_SERVANT;
/* 295 */       registryWithPersistentPOA = ServantRegistryKind.PERSISTENT_POA_PER_SERVANT;
/*     */     }
/*     */     else
/*     */     {
/*     */       ServantRegistryKind registryWithPersistentPOA;
/* 297 */       if (iiop.poa().equals("shared"))
/*     */       {
/* 299 */         ServantRegistryKind registryWithTransientPOA = ServantRegistryKind.SHARED_TRANSIENT_POA;
/* 300 */         registryWithPersistentPOA = ServantRegistryKind.SHARED_PERSISTENT_POA;
/*     */       }
/*     */       else {
/* 303 */         throw new IllegalArgumentException("@IIOP.poa can only be 'per-servant' or 'shared'");
/*     */       }
/*     */     }
/*     */     ServantRegistryKind registryWithPersistentPOA;
/*     */     ServantRegistryKind registryWithTransientPOA;
/* 305 */     this.servantRegistry = servantRegistries.getServantRegistry(registryWithTransientPOA);
/* 306 */     this.homeServantRegistry = servantRegistries.getServantRegistry(registryWithPersistentPOA);
/*     */
/* 310 */     ObjectName on = this.container.getObjectName();
/* 311 */     this.wcl = new EJB3IIOPWebClassLoader(on, (RealClassLoader)this.container.getClassloader(), getJndiName());
/* 312 */     WebServiceMBean webServer = getWebServer();
/* 313 */     URL[] codebaseURLs = { webServer.addClassLoader(this.wcl) };
View Full Code Here

TOP

Related Classes of org.jboss.invocation.iiop.ServantRegistries

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.