Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARTEMIS-5253 improve referencability of RA ConnectionFactory #5576

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jbertram
Copy link
Contributor

No description provided.

@@ -39,7 +39,7 @@ public ActiveMQRAConnectionManager() {
logger.trace("constructor()");
}

ConcurrentHashSet<ManagedConnection> connections = new ConcurrentHashSet<>();
transient ConcurrentHashSet<ManagedConnection> connections = new ConcurrentHashSet<>();
Copy link
Contributor

@tabish121 tabish121 Mar 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My recollection of Serialization code (which is pretty foggy) is that when you do this the value of the connections variable will be null after readObject is called regardless of the initialization here and you would need to add an override of readObject to initialize the value of connections:

    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
        in.defaultReadObject();

        connections = new ConcurrentHashSet<>();
    }

Same holds true for some of the other new transient collections added below

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