public ProfileKey getProfileKey() { return new ProfileKey(profileDomain, profileServer, profileName); }
/** * Obtain the Deployment Manager * @throws Exception */ protected void initDeploymentManager() throws Exception { String profileName = "default"; InitialContext ctx = new InitialContext(); ProfileService ps = (ProfileService) ctx.lookup("ProfileService"); deploymentManager = ps.getDeploymentManager(); ProfileKey defaultKey = new ProfileKey(profileName); deploymentManager.loadProfile(defaultKey); }
@Override public ProfileKey unwrapMetaValue(MetaValue metaValue) { if(metaValue != null && SimpleMetaType.STRING.equals(metaValue.getMetaType())) { String profileName = String.class.cast(((SimpleValue) metaValue).getValue()); return new ProfileKey(profileName); } throw new IllegalStateException("cannot recreate profile key"); }
@Override public ProfileKey unwrapMetaValue(MetaValue metaValue) { if(metaValue != null && SimpleMetaType.STRING.equals(metaValue.getMetaType())) { String profileName = String.class.cast(((SimpleValue) metaValue).getValue()); return new ProfileKey(profileName); } throw new IllegalStateException("cannot recreate profile key"); }
/** * @return JBoss profile for the {@link Configuration}. */ private ProfileKey getProfile() { String server = this.configuration.getPropertyValue(JBossPropertySet.CONFIGURATION); if (server == null || server.trim().isEmpty()) { server = ProfileKey.DEFAULT; } String profile = this.configuration.getPropertyValue(JBossPropertySet.PROFILE); boolean isClustered = Boolean.parseBoolean(this.configuration.getPropertyValue( JBossPropertySet.CLUSTERED)); String name = isClustered ? "farm" : profile; if (name == null || name.trim().isEmpty()) { name = ProfileKey.DEFAULT; } return new ProfileKey(ProfileKey.DEFAULT, server, name); }
/** * @return JBoss profile for the {@link Configuration}. */ private ProfileKey getProfile() { String server = this.configuration.getPropertyValue(JBossPropertySet.CONFIGURATION); if (server == null || server.trim().isEmpty()) { server = ProfileKey.DEFAULT; } String profile = this.configuration.getPropertyValue(JBossPropertySet.PROFILE); boolean isClustered = Boolean.parseBoolean(this.configuration.getPropertyValue( JBossPropertySet.CLUSTERED)); String name = isClustered ? "farm" : profile; if (name == null || name.trim().isEmpty()) { name = ProfileKey.DEFAULT; } return new ProfileKey(ProfileKey.DEFAULT, server, name); }
private void initDeploymentManager() throws Exception { Context ctx = createContext(); profileService = (ProfileService) ctx.lookup("ProfileService"); deploymentManager = profileService.getDeploymentManager(); ProfileKey defaultKey = new ProfileKey(DEFAULT_PROFILE_KEY_NAME); deploymentManager.loadProfile(defaultKey); }
private void initDeploymentManager() throws Exception { String profileName = configuration.getProfileName(); InitialContext ctx = new InitialContext(); ProfileService ps = (ProfileService) ctx.lookup("ProfileService"); deploymentManager = ps.getDeploymentManager(); ProfileKey defaultKey = new ProfileKey(profileName); deploymentManager.loadProfile(defaultKey); VFS.init(); }
private void initProfileService(Server server) throws Exception { Context ctx = server.getNamingContext(); contextInst.set(ctx); profileService = (ProfileService) ctx.lookup("ProfileService"); deploymentManager = profileService.getDeploymentManager(); ProfileKey defaultKey = new ProfileKey(DEFAULT_PROFILE_KEY_NAME); deploymentManager.loadProfile(defaultKey); }
/** * Gets the key for the {@link Profile} that we activate and release. * * @return the key. Will not return null * @throws IllegalStateException if {@link #getProfileName()} returns null * @see #getProfileDomain() * @see #getProfileServer() * @see #getProfileName() */ public ProfileKey getProfileKey() { if (this.profileKey == null) { String profileName = getProfileName(); if (profileName == null) { throw new IllegalStateException("Must configure profileName or contextName before calling getProfileKey()"); } // create the ProfileKey this.profileKey = new ProfileKey(getProfileDomain(), getProfileServer(), profileName); } return this.profileKey; }
private void initDeploymentManager() throws Exception { String profileName = configuration.getProfileName(); InitialContext ctx = createContext(); profileService = (ProfileService) ctx.lookup("ProfileService"); deploymentManager = profileService.getDeploymentManager(); ProfileKey defaultKey = new ProfileKey(profileName); deploymentManager.loadProfile(defaultKey); VFS.init(); }
private void initDeploymentManager() throws Exception { String profileName = configuration.getProfileName(); InitialContext ctx = createContext(); profileService = (ProfileService) ctx.lookup("ProfileService"); deploymentManager = profileService.getDeploymentManager(); ProfileKey defaultKey = new ProfileKey(profileName); deploymentManager.loadProfile(defaultKey, false); VFS.init(); }
/** * Gets the key for the {@link Profile} that we activate and release. * * @return the key. Will not return <code>null</code> * * @throws IllegalStateException if {@link #getProfileName()} returns <code>null</code> * * @see #getProfileDomain() * @see #getProfileServer() * @see #getProfileName() */ public ProfileKey getProfileKey() { if (this.profileKey == null) { String name = getProfileName(); if (name == null) { throw new IllegalStateException("Must configure profileName or contextName before calling getProfileKey()"); } this.profileKey = new ProfileKey(getProfileDomain(), getProfileServer(), getProfileName()); } return this.profileKey; }
/** * Gets the key for the {@link Profile} that we activate and release. * * @return the key. Will not return <code>null</code> * * @see HASingletonProfileActivator#getProfileDomain() * @see HASingletonProfileActivator#getProfileServer() * @see HASingletonProfileActivator#getProfileName() */ @ManagementProperty(use={ViewUse.STATISTIC}, description="ProfileKey for the Profile we activate") @ManagementObjectID(type="HASingletonProfileActivator") public ProfileKey getProfileKey() { if (this.profileKey == null) { this.profileKey = new ProfileKey(getProfileDomain(), getProfileServer(), getProfileName()); } return this.profileKey; }