本文整理汇总了Java中org.jboss.as.server.deployment.Phase类的典型用法代码示例。如果您正苦于以下问题:Java Phase类的具体用法?Java Phase怎么用?Java Phase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Phase类属于org.jboss.as.server.deployment包,在下文中一共展示了Phase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: performRuntime
import org.jboss.as.server.deployment.Phase; //导入依赖的package包/类
@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model,
ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
final String moduleId = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.ADDRESS)).getLastElement().getValue();
_componentNames.add(moduleId);
context.addStep(new AbstractDeploymentChainStep() {
protected void execute(DeploymentProcessorTarget processorTarget) {
processorTarget.addDeploymentProcessor(SwitchYardExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, _priority++, new SwitchYardModuleDependencyProcessor(moduleId));
}
}, OperationContext.Stage.RUNTIME);
final SwitchYardComponentService componentService = new SwitchYardComponentService(moduleId, model);
final ServiceBuilder<Component> componentServiceBuilder = context.getServiceTarget().addService(SwitchYardComponentService.SERVICE_NAME.append(moduleId), componentService);
componentServiceBuilder.addDependency(SwitchYardInjectorService.SERVICE_NAME, Map.class, componentService.getInjectedValues())
.addDependency(RA_REPOSITORY_SERVICE_NAME, ResourceAdapterRepository.class, componentService.getResourceAdapterRepository());
componentServiceBuilder.addDependency(WebSubsystemServices.JBOSS_WEB);
componentServiceBuilder.setInitialMode(Mode.ACTIVE);
newControllers.add(componentServiceBuilder.install());
}
示例2: performBoottime
import org.jboss.as.server.deployment.Phase; //导入依赖的package包/类
protected void performBoottime(final OperationContext context, final ModelNode operation, final ModelNode model) throws
OperationFailedException {
runtimeValidator.validate(operation.resolve());
context.addStep(new AbstractDeploymentChainStep() {
protected void execute(DeploymentProcessorTarget processorTarget) {
final int PARSE_NEO4J_DRIVER = 0x4C00;
final int DEPENDENCIES_NEO4J_DRIVER = 0x1F10;
// TODO: use Phase.PARSE_NEO4J_DRIVER
processorTarget.addDeploymentProcessor(Neo4jDriverExtension.SUBSYSTEM_NAME, Phase.PARSE, PARSE_NEO4J_DRIVER, new DriverScanDependencyProcessor("neo4jsubsystem"));
// TODO: use Phase.DEPENDENCIES_NEO4J_DRIVER
processorTarget.addDeploymentProcessor(Neo4jDriverExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, DEPENDENCIES_NEO4J_DRIVER, DriverDependencyProcessor.getInstance());
}
}, OperationContext.Stage.RUNTIME);
startNeo4jDriverSubsysteService(context);
}
示例3: performBoottime
import org.jboss.as.server.deployment.Phase; //导入依赖的package包/类
protected void performBoottime(final OperationContext context, final ModelNode operation, final ModelNode model)
throws OperationFailedException {
runtimeValidator.validate(operation.resolve());
context.addStep(new AbstractDeploymentChainStep() {
protected void execute(DeploymentProcessorTarget processorTarget) {
final int PARSE_ORIENT_DRIVER = 0x4C01;
final int DEPENDENCIES_ORIENT_DRIVER = 0x1F11;
// TODO: use Phase.PARSE_ORIENT_DRIVER
processorTarget.addDeploymentProcessor(OrientDriverExtension.SUBSYSTEM_NAME, Phase.PARSE,
PARSE_ORIENT_DRIVER, new DriverScanDependencyProcessor("orientdbsubsystem"));
// TODO: use Phase.DEPENDENCIES_ORIENT_DRIVER
processorTarget.addDeploymentProcessor(OrientDriverExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES,
DEPENDENCIES_ORIENT_DRIVER, DriverDependencyProcessor.getInstance());
}
}, OperationContext.Stage.RUNTIME);
startOrientSubsystemService(context);
}
示例4: performBoottime
import org.jboss.as.server.deployment.Phase; //导入依赖的package包/类
protected void performBoottime(final OperationContext context, final ModelNode operation, final ModelNode model) throws
OperationFailedException {
runtimeValidator.validate(operation.resolve());
context.addStep(new AbstractDeploymentChainStep() {
protected void execute(DeploymentProcessorTarget processorTarget) {
final int PARSE_CASSANDRA_DRIVER = 0x4C02;
final int DEPENDENCIES_CASSANDRA_DRIVER = 0x1F12;
// TODO: use Phase.PARSE_CASSANDRA_DRIVER
processorTarget.addDeploymentProcessor(CassandraDriverExtension.SUBSYSTEM_NAME, Phase.PARSE, PARSE_CASSANDRA_DRIVER, new DriverScanDependencyProcessor("cassandrasubsystem"));
// TODO: use Phase.DEPENDENCIES_CASSANDRA_DRIVER
processorTarget.addDeploymentProcessor(CassandraDriverExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, DEPENDENCIES_CASSANDRA_DRIVER, DriverDependencyProcessor.getInstance());
}
}, OperationContext.Stage.RUNTIME);
startCassandraDriverSubsysteService(context);
}
示例5: performBoottime
import org.jboss.as.server.deployment.Phase; //导入依赖的package包/类
protected void performBoottime(final OperationContext context, final ModelNode operation, final ModelNode model) throws
OperationFailedException {
runtimeValidator.validate(operation.resolve());
context.addStep(new AbstractDeploymentChainStep() {
protected void execute(DeploymentProcessorTarget processorTarget) {
final int PARSE_MONGO_DRIVER = 0x4C03;
final int DEPENDENCIES_MONGO_DRIVER = 0x1F13;
// TODO: use Phase.PARSE_MONGO_DRIVER
processorTarget.addDeploymentProcessor(MongoDriverExtension.SUBSYSTEM_NAME, Phase.PARSE, PARSE_MONGO_DRIVER, new DriverScanDependencyProcessor("mongodbsubsystem"));
// TODO: use Phase.DEPENDENCIES_MONGO_DRIVER
processorTarget.addDeploymentProcessor(MongoDriverExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, DEPENDENCIES_MONGO_DRIVER, DriverDependencyProcessor.getInstance());
}
}, OperationContext.Stage.RUNTIME);
startMongoDriverSubsysteService(context);
}
示例6: performBoottime
import org.jboss.as.server.deployment.Phase; //导入依赖的package包/类
@Override
protected void performBoottime(OperationContext context, ModelNode operation, final ModelNode model) throws OperationFailedException {
context.addStep(new AbstractDeploymentChainStep() {
@Override
protected void execute(DeploymentProcessorTarget processorTarget) {
// processorTarget.addDeploymentProcessor(jam-metricsExtension.SUBSYSTEM_NAME, Phase.STRUCTURE, Phase.STRUCTURE_AUTOMATED_METRICS, new jam-metricsDependencyProcessor());
processorTarget.addDeploymentProcessor(JamMetricsExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, Phase.DEPENDENCIES_METRIC, new JamMetricsDependencyProcessor());
// processorTarget.addDeploymentProcessor(jam-metricsExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, Phase.DEPENDENCIES_METRIC, new jam-metricsInterceptorProcessor());
processorTarget.addDeploymentProcessor(JamMetricsExtension.SUBSYSTEM_NAME, Phase.INSTALL, Phase.INSTALL_METRIC_VALIDATOR_FACTORY, new JamMetricsBeanValidationFactoryProcessor());
}
}, OperationContext.Stage.RUNTIME);
// jam-metricsLogger.ROOT_LOGGER.startedjam-metricsSubsystem();
/* ServiceTarget target = context.getServiceTarget();
target.addService(jam-metricsServices.AUTOMATED_METRICS, new jam-metricsServices())
.setInitialMode(ServiceController.Mode.ACTIVE)
.install();*/
}
示例7: performRuntime
import org.jboss.as.server.deployment.Phase; //导入依赖的package包/类
@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException {
final String moduleId = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.ADDRESS)).getLastElement().getValue();
_componentNames.add(moduleId);
context.addStep(new AbstractDeploymentChainStep() {
protected void execute(DeploymentProcessorTarget processorTarget) {
processorTarget.addDeploymentProcessor(SwitchYardExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, _priority++, new SwitchYardModuleDependencyProcessor(moduleId));
}
}, OperationContext.Stage.RUNTIME);
final SwitchYardComponentService componentService = new SwitchYardComponentService(moduleId, model);
final ServiceBuilder<Component> componentServiceBuilder = context.getServiceTarget().addService(SwitchYardComponentService.SERVICE_NAME.append(moduleId), componentService);
componentServiceBuilder.addDependency(SwitchYardInjectorService.SERVICE_NAME, Map.class, componentService.getInjectedValues())
.addDependency(RA_REPOSITORY_SERVICE_NAME, ResourceAdapterRepository.class, componentService.getResourceAdapterRepository());
componentServiceBuilder.setInitialMode(Mode.ACTIVE);
componentServiceBuilder.install();
}
示例8: performBoottime
import org.jboss.as.server.deployment.Phase; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void performBoottime(OperationContext context, ModelNode operation, final Resource resource)
throws OperationFailedException {
context.addStep(new AbstractDeploymentChainStep() {
@Override
protected void execute(DeploymentProcessorTarget processorTarget) {
processorTarget.addDeploymentProcessor(RequestControllerExtension.SUBSYSTEM_NAME, Phase.STRUCTURE, Phase.STRUCTURE_GLOBAL_REQUEST_CONTROLLER, new RequestControllerDeploymentUnitProcessor());
}
}, OperationContext.Stage.RUNTIME);
int maxRequests = RequestControllerRootDefinition.MAX_REQUESTS.resolveModelAttribute(context, resource.getModel()).asInt();
boolean trackIndividual = RequestControllerRootDefinition.TRACK_INDIVIDUAL_ENDPOINTS.resolveModelAttribute(context, resource.getModel()).asBoolean();
RequestController requestController = new RequestController(trackIndividual);
requestController.setMaxRequestCount(maxRequests);
context.getServiceTarget().addService(RequestController.SERVICE_NAME, requestController)
.addDependency(SuspendController.SERVICE_NAME, SuspendController.class, requestController.getShutdownControllerInjectedValue())
.install();
}
示例9: performBoottime
import org.jboss.as.server.deployment.Phase; //导入依赖的package包/类
@Override
protected void performBoottime(final OperationContext context, final ModelNode operation, final ModelNode model)
throws OperationFailedException {
final Resource resource = context.readResource(PathAddress.EMPTY_ADDRESS);
final ModelNode node = Resource.Tools.readModel(resource);
// get the minimum set of deployment permissions.
final ModelNode deploymentPermissionsModel = node.get(DEPLOYMENT_PERMISSIONS_PATH.getKeyValuePair());
final ModelNode minimumPermissionsNode = MINIMUM_PERMISSIONS.resolveModelAttribute(context, deploymentPermissionsModel);
final List<PermissionFactory> minimumSet = this.retrievePermissionSet(context, minimumPermissionsNode);
// get the maximum set of deployment permissions.
ModelNode maximumPermissionsNode = MAXIMUM_PERMISSIONS.resolveModelAttribute(context, deploymentPermissionsModel);
if (!maximumPermissionsNode.isDefined())
maximumPermissionsNode = DEFAULT_MAXIMUM_SET;
final List<PermissionFactory> maximumSet = this.retrievePermissionSet(context, maximumPermissionsNode);
// validate the configured permissions - the minimum set must be implied by the maximum set.
final FactoryPermissionCollection maxPermissionCollection = new FactoryPermissionCollection(maximumSet.toArray(new PermissionFactory[maximumSet.size()]));
final StringBuilder failedPermissions = new StringBuilder();
for (PermissionFactory factory : minimumSet) {
Permission permission = factory.construct();
if (!maxPermissionCollection.implies(permission)) {
failedPermissions.append("\n\t\t").append(permission);
}
}
if (failedPermissions.length() > 0) {
throw SecurityManagerLogger.ROOT_LOGGER.invalidSubsystemConfiguration(failedPermissions);
}
// install the DUPs responsible for parsing and validating security permissions found in META-INF/permissions.xml.
context.addStep(new AbstractDeploymentChainStep() {
protected void execute(DeploymentProcessorTarget processorTarget) {
processorTarget.addDeploymentProcessor(Constants.SUBSYSTEM_NAME, Phase.PARSE, Phase.PARSE_PERMISSIONS,
new PermissionsParserProcessor(minimumSet));
processorTarget.addDeploymentProcessor(Constants.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_PERMISSIONS_VALIDATION,
new PermissionsValidationProcessor(maximumSet));
}
}, OperationContext.Stage.RUNTIME);
}
示例10: execute
import org.jboss.as.server.deployment.Phase; //导入依赖的package包/类
@Override
protected void execute(DeploymentProcessorTarget processorTarget) {
DbBootstrapLogger.ROOT_LOGGER.tracef("%s:'%s'", DbBootstrapExtension.FILENAME_ATTR, filename);
try {
String subsystemName = DbBootstrapExtension.SUBSYSTEM_NAME;
int priority = Phase.FIRST_MODULE_USE_PERSISTENCE_CLASS_FILE_TRANSFORMER - priorityDelta.getAndIncrement();
DbBootstrapScanDetectorProcessor processor;
processor = new DbBootstrapScanDetectorProcessor(filename, new HibernateBootstrapProvider());
processorTarget.addDeploymentProcessor(subsystemName, Phase.FIRST_MODULE_USE, priority, processor);
} catch (Exception e) {
DbBootstrapLogger.ROOT_LOGGER.error("Error when executing db-bootstrap deployment chain step", e);
}
}
示例11: performBoottime
import org.jboss.as.server.deployment.Phase; //导入依赖的package包/类
@Override
protected void performBoottime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException {
final List<String> blacklist = JarBlackListResourceDefinition.JAR_NAMES.unwrap(context,model);
context.addStep(new AbstractDeploymentChainStep() {
@Override
protected void execute(DeploymentProcessorTarget processorTarget) {
processorTarget.addDeploymentProcessor(SDDExtension.SUBSYSTEM_NAME, Phase.PARSE, Phase.PARSE_WEB_DEPLOYMENT, new JarBlackListDetectorProcessor(blacklist));
}
}, OperationContext.Stage.RUNTIME);
}
示例12: performRuntime
import org.jboss.as.server.deployment.Phase; //导入依赖的package包/类
@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model,
ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
final String moduleId = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.ADDRESS)).getLastElement().getValue();
_extensionNames.add(moduleId);
context.addStep(new AbstractDeploymentChainStep() {
protected void execute(DeploymentProcessorTarget processorTarget) {
processorTarget.addDeploymentProcessor(SwitchYardExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, SwitchYardModuleAdd._priority++, new SwitchYardModuleDependencyProcessor(moduleId));
}
}, OperationContext.Stage.RUNTIME);
}
示例13: performBoottime
import org.jboss.as.server.deployment.Phase; //导入依赖的package包/类
@Override
protected void performBoottime(OperationContext context, ModelNode operation, Resource resource) throws OperationFailedException {
ModelNode model = resource.getModel();
ModelNode defaultAuthenticationContext = DEFAULT_AUTHENTICATION_CONTEXT.resolveModelAttribute(context, model);
AUTHENITCATION_CONTEXT_PROCESSOR.setDefaultAuthenticationContext(defaultAuthenticationContext.isDefined() ? defaultAuthenticationContext.asString() : null);
Map<String,String> securityProperties = SECURITY_PROPERTIES.unwrap(context, model);
ServiceTarget target = context.getServiceTarget();
installService(SecurityPropertyService.SERVICE_NAME, new SecurityPropertyService(securityProperties), target);
List<String> providers = DISALLOWED_PROVIDERS.unwrap(context, operation);
ProviderRegistrationService prs = new ProviderRegistrationService(providers);
ServiceBuilder<Void> builder = target.addService(ProviderRegistrationService.SERVICE_NAME, prs)
.setInitialMode(Mode.ACTIVE);
String initialProviders = INITIAL_PROVIDERS.resolveModelAttribute(context, model).asStringOrNull();
if (initialProviders != null) {
builder.addDependency(
context.getCapabilityServiceName(PROVIDERS_CAPABILITY, initialProviders, Provider[].class),
Provider[].class, prs.getInitialProivders());
}
String finalProviders = FINAL_PROVIDERS.resolveModelAttribute(context, model).asStringOrNull();
if (finalProviders != null) {
builder.addDependency(
context.getCapabilityServiceName(PROVIDERS_CAPABILITY, finalProviders, Provider[].class),
Provider[].class, prs.getFinalProviders());
}
builder.install();
if (context.isNormalServer()) {
context.addStep(new AbstractDeploymentChainStep() {
@Override
protected void execute(DeploymentProcessorTarget processorTarget) {
processorTarget.addDeploymentProcessor(ElytronExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, Phase.DEPENDENCIES_ELYTRON, new DependencyProcessor());
processorTarget.addDeploymentProcessor(ElytronExtension.SUBSYSTEM_NAME, Phase.CONFIGURE_MODULE, Phase.CONFIGURE_AUTHENTICATION_CONTEXT, AUTHENITCATION_CONTEXT_PROCESSOR);
processorTarget.addDeploymentProcessor(ElytronExtension.SUBSYSTEM_NAME, Phase.FIRST_MODULE_USE, Phase.FIRST_MODULE_USE_AUTHENTICATION_CONTEXT, new AuthenticationContextAssociationProcessor());
}
}, Stage.RUNTIME);
}
}
示例14: addDeploymentProcessor
import org.jboss.as.server.deployment.Phase; //导入依赖的package包/类
public static void addDeploymentProcessor(final String subsystemName, Phase phase, int priority, DeploymentUnitProcessor processor) {
final EnumMap<Phase, Set<RegisteredDeploymentUnitProcessor>> deployerMap = INSTANCE.deployerMap;
Set<RegisteredDeploymentUnitProcessor> registeredDeploymentUnitProcessors = deployerMap.get(phase);
RegisteredDeploymentUnitProcessor registeredDeploymentUnitProcessor = new RegisteredDeploymentUnitProcessor(priority, processor, subsystemName);
if(registeredDeploymentUnitProcessors.contains(registeredDeploymentUnitProcessor)) {
throw ServerLogger.ROOT_LOGGER.duplicateDeploymentUnitProcessor(priority, processor.getClass());
}
registeredDeploymentUnitProcessors.add(registeredDeploymentUnitProcessor);
}
示例15: DeployerChainAddHandler
import org.jboss.as.server.deployment.Phase; //导入依赖的package包/类
private DeployerChainAddHandler() {
final EnumMap<Phase, Set<RegisteredDeploymentUnitProcessor>> map = new EnumMap<Phase, Set<RegisteredDeploymentUnitProcessor>>(Phase.class);
for (Phase phase : Phase.values()) {
map.put(phase, new ConcurrentSkipListSet<RegisteredDeploymentUnitProcessor>());
}
this.deployerMap = map;
}