Permalink
Comparing changes
Open a pull request
13
contributors
Commits on Mar 23, 2019
…ifferent JVMs MisxedDomainTestSupport will trigger caller (i.e a TestSuite) being ignored if the version under test can't handle the JVMs on offer. Test jobs can be configured with different java home paths for different JVMs. If this is done MixedDomainTestSupport will try and use an appropriate one for the legacy host.
Commits on Apr 03, 2019
… communication with the remote maven repo
Commits on Apr 04, 2019
…ween tests.
…passes for me locally with jdk10.
Commits on Apr 05, 2019
[WFLY-11896] Improve ability of mixed-domain testsuite to deal with different JVMs
[WFLY-11932] Use HTTPS for repository and pluginRepository URLs
[WFLY-11936] only log unbound msgs if binding service was up
[WFLY-11931] Add test case to test the JDBC SecurityRealm integration.
[WFLY-11944] Some clustering test cases do not close JNDI context between tests
…ncies WFLY-11946/WFLY-10340 Remove unneeded dependencies from OpenJPA module
…g subsystem pom and module.xml Also clean out unneeded code, including switches that can be simple if/else blocks.
Commits on Apr 06, 2019
Commits on Apr 08, 2019
Commits on Apr 09, 2019
Commits on Apr 10, 2019
Commits on Apr 14, 2019
…MySQL driver jar - rework The proposed fix is trying to start an extra DriverService with DeploymentUnit name as the driver-name for the first one as well if there are more than one Driver classes defined in META-INF/services/java.sql.Driver
…array. This module will be introduced via WFCORE-4355.
from o.j.a.s.d.Attachments.JNDI_DEPENDENCIES to o.j.a.s.d.Attachments.COMPONENT_JNDI_DEPENDENCIES attachment. Before this fix JNDI_DEPENDENCY_SERVICE had too many dependencies. With this fix applied JNDI_DEPENDENCY_SERVICE will now depend on JNDI_AGGREGATION_SERVICES and these aggregation services will reference COMPONENT_JNDI_DEPENDENCIES that were referenced by JNDI_DEPENDENCY_SERVICE before. In other words we are decreasing JNDI_DEPENDENCY_SERVICE dependencies count and reorganizing (simplifying) its dependency tree.
…rce definition - JCA_NAMING_CAPABILITY is being overwritten by TRANSACTION_INTEGRATION_CAPABILITY , so this requirement is lost. jira issue: https://issues.jboss.org/browse/WFLY-11966
…tion provider
…ary nanosecond precision
…istener
Unified
Split
Showing
with
2,118 additions
and 447 deletions.
- +9 −2 ...ing/ejb/infinispan/src/main/java/org/wildfly/clustering/ejb/infinispan/InfinispanBeanManager.java
- +6 −3 ...main/java/org/jboss/as/clustering/infinispan/subsystem/CacheConfigurationServiceConfigurator.java
- +1 −1 ...erver/src/main/java/org/wildfly/clustering/server/dispatcher/ChannelCommandDispatcherFactory.java
- +3 −3 .../java/org/wildfly/clustering/web/infinispan/session/SessionCreationMetaDataEntryExternalizer.java
- +2 −1 ...g/wildfly/clustering/web/infinispan/session/SessionCreationMetaDataEntryExternalizerTestCase.java
- +8 −4 ...rc/main/java/org/jboss/as/connector/deployers/datasource/DataSourceDefinitionInjectionSource.java
- +13 −0 connector/src/main/java/org/jboss/as/connector/deployers/ds/processors/DriverProcessor.java
- +8 −4 ...src/main/java/org/jboss/as/connector/deployers/ds/processors/DsXmlDeploymentInstallProcessor.java
- +5 −1 ...rc/main/java/org/jboss/as/connector/deployers/ra/AdministeredObjectDefinitionInjectionSource.java
- +15 −4 ...s/as/connector/services/resourceadapters/deployment/AbstractResourceAdapterDeploymentService.java
- +8 −4 connector/src/main/java/org/jboss/as/connector/subsystems/datasources/AbstractDataSourceAdd.java
- +1 −2 connector/src/main/java/org/jboss/as/connector/subsystems/jca/JcaSubsystemRootDefinition.java
- +2 −0 connector/src/test/java/org/jboss/as/connector/subsystems/jca/JcaSubsystemTestCase.java
- +2 −7 docs/src/main/asciidoc/_developer-guide/JPA_Reference_Guide.adoc
- +2 −2 docs/src/main/asciidoc/_extending-wildfly/Example_subsystem.adoc
- +4 −0 ee/src/main/java/org/jboss/as/ee/component/deployers/EEModuleInitialProcessor.java
- +11 −1 ee/src/main/java/org/jboss/as/ee/naming/InApplicationClientBindingProcessor.java
- +11 −3 ee/src/main/java/org/jboss/as/ee/naming/InstanceNameBindingProcessor.java
- +0 −4 feature-pack/src/main/resources/modules/system/layers/base/org/apache/openjpa/main/module.xml
- +1 −21 feature-pack/src/main/resources/modules/system/layers/base/org/jboss/as/messaging/main/module.xml
- +1 −1 ...ure-pack/src/main/resources/modules/system/layers/base/org/jboss/ironjacamar/impl/main/module.xml
- +45 −48 legacy/messaging/pom.xml
- +0 −2 legacy/messaging/src/main/java/org/jboss/as/messaging/AbstractTransportDefinition.java
- +31 −39 legacy/messaging/src/main/java/org/jboss/as/messaging/Messaging13SubsystemParser.java
- +8 −12 legacy/messaging/src/main/java/org/jboss/as/messaging/Messaging20SubsystemParser.java
- +92 −147 legacy/messaging/src/main/java/org/jboss/as/messaging/MessagingSubsystemParser.java
- +0 −5 legacy/messaging/src/main/java/org/jboss/as/messaging/Namespace.java
- +1 −2 legacy/messaging/src/main/java/org/jboss/as/messaging/PathDefinition.java
- +0 −19 legacy/messaging/src/main/java/org/jboss/as/messaging/jms/ConnectionFactoryAttribute.java
- +11 −11 legacy/messaging/src/main/java/org/jboss/as/messaging/logging/MessagingLogger.java
- +6 −1 mail/src/main/java/org/jboss/as/mail/extension/MailSessionAdd.java
- +5 −1 mail/src/main/java/org/jboss/as/mail/extension/MailSessionDefinitionInjectionSource.java
- +5 −1 messaging-activemq/src/main/java/org/wildfly/extension/messaging/activemq/BinderServiceUtil.java
- +5 −1 .../org/wildfly/extension/messaging/activemq/deployment/JMSDestinationDefinitionInjectionSource.java
- +36 −11 naming/src/main/java/org/jboss/as/naming/deployment/JndiNamingDependencyProcessor.java
- +10 −2 pom.xml
- +0 −2 ...ompat/src/test/java/org/jboss/as/test/compat/jpa/openjpa/OpenJPASharedModuleProviderTestCase.java
- +0 −4 testsuite/compat/src/test/scripts/build-jars.xml
- +5 −0 testsuite/integration/basic/pom.xml
- +111 −2 ...ic/src/test/java/org/jboss/as/test/integration/jca/datasource/DatasourceWrongDsClassTestCase.java
- +87 −0 ...ite/integration/basic/src/test/java/org/jboss/as/test/integration/jca/datasource/TestDriver2.java
- +71 −0 ...tion/basic/src/test/java/org/jboss/as/test/integration/weld/deployment/ChatWebsocketResource.java
- +119 −0 ...c/test/java/org/jboss/as/test/integration/weld/deployment/WebsocketApplicationScopedTestCase.java
- +1 −1 ...java/org/jboss/as/test/clustering/cluster/ejb/forwarding/AbstractRemoteEJBForwardingTestCase.java
- +2 −1 ...c/test/java/org/jboss/as/test/clustering/cluster/ejb/remote/ClientExceptionRemoteEJBTestCase.java
- +6 −4 .../jboss/as/test/clustering/cluster/ejb/remote/bean/InfinispanExceptionThrowingIncrementorBean.java
- +8 −8 ...ss/as/test/clustering/cluster/ejb2/stateful/failover/RemoteEJBClientStatefulFailoverTestBase.java
- +7 −7 ...va/org/jboss/as/test/clustering/cluster/ejb2/stateful/passivation/ClusterPassivationTestBase.java
- +14 −8 ...est/java/org/jboss/as/test/clustering/cluster/ejb2/stateless/RemoteStatelessFailoverTestCase.java
- +136 −0 ...on/clustering/src/test/java/org/jboss/as/test/clustering/cluster/group/GroupListenerTestCase.java
- +30 −0 ...ion/clustering/src/test/java/org/jboss/as/test/clustering/cluster/group/bean/ClusterTopology.java
- +6 −0 ...ering/src/test/java/org/jboss/as/test/clustering/cluster/group/bean/ClusterTopologyRetriever.java
- +28 −0 ...g/src/test/java/org/jboss/as/test/clustering/cluster/group/bean/ClusterTopologyRetrieverBean.java
- +32 −0 ...e/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/group/bean/Group.java
- +75 −0 ...tegration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/group/bean/GroupBean.java
- +6 −0 ...ite/integration/clustering/src/test/java/org/jboss/as/test/clustering/ejb/RemoteEJBDirectory.java
- +5 −0 testsuite/integration/elytron/pom.xml
- +303 −0 ...tegration/elytron/src/test/java/org/wildfly/test/integration/elytron/realm/JdbcRealmTestCase.java
- +74 −0 ...integration/elytron/src/test/java/org/wildfly/test/integration/elytron/realm/JdbcTestServlet.java
- +25 −0 ...e/integration/elytron/src/test/java/org/wildfly/test/integration/elytron/realm/jdbc-realm-web.xml
- +3 −1 testsuite/layers/src/test/java/org/jboss/as/test/layers/LayersTestCase.java
- +22 −2 testsuite/mixed-domain/pom.xml
- +0 −3 testsuite/mixed-domain/src/test/java/org/jboss/as/test/integration/domain/mixed/DomainAdjuster.java
- +0 −3 ...e/mixed-domain/src/test/java/org/jboss/as/test/integration/domain/mixed/LegacyConfigAdjuster.java
- +5 −2 ...e/mixed-domain/src/test/java/org/jboss/as/test/integration/domain/mixed/MixedDomainTestSuite.java
- +31 −0 ...mixed-domain/src/test/java/org/jboss/as/test/integration/domain/mixed/MixedDomainTestSupport.java
- +1 −7 .../mixed-domain/src/test/java/org/jboss/as/test/integration/domain/mixed/SimpleMixedDomainTest.java
- +40 −8 testsuite/mixed-domain/src/test/java/org/jboss/as/test/integration/domain/mixed/Version.java
- +1 −0 ...rc/test/java/org/jboss/as/test/integration/domain/mixed/eap640/ElytronOnlyMaster640TestSuite.java
- +1 −1 testsuite/shared/src/main/java/org/jboss/as/test/integration/security/common/Utils.java
- +67 −0 testsuite/shared/src/main/java/org/wildfly/test/security/common/elytron/ConstantRealmMapper.java
- +166 −0 testsuite/shared/src/main/java/org/wildfly/test/security/common/elytron/JdbcSecurityRealm.java
- +117 −0 testsuite/shared/src/main/java/org/wildfly/test/security/common/elytron/MappedRegexRealmMapper.java
- +108 −0 ...uite/shared/src/main/java/org/wildfly/test/security/common/elytron/RegexPrincipalTransformer.java
- +3 −1 testsuite/shared/src/main/java/org/wildfly/test/security/common/elytron/SimpleSecurityDomain.java
- +12 −2 transactions/src/main/java/org/jboss/as/txn/deployment/TransactionJndiBindingProcessor.java
- +10 −1 weld/subsystem/src/main/java/org/jboss/as/weld/deployment/WeldClassIntrospector.java
- +12 −9 ...system/src/main/java/org/jboss/as/weld/deployment/processors/WeldBeanManagerServiceProcessor.java
| @@ -190,8 +190,15 @@ public void stop() { | ||
| } | ||
|
|
||
| @Override | ||
| public boolean isRemotable(Throwable throwable) { | ||
| return !(throwable instanceof CacheException); | ||
| public boolean isRemotable(final Throwable throwable) { | ||
| Throwable subject = throwable; | ||
| while (subject != null) { | ||
| if (subject instanceof CacheException) { | ||
| return false; | ||
| } | ||
| subject = subject.getCause(); | ||
| } | ||
| return true; | ||
| } | ||
|
|
||
| @Override | ||
| @@ -34,6 +34,7 @@ | ||
| import org.infinispan.configuration.cache.LockingConfiguration; | ||
| import org.infinispan.configuration.cache.MemoryConfiguration; | ||
| import org.infinispan.configuration.cache.PersistenceConfiguration; | ||
| import org.infinispan.configuration.cache.StorageType; | ||
| import org.infinispan.configuration.cache.TransactionConfiguration; | ||
| import org.infinispan.distribution.group.Grouper; | ||
| import org.jboss.as.clustering.controller.CapabilityServiceNameProvider; | ||
| @@ -81,9 +82,11 @@ | ||
| String containerName = address.getParent().getLastElement().getValue(); | ||
| String cacheName = address.getLastElement().getValue(); | ||
| this.configurator = new ConfigurationServiceConfigurator(this.getServiceName(), containerName, cacheName, this.andThen(builder -> { | ||
| GroupsConfigurationBuilder groupsBuilder = builder.clustering().hash().groups().enabled(); | ||
| for (Grouper<?> grouper : this.module.get().loadService(Grouper.class)) { | ||
| groupsBuilder.addGrouper(grouper); | ||
| if (builder.memory().storageType() == StorageType.OBJECT) { | ||
| GroupsConfigurationBuilder groupsBuilder = builder.clustering().hash().groups().enabled(); | ||
| for (Grouper<?> grouper : this.module.get().loadService(Grouper.class)) { | ||
| groupsBuilder.addGrouper(grouper); | ||
| } | ||
| } | ||
| })).require(this); | ||
| } | ||
| @@ -264,7 +264,7 @@ public void viewAccepted(View view) { | ||
| this.members.keySet().removeAll(leftMembers); | ||
| } | ||
|
|
||
| if (this.listeners.isEmpty()) { | ||
| if (!this.listeners.isEmpty()) { | ||
| Address localAddress = this.dispatcher.getChannel().getAddress(); | ||
| ViewMembership oldMembership = new ViewMembership(localAddress, oldView, this); | ||
| ViewMembership membership = new ViewMembership(localAddress, view, this); | ||
| @@ -30,7 +30,6 @@ | ||
|
|
||
| import org.kohsuke.MetaInfServices; | ||
| import org.wildfly.clustering.marshalling.Externalizer; | ||
| import org.wildfly.clustering.marshalling.spi.DefaultExternalizer; | ||
| import org.wildfly.clustering.marshalling.spi.IndexSerializer; | ||
|
|
||
| /** | ||
| @@ -43,13 +42,14 @@ | ||
| @Override | ||
| public void writeObject(ObjectOutput output, SessionCreationMetaDataEntry<Object> entry) throws IOException { | ||
| SessionCreationMetaData metaData = entry.getMetaData(); | ||
| DefaultExternalizer.INSTANT.cast(Instant.class).writeObject(output, metaData.getCreationTime()); | ||
| // We only need millisecond precision | ||
| output.writeLong(metaData.getCreationTime().toEpochMilli()); | ||
| IndexSerializer.VARIABLE.writeInt(output, (int) metaData.getMaxInactiveInterval().getSeconds()); | ||
| } | ||
|
|
||
| @Override | ||
| public SessionCreationMetaDataEntry<Object> readObject(ObjectInput input) throws IOException, ClassNotFoundException { | ||
| SessionCreationMetaData metaData = new SimpleSessionCreationMetaData(DefaultExternalizer.INSTANT.cast(Instant.class).readObject(input)); | ||
| SessionCreationMetaData metaData = new SimpleSessionCreationMetaData(Instant.ofEpochMilli(input.readLong())); | ||
| metaData.setMaxInactiveInterval(Duration.ofSeconds(IndexSerializer.VARIABLE.readInt(input))); | ||
| return new SessionCreationMetaDataEntry<>(metaData); | ||
| } | ||
| @@ -46,7 +46,8 @@ public void test() throws ClassNotFoundException, IOException { | ||
| } | ||
|
|
||
| static void assertEquals(SessionCreationMetaDataEntry<Object> entry1, SessionCreationMetaDataEntry<Object> entry2) { | ||
| Assert.assertEquals(entry1.getMetaData().getCreationTime(), entry2.getMetaData().getCreationTime()); | ||
| // Compare only to millisecond precision | ||
| Assert.assertEquals(entry1.getMetaData().getCreationTime().toEpochMilli(), entry2.getMetaData().getCreationTime().toEpochMilli()); | ||
| Assert.assertEquals(entry1.getMetaData().getMaxInactiveInterval(), entry2.getMetaData().getMaxInactiveInterval()); | ||
| } | ||
| } | ||
| @@ -261,6 +261,7 @@ private void startDataSource(final AbstractDataSourceService dataSourceService, | ||
| .addService(bindInfo.getBinderServiceName(), binderService) | ||
| .addDependency(referenceFactoryServiceName, ManagedReferenceFactory.class, binderService.getManagedObjectInjector()) | ||
| .addDependency(bindInfo.getParentContextServiceName(), ServiceBasedNamingStore.class, binderService.getNamingStoreInjector()).addListener(new LifecycleListener() { | ||
| private volatile boolean bound; | ||
| public void handleEvent(final ServiceController<?> controller, final LifecycleEvent event) { | ||
| switch (event) { | ||
| case UP: { | ||
| @@ -269,13 +270,16 @@ public void handleEvent(final ServiceController<?> controller, final LifecycleEv | ||
| } else { | ||
| SUBSYSTEM_DATASOURCES_LOGGER.boundNonJTADataSource(jndiName); | ||
| } | ||
| bound = true; | ||
| break; | ||
| } | ||
| case DOWN: { | ||
| if (isTransactional()) { | ||
| SUBSYSTEM_DATASOURCES_LOGGER.unboundDataSource(jndiName); | ||
| } else { | ||
| SUBSYSTEM_DATASOURCES_LOGGER.unBoundNonJTADataSource(jndiName); | ||
| if (bound) { | ||
| if (isTransactional()) { | ||
| SUBSYSTEM_DATASOURCES_LOGGER.unboundDataSource(jndiName); | ||
| } else { | ||
| SUBSYSTEM_DATASOURCES_LOGGER.unBoundNonJTADataSource(jndiName); | ||
| } | ||
| } | ||
| break; | ||
| } | ||
| @@ -58,6 +58,7 @@ public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentU | ||
| if (module != null && servicesAttachment != null) { | ||
| final ModuleClassLoader classLoader = module.getClassLoader(); | ||
| final List<String> driverNames = servicesAttachment.getServiceImplementations(Driver.class.getName()); | ||
| int idx = 0; | ||
| for (String driverClassName : driverNames) { | ||
| try { | ||
| final Class<? extends Driver> driverClass = classLoader.loadClass(driverClassName).asSubclass(Driver.class); | ||
| @@ -86,6 +87,18 @@ public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentU | ||
| .addDependency(ConnectorServices.JDBC_DRIVER_REGISTRY_SERVICE, DriverRegistry.class, | ||
| driverService.getDriverRegistryServiceInjector()).setInitialMode(Mode.ACTIVE).install(); | ||
|
|
||
| if (idx == 0 && driverNames.size() != 1) { | ||
| // create short name driver service | ||
| driverName = deploymentUnit.getName(); // reset driverName to the deployment unit name | ||
| driverMetadata = new InstalledDriver(driverName, driverClass.getName(), null, | ||
| null, majorVersion, minorVersion, compliant); | ||
| driverService = new DriverService(driverMetadata, driver); | ||
| phaseContext.getServiceTarget() | ||
| .addService(ServiceName.JBOSS.append("jdbc-driver", driverName.replaceAll("\\.", "_")), driverService) | ||
| .addDependency(ConnectorServices.JDBC_DRIVER_REGISTRY_SERVICE, DriverRegistry.class, driverService.getDriverRegistryServiceInjector()) | ||
| .setInitialMode(Mode.ACTIVE).install(); | ||
| } | ||
| idx++; | ||
| } catch (Throwable e) { | ||
| DEPLOYER_JDBC_LOGGER.cannotInstantiateDriverClass(driverClassName, e); | ||
| } | ||
| @@ -363,6 +363,7 @@ private void startDataSource(final AbstractDataSourceService dataSourceService, | ||
| .addService(bindInfo.getBinderServiceName(), binderService) | ||
| .addDependency(referenceFactoryServiceName, ManagedReferenceFactory.class, binderService.getManagedObjectInjector()) | ||
| .addDependency(bindInfo.getParentContextServiceName(), ServiceBasedNamingStore.class, binderService.getNamingStoreInjector()).addListener(new LifecycleListener() { | ||
| private volatile boolean bound; | ||
| public void handleEvent(final ServiceController<?> controller, final LifecycleEvent event) { | ||
| switch (event) { | ||
| case UP: { | ||
| @@ -371,13 +372,16 @@ public void handleEvent(final ServiceController<?> controller, final LifecycleEv | ||
| } else { | ||
| SUBSYSTEM_DATASOURCES_LOGGER.boundNonJTADataSource(jndiName); | ||
| } | ||
| bound = true; | ||
| break; | ||
| } | ||
| case DOWN: { | ||
| if (isTransactional) { | ||
| SUBSYSTEM_DATASOURCES_LOGGER.unboundDataSource(jndiName); | ||
| } else { | ||
| SUBSYSTEM_DATASOURCES_LOGGER.unBoundNonJTADataSource(jndiName); | ||
| if (bound) { | ||
| if (isTransactional) { | ||
| SUBSYSTEM_DATASOURCES_LOGGER.unboundDataSource(jndiName); | ||
| } else { | ||
| SUBSYSTEM_DATASOURCES_LOGGER.unBoundNonJTADataSource(jndiName); | ||
| } | ||
| } | ||
| break; | ||
| } | ||
| @@ -100,14 +100,18 @@ public void getResourceValue(final ResolutionContext context, final ServiceBuild | ||
|
|
||
| serviceBuilder.addDependency(AdminObjectReferenceFactoryService.SERVICE_NAME_BASE.append(bindInfo.getBinderServiceName()), ManagedReferenceFactory.class, injector); | ||
| serviceBuilder.addListener(new LifecycleListener() { | ||
| private volatile boolean bound; | ||
| public void handleEvent(final ServiceController<?> controller, final LifecycleEvent event) { | ||
| switch (event) { | ||
| case UP: { | ||
| DEPLOYMENT_CONNECTOR_LOGGER.adminObjectAnnotation(jndiName); | ||
| bound = true; | ||
| break; | ||
| } | ||
| case DOWN: { | ||
| DEPLOYMENT_CONNECTOR_LOGGER.unboundJca("AdminObject", jndiName); | ||
| if (bound) { | ||
| DEPLOYMENT_CONNECTOR_LOGGER.unboundJca("AdminObject", jndiName); | ||
| } | ||
| break; | ||
| } | ||
| case REMOVED: { | ||
| @@ -442,14 +442,18 @@ protected AbstractWildFlyRaDeployer(ServiceTarget serviceTarget, URL url, String | ||
| .addDependency(bindInfo.getParentContextServiceName(), ServiceBasedNamingStore.class, | ||
| binderService.getNamingStoreInjector()) | ||
| .addListener(new LifecycleListener() { | ||
| private volatile boolean bound; | ||
| public void handleEvent(final ServiceController<? extends Object> controller, final LifecycleEvent event) { | ||
| switch (event) { | ||
| case UP: { | ||
| DEPLOYMENT_CONNECTOR_LOGGER.boundJca("ConnectionFactory", jndi); | ||
| bound = true; | ||
| break; | ||
| } | ||
| case DOWN: { | ||
| DEPLOYMENT_CONNECTOR_LOGGER.unboundJca("ConnectionFactory", jndi); | ||
| if (bound) { | ||
| DEPLOYMENT_CONNECTOR_LOGGER.unboundJca("ConnectionFactory", jndi); | ||
| } | ||
| break; | ||
| } | ||
| case REMOVED: { | ||
| @@ -479,15 +483,19 @@ private void installJNDIAliases(final ContextNames.BindInfo bindInfo, final Serv | ||
| sb.addDependency(bindInfo.getParentContextServiceName(), ServiceBasedNamingStore.class, aliasBinderService.getNamingStoreInjector()); | ||
| sb.requires(bindInfo.getBinderServiceName()); | ||
| sb.addListener(new LifecycleListener() { | ||
| private volatile boolean bound; | ||
| @Override | ||
| public void handleEvent(ServiceController<?> controller, LifecycleEvent event) { | ||
| switch (event) { | ||
| case UP: { | ||
| DEPLOYMENT_CONNECTOR_LOGGER.bindingAlias(bindInfo.getAbsoluteJndiName(), alias); | ||
| bound = true; | ||
| break; | ||
| } | ||
| case DOWN: { | ||
| DEPLOYMENT_CONNECTOR_LOGGER.unbindingAlias(bindInfo.getAbsoluteJndiName(), alias); | ||
| if (bound) { | ||
| DEPLOYMENT_CONNECTOR_LOGGER.unbindingAlias(bindInfo.getAbsoluteJndiName(), alias); | ||
| } | ||
| break; | ||
| } | ||
| case REMOVED: { | ||
| @@ -539,15 +547,18 @@ public void handleEvent(ServiceController<?> controller, LifecycleEvent event) { | ||
| binderService.getManagedObjectInjector()) | ||
| .addDependency(bindInfo.getParentContextServiceName(), ServiceBasedNamingStore.class, | ||
| binderService.getNamingStoreInjector()).addListener(new LifecycleListener() { | ||
|
|
||
| private volatile boolean bound; | ||
| public void handleEvent(final ServiceController<?> controller, final LifecycleEvent event) { | ||
| switch (event) { | ||
| case UP: { | ||
| DEPLOYMENT_CONNECTOR_LOGGER.boundJca("AdminObject", jndi); | ||
| bound = true; | ||
| break; | ||
| } | ||
| case DOWN: { | ||
| DEPLOYMENT_CONNECTOR_LOGGER.unboundJca("AdminObject", jndi); | ||
| if (bound) { | ||
| DEPLOYMENT_CONNECTOR_LOGGER.unboundJca("AdminObject", jndi); | ||
| } | ||
| break; | ||
| } | ||
| case REMOVED: { | ||
| @@ -418,6 +418,7 @@ static void secondRuntimeStep(OperationContext context, ModelNode operation, Man | ||
| .addService(bindInfo.getBinderServiceName(), binderService) | ||
| .addDependency(referenceFactoryServiceName, ManagedReferenceFactory.class, binderService.getManagedObjectInjector()) | ||
| .addDependency(bindInfo.getParentContextServiceName(), ServiceBasedNamingStore.class, binderService.getNamingStoreInjector()).addListener(new LifecycleListener() { | ||
| private volatile boolean bound; | ||
| public void handleEvent(final ServiceController<? extends Object> controller, final LifecycleEvent event) { | ||
| switch (event) { | ||
| case UP: { | ||
| @@ -426,13 +427,16 @@ public void handleEvent(final ServiceController<? extends Object> controller, fi | ||
| } else { | ||
| SUBSYSTEM_DATASOURCES_LOGGER.boundNonJTADataSource(jndiName); | ||
| } | ||
| bound = true; | ||
| break; | ||
| } | ||
| case DOWN: { | ||
| if (jta) { | ||
| SUBSYSTEM_DATASOURCES_LOGGER.unboundDataSource(jndiName); | ||
| } else { | ||
| SUBSYSTEM_DATASOURCES_LOGGER.unBoundNonJTADataSource(jndiName); | ||
| if (bound) { | ||
| if (jta) { | ||
| SUBSYSTEM_DATASOURCES_LOGGER.unboundDataSource(jndiName); | ||
| } else { | ||
| SUBSYSTEM_DATASOURCES_LOGGER.unBoundNonJTADataSource(jndiName); | ||
| } | ||
| } | ||
| break; | ||
| } | ||
| @@ -55,8 +55,7 @@ private JcaSubsystemRootDefinition(final boolean registerRuntimeOnly) { | ||
| super(new Parameters(PATH_SUBSYSTEM, JcaExtension.getResourceDescriptionResolver()) | ||
| .setAddHandler(JcaSubsystemAdd.INSTANCE) | ||
| .setRemoveHandler(JcaSubSystemRemove.INSTANCE) | ||
| .setCapabilities(JCA_NAMING_CAPABILITY) | ||
| .setCapabilities(TRANSACTION_INTEGRATION_CAPABILITY) | ||
| .setCapabilities(JCA_NAMING_CAPABILITY, TRANSACTION_INTEGRATION_CAPABILITY) | ||
| ); | ||
| this.registerRuntimeOnly = registerRuntimeOnly; | ||
| } | ||
| @@ -40,6 +40,7 @@ | ||
| import org.jboss.as.model.test.ModelTestControllerVersion; | ||
| import org.jboss.as.model.test.ModelTestUtils; | ||
| import org.jboss.as.model.test.SingleClassFilter; | ||
| import org.jboss.as.naming.service.NamingService; | ||
| import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest; | ||
| import org.jboss.as.subsystem.test.AdditionalInitialization; | ||
| import org.jboss.as.subsystem.test.KernelServices; | ||
| @@ -89,6 +90,7 @@ protected AdditionalInitialization createAdditionalInitialization() { | ||
| ConnectorServices.LOCAL_TRANSACTION_PROVIDER_CAPABILITY, | ||
| ConnectorServices.TRANSACTION_XA_RESOURCE_RECOVERY_REGISTRY_CAPABILITY, | ||
| ConnectorServices.TRANSACTION_SYNCHRONIZATION_REGISTRY_CAPABILITY, | ||
| NamingService.CAPABILITY_NAME, | ||
| "org.wildfly.threads.thread-factory.string"); | ||
| } | ||
Oops, something went wrong.