allthingssecurity commented on code in PR #28262:
URL: https://github.com/apache/camel/pull/28262#discussion_r4345594226
##########
components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java:
##########
@@ -177,18 +177,51 @@ protected String createEndpointUri() {
return "xmpp://" + host + ":" + port + "/" + getParticipant() +
"?serviceName=" + serviceName;
}
+ /**
+ * Gets the connection of this endpoint's account for the given consumer
or producer. The endpoints of one account
+ * share its connection (a server keeps one session per account and
resource); each endpoint keeps its own
+ * participant, room and other settings. Release it with {@link
#releaseConnection(Object)} when the consumer or
+ * producer stops: the connection is closed when no consumer or producer
of the account uses it any more.
+ */
+ public XMPPTCPConnection acquireConnection(Object user)
+ throws InterruptedException, IOException, SmackException,
XMPPException {
+ return getComponent().acquireConnection(this, user);
+ }
+
+ /**
Review Comment:
Done in 377d4629079c, with your wording: "Connects and logs in the given
connection, acquired with `acquireConnection(Object)`, again when it is not
connected or not logged in; ...". The javadoc of `XmppComponent.reconnect` said
the same ("when it is not connected"), so it got the same fix. camel-xmpp: 20
tests, 0 failures, 5 skipped.
I left the optional `doStop` nit from the review: #28263 adds lines at the
top of that method, and an outer `try` there would make the two PRs conflict.
It can go into the follow-up once both are in.
_Claude Code on behalf of allthingssecurity_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]