Package org.jboss.web

Examples of org.jboss.web.WebServiceMBean


   }

   @Override
   protected void destroyService() throws Exception
   {
      WebServiceMBean webServer = null;
      if (webServiceName != null)
      {
         webServer = (WebServiceMBean) MBeanProxyExt.create(WebServiceMBean.class, webServiceName);
      }
      ListIterator iter = containerOrdering.listIterator(containerOrdering.size());
      while (iter.hasPrevious())
      {
         Container con = (Container) iter.previous();
         ObjectName jmxName = con.getJmxName();
         int conState = con.getState();
         boolean destroyContainer = true;
         log.debug("Looking to destroy container: " + jmxName + ", state: " + con.getStateString() + ", destroy: "
               + destroyContainer);

         // always unregister from Registry
         int jmxHash = jmxName.hashCode();
         Registry.unbind(new Integer(jmxHash));

         // Unregister the web classloader
         // Removing the wcl should probably be done in stop of the container,
         // but I don't want to look for errors today.
         if (webServer != null)
         {
            ClassLoader wcl = con.getWebClassLoader();
            if (wcl != null)
            {
               try
               {
                  webServer.removeClassLoader(wcl);
               }
               catch (Throwable e)
               {
                  log.warn("Failed to unregister webClassLoader", e);
               }
View Full Code Here


         throw new DeploymentException("Failed to create WebClassLoader of class " + webClassLoaderName + ": ", e);
      }

      if (webServiceName != null)
      {
         WebServiceMBean webServer = (WebServiceMBean) MBeanProxyExt.create(WebServiceMBean.class, webServiceName);
         URL[] codebase = {webServer.addClassLoader(wcl)};

         wcl.setWebURLs(codebase);
      } // end of if ()

      container.setWebClassLoader(wcl);
View Full Code Here

     
      // 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());
      WebServiceMBean webServer = getWebServer();
      URL[] codebaseURLs = {webServer.addClassLoader(wcl)};
      wcl.setWebURLs(codebaseURLs);
     
      // setup a codebase policy, the CodebaseInterceptor will translate this to a TAG_JAVA_CODEBASE
      String codebaseString = wcl.getCodebaseString();
      log.debug("codebase = " + codebaseString);
View Full Code Here

   }

   @Override
   protected void destroyService() throws Exception
   {
      WebServiceMBean webServer = null;
      if (webServiceName != null)
      {
         webServer = (WebServiceMBean) MBeanProxyExt.create(WebServiceMBean.class, webServiceName);
      }
      ListIterator iter = containerOrdering.listIterator(containerOrdering.size());
      while (iter.hasPrevious())
      {
         Container con = (Container) iter.previous();
         ObjectName jmxName = con.getJmxName();
         int conState = con.getState();
         boolean destroyContainer = true;
         log.debug("Looking to destroy container: " + jmxName + ", state: " + con.getStateString() + ", destroy: "
               + destroyContainer);

         // always unregister from Registry
         int jmxHash = jmxName.hashCode();
         Registry.unbind(new Integer(jmxHash));

         // Unregister the web classloader
         // Removing the wcl should probably be done in stop of the container,
         // but I don't want to look for errors today.
         if (webServer != null)
         {
            ClassLoader wcl = con.getWebClassLoader();
            if (wcl != null)
            {
               try
               {
                  webServer.removeClassLoader(wcl);
               }
               catch (Throwable e)
               {
                  log.warn("Failed to unregister webClassLoader", e);
               }
View Full Code Here

         throw new DeploymentException("Failed to create WebClassLoader of class " + webClassLoaderName + ": ", e);
      }

      if (webServiceName != null)
      {
         WebServiceMBean webServer = (WebServiceMBean) MBeanProxyExt.create(WebServiceMBean.class, webServiceName);
         URL[] codebase = {webServer.addClassLoader(wcl)};

         wcl.setWebURLs(codebase);
      } // end of if ()

      container.setWebClassLoader(wcl);
View Full Code Here

/*      */     }
/*      */   }
/*      */
/*      */   protected void destroyService() throws Exception
/*      */   {
/*  518 */     WebServiceMBean webServer = null;
/*  519 */     if (this.webServiceName != null)
/*      */     {
/*  521 */       webServer = (WebServiceMBean)MBeanProxyExt.create(WebServiceMBean.class, this.webServiceName);
/*      */     }
/*      */
/*  525 */     ListIterator iter = this.containerOrdering.listIterator(this.containerOrdering.size());
/*      */
/*  527 */     String contextID = this.appMetaData.getJaccContextID();
/*      */
/*  529 */     String securityDomain = SecurityUtil.unprefixSecurityDomain(this.appMetaData.getSecurityDomain());
/*  530 */     if (securityDomain != null)
/*      */     {
/*  533 */       InitialContext ic = new InitialContext();
/*  534 */       String amCtx = "java:/jaas/" + securityDomain + "/authorizationMgr";
/*      */       try
/*      */       {
/*  537 */         AuthorizationManager authzmgr = (AuthorizationManager)ic.lookup(amCtx);
/*  538 */         if ((authzmgr instanceof PolicyRegistration))
/*      */         {
/*  540 */           PolicyRegistration xam = (PolicyRegistration)authzmgr;
/*  541 */           xam.deRegisterPolicy(contextID);
/*      */         }
/*      */       }
/*      */       catch (ClassCastException cce)
/*      */       {
/*  546 */         log.trace("CCE experienced in looking up authorization manager for " + securityDomain, cce);
/*      */       }
/*      */     }
/*      */
/*  550 */     while (iter.hasPrevious())
/*      */     {
/*  552 */       Container con = (Container)iter.previous();
/*  553 */       ObjectName jmxName = con.getJmxName();
/*  554 */       int conState = con.getState();
/*  555 */       boolean destroyContainer = true;
/*  556 */       log.debug("Looking to destroy container: " + jmxName + ", state: " + con.getStateString() + ", destroy: " + destroyContainer);
/*      */
/*  560 */       int jmxHash = jmxName.hashCode();
/*  561 */       Registry.unbind(new Integer(jmxHash));
/*      */
/*  566 */       if (webServer != null)
/*      */       {
/*  568 */         ClassLoader wcl = con.getWebClassLoader();
/*  569 */         if (wcl != null)
/*      */         {
/*      */           try
/*      */           {
/*  573 */             webServer.removeClassLoader(wcl);
/*      */           }
/*      */           catch (Throwable e)
/*      */           {
/*  577 */             log.warn("Failed to unregister webClassLoader", e);
/*      */           }
View Full Code Here

/*  807 */       throw new DeploymentException("Failed to create WebClassLoader of class " + webClassLoaderName + ": ", e);
/*      */     }
/*      */
/*  812 */     if (this.webServiceName != null)
/*      */     {
/*  814 */       WebServiceMBean webServer = (WebServiceMBean)MBeanProxyExt.create(WebServiceMBean.class, this.webServiceName);
/*      */
/*  817 */       URL[] codebase = { webServer.addClassLoader(wcl) };
/*      */
/*  820 */       wcl.setWebURLs(codebase);
/*      */     }
/*      */
/*  823 */     container.setWebClassLoader(wcl);
View Full Code Here

/* 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) };
/* 314 */     this.wcl.setWebURLs(codebaseURLs);
/*     */
/* 317 */     String codebaseString = this.wcl.getCodebaseString();
/* 318 */     log.debug("codebase = " + codebaseString);
/* 319 */     Any codebase = this.orb.create_any();
View Full Code Here

TOP

Related Classes of org.jboss.web.WebServiceMBean

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.