Package org.jboss.metadata.web.jboss

Examples of org.jboss.metadata.web.jboss.JBossWebMetaData


    * @param jaxws if passed value is <b>true</b> JAXWS servlets list will be returned, otherwise JAXRPC servlets list
    * @return either JAXRPC or JAXWS servlets list
    */
   private static List<ServletMetaData> getWebServiceServlets(final DeploymentUnit unit, final boolean jaxws)
   {
      final JBossWebMetaData jbossWebMD = ASHelper.getRequiredAttachment(unit, JBossWebMetaData.class);
      final ClassLoader loader = unit.getClassLoader();
      final List<ServletMetaData> endpoints = new ArrayList<ServletMetaData>();

      for (ServletMetaData servletMD : jbossWebMD.getServlets())
      {
         final Class<?> endpointClass = ASHelper.getEndpointClass(servletMD, loader);

         if (endpointClass != null)
         {
View Full Code Here


   }

   public void build(DeploymentUnit unit, Set<String> outputs,
         Map<String, ManagedObject> managedObjects) throws DeploymentException
   {
      JBossWebMetaData meta = unit.getAttachment(JBossWebMetaData.class);
      if (meta == null)
         return;

      ManagedObject mo = ManagedObjectFactory.getInstance().createManagedObject(ContextMO.class);
      if (mo == null)
         throw new DeploymentException("could not create managed object");

      mo.getProperty("contextRoot").setValue(SimpleValueSupport.wrap(meta.getContextRoot()));
      managedObjects.put("ContextMO", mo);
   }
View Full Code Here

    */
   @Override
   public void start(final Deployment dep)
   {
      final DeploymentUnit unit = WSHelper.getRequiredAttachment(dep, DeploymentUnit.class);
      final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment(dep, JBossWebMetaData.class);
      final Map<Class<? extends Annotation>, ReferenceResolver> resolvers = this.getResolvers(unit);

      if (WSHelper.isJaxwsJseDeployment(dep))
      {
         this.log.debug("Building injection meta data for JAXWS JSE webservice deployment: " + dep.getSimpleName());
         final EnvironmentEntriesMetaData envEntriesMD = jbossWebMD.getEnvironmentEntries();

         // iterate through all POJO endpoints
         for (Endpoint endpoint : dep.getService().getEndpoints())
         {
            // build POJO injections meta data
View Full Code Here

    *
    * @param dep webservice deployment
    */
   void modify(final Deployment dep)
   {
      final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment(dep, JBossWebMetaData.class);

      this.configureEndpoints(dep, jbossWebMD);
      this.modifyContextRoot(dep, jbossWebMD);
   }
View Full Code Here

    * @param dep webservice deployment
    * @return universal JSE meta data model
    */
   JSEArchiveMetaData create(final Deployment dep)
   {
      final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment(dep, JBossWebMetaData.class);
      final JSEArchiveMetaData jseArchiveMD = new JSEArchiveMetaData();

      // set context root
      final String contextRoot = this.getContextRoot(dep, jbossWebMD);
      jseArchiveMD.setContextRoot(contextRoot);

      // set servlet url patterns mappings
      final Map<String, String> servletMappings = this.getServletUrlPatternsMappings(jbossWebMD);
      jseArchiveMD.setServletMappings(servletMappings);

      // set servlet class names mappings
      final Map<String, String> servletClassNamesMappings = this.getServletClassMappings(jbossWebMD);
      jseArchiveMD.setServletClassNames(servletClassNamesMappings);

      // set security domain
      final String securityDomain = jbossWebMD.getSecurityDomain();
      jseArchiveMD.setSecurityDomain(securityDomain);

      // set wsdl location resolver
      final PublishLocationAdapter resolver = new PublishLocationAdapterImpl(jbossWebMD.getWebserviceDescriptions());
      jseArchiveMD.setPublishLocationAdapter(resolver);

      // set security meta data
      final List<JSESecurityMetaData> jseSecurityMDs = this.getSecurityMetaData(jbossWebMD.getSecurityConstraints());
      jseArchiveMD.setSecurityMetaData(jseSecurityMDs);

      // set config name and file
      this.setConfigNameAndFile(jseArchiveMD, jbossWebMD);

View Full Code Here

         }
      }

      if (sharedWebMetaData != null || sharedJBossWebMetaData != null)
      {
         JBossWebMetaData clone = new JBoss60WebMetaData();
         clone.merge(sharedJBossWebMetaData, sharedWebMetaData);
         unit.addAttachment(SHARED_JBOSSWEB_ATTACHMENT_NAME, clone);
      }
  }
View Full Code Here

      ++testCount;
     
      log.info("Starting cache containers");
     
      String warName = "test" + testCount;
      JBossWebMetaData webMetaData = SessionTestUtil.createWebMetaData(100);
      for (int i = 0; i < cacheContainers.length; ++i)
      {
         cacheContainers[i] = SessionTestUtil.createCacheContainer(false, null, false, false);
         cacheContainers[i].start();
      }
View Full Code Here

      ++testCount;
      cacheContainer = SessionTestUtil.createCacheContainer(true, null, false, false);
      cacheContainer.start();
     
      manager = SessionTestUtil.createManager("test" + testCount, 5, cacheContainer, null);
      JBossWebMetaData webMetaData = createWebMetaData(null, null, null, null, null);
      manager.init("test.war", webMetaData);     
      manager.start();

      assertFalse("With no config, not using JK", manager.getUseJK());
     
View Full Code Here

     
      cacheContainer = SessionTestUtil.createCacheContainer(true, null, false, false);
      cacheContainer.start();
      manager = SessionTestUtil.createManager("test" + testCount, 5, cacheContainer, null);
     
      JBossWebMetaData webMetaData = createWebMetaData(null, null, null, null, null);
      manager.init("test.war", webMetaData);     
      manager.start();

      assertEquals("With no config, using instant", SnapshotMode.INSTANT, manager.getSnapshotMode());
     
      manager.stop();
     
      manager = SessionTestUtil.createManager("test" + ++testCount, 5, cacheContainer, null);
     
      webMetaData = createWebMetaData(null, null, null, null, Boolean.TRUE);
      webMetaData.getReplicationConfig().setSnapshotMode(SnapshotMode.INTERVAL);
      webMetaData.getReplicationConfig().setSnapshotInterval(new Integer(2));
      manager.init("test.war", webMetaData);     
      manager.start();

      assertEquals("With config, using interval", SnapshotMode.INTERVAL, manager.getSnapshotMode());
      assertEquals("With config, using 2 second interval", 2, manager.getSnapshotInterval());
View Full Code Here

   public synchronized void startModule() throws Exception
   {
      if (this.unit == null || this.container == null || this.deployment == null)
         throw new IllegalStateException("WebModules cannot be restarted, and must be redeployed");
      // Get the war URL
      JBossWebMetaData metaData = unit.getAttachment(JBossWebMetaData.class);
      WebApplication webApp = deployment.start(unit, metaData);
      String warURL = unit.getName();
      container.addDeployedApp(warURL, webApp);
   }
View Full Code Here

TOP

Related Classes of org.jboss.metadata.web.jboss.JBossWebMetaData

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.