Package org.jboss.resource.metadata.mcf

Examples of org.jboss.resource.metadata.mcf.SecurityMetaData


            // If we have an XAResourceRecoveryRegistry and the deployment is XA
            // lets register it for XA Resource Recovery using the "recover" definitions
            // from the -ds.xml file. Fallback to the standard definitions for
            // user name, password. Keep a seperate reference to the security-domain

            SecurityMetaData recoverSecurityDomainMD = xdsdm.getRecoverSecurityMetaData();
            if (recoverSecurityDomainMD != null)
               recoverSecurityDomain = recoverSecurityDomainMD.getDomain();

            SecurityMetaData securityDomainMD = xdsdm.getSecurityMetaData();
            if (securityDomainMD != null)
               securityDomain = securityDomainMD.getDomain();

            recoverUserName = xdsdm.getRecoverUserName();
            recoverPassword = xdsdm.getRecoverPassWord();

            if (recoverUserName == null)
View Full Code Here


      LocalDSInstanceClassFactory icf = new LocalDSInstanceClassFactory(mof);
      icf.setMof(mof);
      mof.setInstanceClassFactory(LocalDataSourceDeploymentMetaData.class, icf);
      LocalDataSourceDeploymentMetaData lds = new LocalDataSourceDeploymentMetaData();
      // Set a SecurityMetaData to validate its MO
      SecurityMetaData smd = new ApplicationManagedSecurityMetaData();
      smd.setDomain("java:/jaas/SomeDomain");
      lds.setSecurityMetaData(smd);
      ManagedObject mo = mof.initManagedObject(lds, "LocalDataSourceDeploymentMetaData", null);
      // Validate the expected property names
      Set<String> expectedPropertyNames = new TreeSet<String>();
      expectedPropertyNames.addAll(Arrays.asList(ManagedConnectionFactoryDeploymentMetaData_NAMES));
View Full Code Here

      LocalDSInstanceClassFactory icf = new LocalDSInstanceClassFactory(mof);
      icf.setMof(mof);
      mof.setInstanceClassFactory(LocalDataSourceDeploymentMetaData.class, icf);
      LocalDataSourceDeploymentMetaData lds = new LocalDataSourceDeploymentMetaData();
      // Set a SecurityMetaData to validate its MO
      SecurityMetaData smd = new ApplicationManagedSecurityMetaData();
      smd.setDomain("java:/jaas/SomeDomain");
      lds.setSecurityMetaData(smd);
      ManagedObject mo = mof.initManagedObject(lds, "LocalDataSourceDeploymentMetaData", null);
      // Validate the expected property names
      Set<String> expectedPropertyNames = new TreeSet<String>();
      expectedPropertyNames.addAll(Arrays.asList(ManagedConnectionFactoryDeploymentMetaData_NAMES));
View Full Code Here

         String domainName = (String) metaValueFactory.unwrap(compositeValue.get(DOMAIN));        
         SecurityDeploymentType deploymentType = (SecurityDeploymentType) metaValueFactory.unwrap(compositeValue.get(DeploymentTypeName));
         if(deploymentType == null)
            deploymentType = SecurityDeploymentType.NONE;
        
         SecurityMetaData securityDomain = null;
         switch(deploymentType)
         {
            case APPLICATION:
               securityDomain = new ApplicationManagedSecurityMetaData();
               break;
            case DOMAIN:
               securityDomain = new SecurityDomainMetaData();
               break;
            case DOMAIN_AND_APPLICATION:
               securityDomain = new SecurityDomainApplicationManagedMetaData();
               break;
            default:
            case NONE:
               securityDomain = new SecurityMetaData();
               break;
         }
         // Sanity check
         if(securityDomain.requiresDomain() && domainName == null)
            throw new IllegalStateException("null security domain not allowed for SecurityDeploymentType " + deploymentType);
         // Set the domain
         securityDomain.setDomain(domainName);
         //
         return securityDomain;
      }
      throw new IllegalStateException("Unable to unwrap securityDomain " + metaValue);
   }
View Full Code Here

TOP

Related Classes of org.jboss.resource.metadata.mcf.SecurityMetaData

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.