Skip to content

[XChange] Add initial support for account management#2216

Merged
davsclaus merged 1 commit intoapache:masterfrom
tdiesler:CAMEL-12170
Feb 13, 2018
Merged

[XChange] Add initial support for account management#2216
davsclaus merged 1 commit intoapache:masterfrom
tdiesler:CAMEL-12170

Conversation

@tdiesler
Copy link
Copy Markdown
Contributor

@tdiesler tdiesler commented Feb 9, 2018

Resolves CAMEL-12170

return exchange;
}

private synchronized XChange createXChange(XChangeConfiguration configuration) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Its better to do this in doStart so you dont need synchronized code blocks

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'd like to create the XChange once so it can be shared among all endpoints. For this I'd need some piece of information that names the exchange. This is currently encoded in the URI and (if IIUC) becomes available when the endpoint is created.

If I do this initialization in Endpoint.doStart(), I'd still need to synchronize unless it is guaranteed that endpoints are not started in parallel (also in the future).

If I do this initialization in Component.doStart(), I'd not know how to get at the piece of information that names the exchange.

@davsclaus davsclaus merged commit 54ee1e9 into apache:master Feb 13, 2018
@tdiesler tdiesler deleted the CAMEL-12170 branch November 14, 2018 14:12
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