Skip to content

TOMEE-4631 - arquillian-tomee-remote: re-register container on every Manager bootstrap#2816

Merged
rzo1 merged 1 commit into
mainfrom
TOMEE-4631
Jul 2, 2026
Merged

TOMEE-4631 - arquillian-tomee-remote: re-register container on every Manager bootstrap#2816
rzo1 merged 1 commit into
mainfrom
TOMEE-4631

Conversation

@rzo1

@rzo1 rzo1 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

https://issues.apache.org/jira/browse/TOMEE-4631

RemoteTomEEExtension guarded container registration behind a JVM-static latch, so only the first Arquillian Manager per JVM fork registered its DeployableContainer. A second Manager (e.g. failsafe rerunFailingTestsCount) got an empty registry and failed with DeploymentScenario contains a target (_DEFAULT_) not matching any defined Container.

Drop the static latch and register unconditionally, like EmbeddedTomEEExtension. Adds a regression test covering re-registration across two Manager bootstraps in the same JVM.

…Manager bootstrap

RemoteTomEEExtension guarded container registration behind a JVM-static
AtomicBoolean latch. Arquillian instantiates the extension and calls
register() once per Manager bootstrap, so the latch let only the first
Manager in a JVM fork register its DeployableContainer. Any second
Manager in the same fork (e.g. maven-failsafe-plugin's
rerunFailingTestsCount) got an empty ContainerRegistry and failed every
deployment with "DeploymentScenario contains a target (_DEFAULT_) not
matching any defined Container in the registry".

Drop the static latch (and the static lock that only guarded it) and
register unconditionally, matching EmbeddedTomEEExtension. The existing
try/catch(IllegalArgumentException) remains as the guard against a
genuine double-registration within a single builder.

Adds RemoteTomEEExtensionReRegistrationTest covering re-registration
across two Manager bootstraps in the same JVM.
@rzo1 rzo1 merged commit 84cf241 into main Jul 2, 2026
1 check passed
@rzo1 rzo1 deleted the TOMEE-4631 branch July 2, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants