You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2009/11/16 15:21:52 UTC
[jira] Resolved: (CAMEL-2175) Initialization code of camel-cxf is
not thread safe
[ https://issues.apache.org/activemq/browse/CAMEL-2175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-2175.
--------------------------------
Resolution: Fixed
Fix Version/s: (was: 2.2.0)
trunk: 880761.
Now using Camels Service which provides a {{start}} method where initialization logic should be placed.
> Initialization code of camel-cxf is not thread safe
> ---------------------------------------------------
>
> Key: CAMEL-2175
> URL: https://issues.apache.org/activemq/browse/CAMEL-2175
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-cxf
> Affects Versions: 2.0.0
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Fix For: 2.1.0
>
>
> getCxfBinding is not thread safe in case multiple threads hit a CXF webserive at once and it hasnt been initialized before.
> Code like this
> {code}
> public CxfBinding getCxfBinding() {
> if (cxfBinding == null) {
> cxfBinding = new DefaultCxfBinding();
> if (LOG.isDebugEnabled()) {
> LOG.debug("Create default CXF Binding " + cxfBinding);
> }
> }
>
> if (!cxfBindingInitialized.getAndSet(true)
> && cxfBinding instanceof HeaderFilterStrategyAware) {
> ((HeaderFilterStrategyAware)cxfBinding)
> .setHeaderFilterStrategy(getHeaderFilterStrategy());
> }
> return cxfBinding;
> }
> {code}
> Is a false sense as the {{getAndSet}} will let other threads pass it with a cxfBinding that still may not have been initialized.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.