Search in sources :

Example 1 with DataSourcesExtension

use of org.jboss.as.connector.subsystems.datasources.DataSourcesExtension in project wildfly by wildfly.

the class InfinispanSubsystemInitialization method initializeExtraSubystemsAndModel.

@Override
protected void initializeExtraSubystemsAndModel(ExtensionRegistry registry, Resource root, ManagementResourceRegistration registration, RuntimeCapabilityRegistry capabilityRegistry) {
    new DataSourcesExtension().initialize(registry.getExtensionContext("datasources", registration, ExtensionRegistryType.MASTER));
    Resource subsystem = Resource.Factory.create();
    root.registerChild(PathElement.pathElement(SUBSYSTEM, DataSourcesExtension.SUBSYSTEM_NAME), subsystem);
    Resource dataSource = Resource.Factory.create();
    subsystem.registerChild(PathElement.pathElement("data-source", "ExampleDS"), dataSource);
    dataSource.getModel().get("jndi-name").set("java:jboss/jdbc/store");
    super.initializeExtraSubystemsAndModel(registry, root, registration, capabilityRegistry);
}
Also used : DataSourcesExtension(org.jboss.as.connector.subsystems.datasources.DataSourcesExtension) Resource(org.jboss.as.controller.registry.Resource)

Aggregations

DataSourcesExtension (org.jboss.as.connector.subsystems.datasources.DataSourcesExtension)1 Resource (org.jboss.as.controller.registry.Resource)1