Package org.jboss.metadata.web.jboss

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


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

      try
      {
         final PolicyConfigurationFactory policyConfigurationFactory = PolicyConfigurationFactory
               .getPolicyConfigurationFactory();
View Full Code Here


    * @param dep webservice deployment
    */
   void create(final Deployment dep)
   {
      final DeploymentUnit unit = WSHelper.getRequiredAttachment(dep, DeploymentUnit.class);
      JBossWebMetaData jbossWebMD = ASHelper.getOptionalAttachment(unit, JBossWebMetaData.class);
      if (jbossWebMD == null)
      {
         jbossWebMD = new JBossWebMetaData();
      }

      this.createWebAppDescriptor(dep, jbossWebMD);
      this.createJBossWebAppDescriptor(dep, jbossWebMD);

View Full Code Here

      assertNotNull(imd);
   }

   protected void assertWBListener(DeploymentUnit unit)
   {
      JBossWebMetaData jbwmd = unit.getAttachment(JBossWebMetaData.class);
      assertNotNull(jbwmd);
      List<ListenerMetaData> listeners = jbwmd.getListeners();
      assertNotNull(listeners);
      assertEquals(2, listeners.size());
      ListenerMetaData lmd = listeners.get(0);
      assertNotNull(lmd);
      assertEquals("org.jboss.weld.servlet.WeldListener", lmd.getListenerClass());
View Full Code Here

         servletName = getServletName(servlet);
      }

      if (servletName == null)
         throw new IllegalStateException("servletName is null");
      JBossWebMetaData metaData = SecurityAssociationValve.activeWebMetaData.get();
      String roleName = role;

      /**
       * If the metaData is null, this is an internal call made by RealmBase.hasResourcePermission
       */
      if (metaData != null)
      {
         ServletMetaData servletMD = metaData.getServlets().get(servletName);
         SecurityRoleRefsMetaData roleRefs = null;
         if (servletMD != null)
            roleRefs = servletMD.getSecurityRoleRefs();
         if (roleRefs != null)
         {
View Full Code Here

    * @return
    */
   private String getSecurityDomain()
   {
      String securityDomain = null;
      JBossWebMetaData jbossMetaData = getMetaData();
      if(jbossMetaData != null)
         securityDomain = jbossMetaData.getSecurityDomain();
      if(securityDomain != null)
      {
         securityDomain = SecurityUtil.unprefixSecurityDomain(securityDomain);
      }
      return securityDomain;
View Full Code Here

      if(policyConfiguration == null)
         throw new IllegalArgumentException("Policy Configuration is null");
     
      if(metadata instanceof JBossWebMetaData)
      {
         JBossWebMetaData wmd = (JBossWebMetaData)metadata; 
         WebPermissionMapping.createPermissions(wmd, policyConfiguration);
      }
      else if(metadata instanceof JBossEnterpriseBeanMetaData)
      {
         JBossEnterpriseBeanMetaData bmd = (JBossEnterpriseBeanMetaData)metadata; 
View Full Code Here

                                              Boolean passivation,
                                              Integer maxIdle,
                                              Integer minIdle,
                                              Boolean useJK)
   {
      JBossWebMetaData webMetaData = new JBossWebMetaData();
      webMetaData.setDistributable(new EmptyMetaData());
      webMetaData.setMaxActiveSessions(maxSessions);
      PassivationConfig pcfg = new PassivationConfig();
      pcfg.setUseSessionPassivation(passivation);
      pcfg.setPassivationMaxIdleTime(maxIdle);
      pcfg.setPassivationMinIdleTime(minIdle);
      webMetaData.setPassivationConfig(pcfg);
      ReplicationConfig repCfg = new ReplicationConfig();
      repCfg.setReplicationGranularity(ReplicationGranularity.SESSION);
      repCfg.setReplicationTrigger(ReplicationTrigger.SET_AND_NON_PRIMITIVE_GET);
      repCfg.setUseJK(useJK);
      webMetaData.setReplicationConfig(repCfg);
      return webMetaData;
   }
View Full Code Here

      log.debug("AbstractWebContainer.parseWebAppDescriptors, Begin");
      InitialContext iniCtx = new InitialContext();
      Context envCtx = null;
      Thread currentThread = Thread.currentThread();
      ClassLoader currentLoader = currentThread.getContextClassLoader();
      JBossWebMetaData metaData = webApp.getMetaData();
      try
      {
         // Create a java:comp/env environment unique for the web application
         log.debug("Creating ENC using ClassLoader: " + loader);
         ClassLoader parent = loader.getParent();
         while (parent != null)
         {
            log.debug(".." + parent);
            parent = parent.getParent();
         }
         // TODO: The enc should be an input?
         currentThread.setContextClassLoader(loader);
         // webApp.setENCLoader(loader);
         envCtx = (Context)iniCtx.lookup("java:comp");

         // TODO: inject the ORB
         try
         {
            ObjectName ORB_NAME = new ObjectName("jboss:service=CorbaORB");
            org.omg.CORBA.ORB orb = (org.omg.CORBA.ORB)server.getAttribute(ORB_NAME, "ORB");
            // Bind the orb
            if (orb != null)
            {
               NonSerializableFactory.rebind(envCtx, "ORB", orb);
               log.debug("Bound java:comp/ORB");
            }
         }
         catch (Throwable t)
         {
            log.debug("Unable to retrieve orb" + t.toString());
         }

         // TODO: injection, Add a link to the global transaction manager
         envCtx.bind("UserTransaction", new LinkRef("UserTransaction"));
         log.debug("Linked java:comp/UserTransaction to JNDI name: UserTransaction");
         envCtx = envCtx.createSubcontext("env");
         processEncReferences(webApp, envCtx);
      }
      finally
      {
         currentThread.setContextClassLoader(currentLoader);
      }

      String securityDomain = metaData.getSecurityDomain();
      log.debug("linkSecurityDomain");
      linkSecurityDomain(securityDomain, envCtx);
      log.debug("AbstractWebContainer.parseWebAppDescriptors, End");
   }
View Full Code Here

   }

   protected void processEncReferences(WebApplication webApp, Context envCtx) throws ClassNotFoundException, NamingException
   {
      DeploymentUnit unit = webApp.getDeploymentUnit();
      JBossWebMetaData metaData = webApp.getMetaData();
      EnvironmentEntriesMetaData envEntries = metaData.getEnvironmentEntries();
      log.debug("addEnvEntries");
      addEnvEntries(envEntries, envCtx);
      ResourceEnvironmentReferencesMetaData resourceEnvRefs = metaData.getResourceEnvironmentReferences();
      log.debug("linkResourceEnvRefs");
      linkResourceEnvRefs(resourceEnvRefs, envCtx);
      ResourceReferencesMetaData resourceRefs = metaData.getResourceReferences();
      log.debug("linkResourceRefs");
      linkResourceRefs(resourceRefs, envCtx);
      log.debug("linkMessageDestinationRefs");
      MessageDestinationReferencesMetaData msgRefs = metaData.getMessageDestinationReferences();
      linkMessageDestinationRefs(unit, msgRefs, envCtx);
      EJBReferencesMetaData ejbRefs = metaData.getEjbReferences();
      log.debug("linkEjbRefs");
      linkEjbRefs(unit, ejbRefs, envCtx);
      EJBLocalReferencesMetaData ejbLocalRefs = metaData.getEjbLocalReferences();
      log.debug("linkEjbLocalRefs");
      linkEjbLocalRefs(unit, ejbLocalRefs, envCtx);
      log.debug("linkServiceRefs");
      ServiceReferencesMetaData serviceRefs = metaData.getServiceReferences();
      linkServiceRefs(unit, serviceRefs, envCtx);
   }
View Full Code Here

      assertNull(setHandler.getCheckedAttributes().get("count"));     
   }
  
   protected void startManagers(String warname, int maxInactive, int maxIdle, int maxUnreplicated) throws Exception
   {
      JBossWebMetaData metadata = createWebMetaData(getReplicationGranularity(), getReplicationTrigger(), -1, true, maxIdle, -1, true, maxUnreplicated);
      for (int i = 0; i < cacheContainers.length; i++)
      {
         managers[i] = createManager(warname, maxInactive, cacheContainers[i], null);
         managers[i].init(warname, metadata);
         managers[i].start();
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.