Package org.jboss.profileservice.spi

Examples of org.jboss.profileservice.spi.Profile


      boolean modified = false;
      Collection<String> modifiedDeploymentNames = new ArrayList<String>();
      for (ProfileKey key : activeProfiles)
      {
         // The profile
         Profile profile;
         try
         {
            profile = profileService.getActiveProfile(key);
         }
         catch (NoSuchProfileException ignore)
         {
            if (trace)
               log.debug("failed to get profile for key: " + key);
            continue;
         }
         // Check if it's a mutable profile
         if (profile.isMutable() == false)
         {
            if (trace)
               log.trace("Ignoring not mutable profile: " + key);
            continue;
         }
View Full Code Here


      // Mark the profile as ready for hotdeployment if supported
      for(ProfileKey key : profileService.getActiveProfileKeys())
      {
         try
         {
            Profile profile = profileService.getActiveProfile(key);
            if(profile.isMutable() && profile instanceof MutableProfile)
               ((MutableProfile) profile).enableModifiedDeploymentChecks(true);
         }
         catch(NoSuchProfileException ignore) { }
      }
   }
View Full Code Here

/*     */     catch (Exception e)
/*     */     {
/* 139 */       log.error("Failed to load profile: ", e);
/*     */     }
/*     */
/* 142 */     Profile profile = this.profileService.getActiveProfile();
/* 143 */     if (profile != null)
/* 144 */       profile.enableModifiedDeploymentChecks(true);
/*     */   }
View Full Code Here

/* 197 */     if (ps == null) {
/* 198 */       throw new NullPointerException("ProfileService has not been set");
/*     */     }
/*     */
/* 201 */     ProfileKey key = new ProfileKey(name);
/* 202 */     Profile profile = ps.getProfile(key);
/*     */
/* 205 */     VFSDeployment first = null;
/*     */
/* 208 */     Collection boostraps = profile.getDeployments(ManagedDeployment.DeploymentPhase.BOOTSTRAP);
/* 209 */     for (VFSDeployment d : boostraps)
/*     */     {
/* 211 */       deployer.addDeployment(d);
/* 212 */       if (first == null)
/* 213 */         first = d;
/*     */     }
/* 215 */     deployer.process();
/* 216 */     deployer.checkComplete();
/*     */
/* 218 */     Thread thread = Thread.currentThread();
/* 219 */     ClassLoader old = thread.getContextClassLoader();
/*     */
/* 221 */     MainDeployerImpl hack = (MainDeployerImpl)deployer;
/* 222 */     ClassLoader cl = null;
/* 223 */     if (first != null)
/*     */     {
/* 225 */       DeploymentContext ctx = hack.getDeploymentContext(first.getName());
/* 226 */       if (ctx != null)
/* 227 */         cl = ctx.getClassLoader();
/*     */     }
/* 229 */     if (cl != null) {
/* 230 */       thread.setContextClassLoader(cl);
/*     */     }
/*     */
/*     */     try
/*     */     {
/* 235 */       Collection profileDeployers = profile.getDeployments(ManagedDeployment.DeploymentPhase.DEPLOYER);
/* 236 */       for (VFSDeployment d : profileDeployers)
/* 237 */         deployer.addDeployment(d);
/* 238 */       deployer.process();
/* 239 */       deployer.checkComplete();
/*     */
/* 242 */       Collection profileDeployments = profile.getDeployments(ManagedDeployment.DeploymentPhase.APPLICATION);
/* 243 */       for (VFSDeployment d : profileDeployments)
/* 244 */         deployer.addDeployment(d);
/* 245 */       deployer.process();
/* 246 */       deployer.checkComplete();
/*     */     }
View Full Code Here

/*     */     }
/*     */
/* 507 */     VFSDeployment deployment = null;
/*     */     try
/*     */     {
/* 510 */       Profile profile = this.profileService.getProfile(this.profileKey);
/* 511 */       deployment = add(profile, component);
/*     */     }
/*     */     catch (Exception e)
/*     */     {
/* 515 */       this.log.debug("Failed to deploy: " + component, e);
View Full Code Here

/* 533 */       if (this.log.isTraceEnabled())
/*     */       {
/* 535 */         this.log.trace("Undeploying: " + component);
/*     */       }
/* 537 */       String name = (String)this.deployedSet.remove(component);
/* 538 */       Profile profile = this.profileService.getProfile(this.profileKey);
/* 539 */       remove(profile, name);
/*     */     }
/*     */     catch (Exception e)
/*     */     {
/* 543 */       this.log.error("Failed to undeploy: " + component, e);
View Full Code Here

      // TODO add dependencies on bootstrap profiles
      String[] rootSubProfiles = new String[0];
      // Create a hotdeployment profile
      ProfileMetaData metadata = createProfileMetaData(true, rootURIs, rootSubProfiles);
     
      Profile profile = profileFactory.createProfile(getProfileKey(), metadata);
      getProfileService().registerProfile(profile);     
   }
View Full Code Here

TOP

Related Classes of org.jboss.profileservice.spi.Profile

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.