[
https://issues.apache.org/jira/browse/HTTPCLIENT-720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552817
]
Sagi Mann commented on HTTPCLIENT-720:
--------------------------------------
A few more notes:
* This code has not yet been tested with muti-threaded connection manager, will
do this next.
* usage from within EJB 3.0:
@Stateless
public class MyEJBean {
@Resource(mappedName="ra/HttpClientConnectionFactory") // or whatever the
registered pool name is
HttpClientRaConnectionFactory hcf;
void doSth() {
try {
HttpClientRaConnection con = hcf.getConnection(url,
"get");
try {
int rc = con.execute();
// do something interesting with the response:
while
(con.getHttpMethod().getResponseBodyAsStream().read() != -1);
if (rc != HttpStatus.SC_OK) { /* nasty log
message */ }
} finally { con.close(); }
} catch (Exception ex) {
// yet another nasty log message
}
}
}
> HttpClient Resource Adapter (JCA1.5)
> ------------------------------------
>
> Key: HTTPCLIENT-720
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-720
> Project: HttpComponents HttpClient
> Issue Type: New Feature
> Components: Contrib
> Affects Versions: 3.1 Final
> Environment: JCA1.5-compliant application server
> Reporter: Sagi Mann
> Priority: Minor
> Attachments: HttpClientRA.zip, HttpClientRA.zip
>
>
> Allow Java Enterprise applications (J2EE/JEE) to use HttpClient, by providing
> HttpClient as a standard Resource Adapter (JCA 1.5)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]