[
https://issues.apache.org/jira/browse/DIRAPI-163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13852980#comment-13852980
]
lucas theisen commented on DIRAPI-163:
--------------------------------------
For the previous comment, the template code would be:
{code:java}
public AddResponse add( AddRequest addRequest ) {
LdapConnection connection = null;
try {
connection = ldapConnections.borrowObject();
return connection.add( addRequest );
}
catch ( LdapException e ) {
throw new LdapRuntimeException( e );
}
finally {
returnLdapConnection( connection );
}
}
{code}
> Add an LdapConnectionTemplate (template design pattern)
> -------------------------------------------------------
>
> Key: DIRAPI-163
> URL: https://issues.apache.org/jira/browse/DIRAPI-163
> Project: Directory Client API
> Issue Type: New Feature
> Affects Versions: 1.0.0-M21
> Reporter: lucas theisen
>
> Create an LdapConnectionTemplate that can abstract the cookie cutter using
> callbacks.
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)