Return-Path: X-Original-To: apmail-chemistry-dev-archive@www.apache.org Delivered-To: apmail-chemistry-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 59BB67413 for ; Tue, 29 Nov 2011 13:26:01 +0000 (UTC) Received: (qmail 25398 invoked by uid 500); 29 Nov 2011 13:26:01 -0000 Delivered-To: apmail-chemistry-dev-archive@chemistry.apache.org Received: (qmail 25229 invoked by uid 500); 29 Nov 2011 13:26:01 -0000 Mailing-List: contact dev-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list dev@chemistry.apache.org Received: (qmail 25117 invoked by uid 99); 29 Nov 2011 13:26:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2011 13:26:01 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2011 13:26:00 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 06B63A6E12 for ; Tue, 29 Nov 2011 13:25:40 +0000 (UTC) Date: Tue, 29 Nov 2011 13:25:40 +0000 (UTC) From: =?utf-8?Q?Florian_M=C3=BCller_=28Commented=29_=28JIRA=29?= To: dev@chemistry.apache.org Message-ID: <989658855.21844.1322573140029.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1505791368.21216.1322549380082.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CMIS-474) HttpURLConnection do not close MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CMIS-474?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D131592= 51#comment-13159251 ]=20 Florian M=C3=BCller commented on CMIS-474: ------------------------------------- The HttpURLConnection implementation is in charge of closing connections be= cause it handles the keep-alive logic. Closing connections manually can hav= e a significant performance impact and is not recommended.=20 =20 > HttpURLConnection do not close > ------------------------------ > > Key: CMIS-474 > URL: https://issues.apache.org/jira/browse/CMIS-474 > Project: Chemistry > Issue Type: Bug > Components: opencmis-client-bindings > Affects Versions: OpenCMIS 0.5.0 > Reporter: Marco Spasiano > Priority: Critical > Labels: patch > Fix For: OpenCMIS 0.5.0 > > > If execute this code i got an error. > =09=09Session session =3D getCMISSession(); > =09=09try{ > =09=09=09Folder folder =3D (Folder) session.getObjectByPath("/");=09=09= =09 > =09=09=09for (int i =3D 0; i < 100; i++) { > =09=09=09=09System.out.println("before create folder"); > =09=09=09=09Folder newFolder =3D createNewFolder(folder, "TEST HTTPCONNEC= TION CLOSE"); > =09=09=09=09System.out.println("after create folder"); > =09=09=09=09newFolder.delete(true); > =09=09=09=09System.out.println("after delete folder");=09=09=09=09 > =09=09=09} > =09=09}catch (CmisBaseException e) { > =09=09=09e.printStackTrace(); > =09=09=09System.err.println(e.getErrorContent()); > =09=09}=09=09 > Maybe because in org.apache.chemistry.opencmis.client.bindings.spi.atompu= b.HttpUtils after open connection > don't close the connection. > HttpURLConnection conn =3D (HttpURLConnection) (new URL(url.t= oString())).openConnection(); > if I add this code everythings work fine. > =09conn.setRequestProperty("connection", "close"); -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira