camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CAMEL-1583) ldap component is not thread safe
Date Mon, 04 May 2009 14:05:39 GMT

     [ https://issues.apache.org/activemq/browse/CAMEL-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen resolved CAMEL-1583.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0
                   1.6.1

trunk: 771303, 771307.
1.x: 771309.

Yeah I needed two commits on trunk as the patch was for 1.x and it used generics in the LdapProducer.
So I had to remove it again on trunk :)

> ldap component is not thread safe
> ---------------------------------
>
>                 Key: CAMEL-1583
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1583
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-ldap
>    Affects Versions: 1.6.0, 2.0-M1
>         Environment: N/A
>            Reporter: Christopher Hunt
>            Assignee: Claus Ibsen
>             Fix For: 1.6.1, 2.0.0
>
>         Attachments: LdapProducer.java.diff
>
>
> JNDI context objects are not thread-safe. The LDAP component shares a directory context
across all threads that use the component. This is not safe.
> In addition the LDAP component will attempt to establish a connection on instantiation
of the component, and not when the component is required to process requests. If the LDAP
server is not ready e.g. temporarily unavailable then the entire Camel application will stop.
> JNDI directory contexts should be established when a consuming thread needs it and should
be released when the thread is finished with the component i.e.:
> {code}
> ctx = new InitialDirContext(env);
> try {
>   ...
> } finally {
>   ctx.close();
> }
> {code}
> The above will release the connection with the LDAP server as soon as possible. The existing
component relies on JNDI to release the socket in its own time (several seconds later).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message