Return-Path: X-Original-To: apmail-db-derby-user-archive@www.apache.org Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8BB8FE480 for ; Thu, 6 Dec 2012 21:05:12 +0000 (UTC) Received: (qmail 69501 invoked by uid 500); 6 Dec 2012 21:05:12 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 69377 invoked by uid 500); 6 Dec 2012 21:05:11 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 69266 invoked by uid 99); 6 Dec 2012 21:05:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Dec 2012 21:05:11 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [216.82.254.195] (HELO mail200.messagelabs.com) (216.82.254.195) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Dec 2012 21:05:01 +0000 X-Env-Sender: pbortnovskiy@jefferies.com X-Msg-Ref: server-13.tower-200.messagelabs.com!1354827878!7068866!3 X-Originating-IP: [169.196.176.54] X-StarScan-Received: X-StarScan-Version: 6.6.1.8; banners=-,-,- X-VirusChecked: Checked Received: (qmail 13462 invoked from network); 6 Dec 2012 21:04:39 -0000 Received: from mail1.jefferies.com (HELO mail1.jefferies.com) (169.196.176.54) by server-13.tower-200.messagelabs.com with AES256-SHA encrypted SMTP; 6 Dec 2012 21:04:39 -0000 Received: from EXJSQUSDAG02.ad.jefco.com (10.162.114.42) by EXJSQEDGE02.dmz.jefco.local (10.162.35.68) with Microsoft SMTP Server (TLS) id 14.1.355.2; Thu, 6 Dec 2012 16:03:58 -0500 Received: from EXJSQUSDAG04.ad.jefco.com ([169.254.4.19]) by EXJSQUSDAG02.ad.jefco.com ([169.254.2.30]) with mapi id 14.01.0355.003; Thu, 6 Dec 2012 16:03:58 -0500 From: Pavel Bortnovskiy To: "Derby Discussion (derby-user@db.apache.org)" Subject: concurrent execution of Statement's .addBatch() and .executeBatch() Thread-Topic: concurrent execution of Statement's .addBatch() and .executeBatch() Thread-Index: Ac3T9NM1gxnz4P7rRAaed3CoOJklAA== Date: Thu, 6 Dec 2012 21:03:57 +0000 Message-ID: <619F13B2042F204E8E8E93D73870255809DEA2AB@EXJSQUSDAG04.ad.jefco.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.162.93.34] Content-Type: multipart/alternative; boundary="_000_619F13B2042F204E8E8E93D73870255809DEA2ABEXJSQUSDAG04adj_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_619F13B2042F204E8E8E93D73870255809DEA2ABEXJSQUSDAG04adj_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello: Is it safe to call .addBatch() and .executeBatch() methods from multiple th= reads on the same PreparedStatement? Simple example: batching and executing a large number of the same statement= s (with the same PreparedStatement) by using ExecutorService. Thank you, Pavel. Jefferies archives and monitors outgoing and incoming e-mail. The contents = of this email, including any attachments, are confidential to the ordinary = user of the email address to which it was addressed. If you are not the add= ressee of this email you may not copy, forward, disclose or otherwise use i= t or any part of it in any form whatsoever. This email may be produced at t= he request of regulators or in connection with civil litigation. Jefferies = accepts no liability for any errors or omissions arising as a result of tra= nsmission. Use by other than intended recipients is prohibited. In the Unit= ed Kingdom, Jefferies operates as Jefferies International Limited; register= ed in England: no. 1978621; registered office: Vintners Place, 68 Upper Tha= mes Street, London EC4V 3BJ. Jefferies International Limited is authorised = and regulated by the Financial Services Authority. --_000_619F13B2042F204E8E8E93D73870255809DEA2ABEXJSQUSDAG04adj_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello:

 

Is it safe to call .addBatch() and .executeBatch() m= ethods from multiple threads on the same PreparedStatement?

Simple example: batching and executing a large numbe= r of the same statements (with the same PreparedStatement) by using Executo= rService.

 

Thank you,

Pavel.


Jefferies archives and monitors outgoing and incoming e-mail. The contents = of this email, including any attachments, are confidential to the ordinary = user of the email address to which it was addressed. If you are not the add= ressee of this email you may not copy, forward, disclose or otherwise use it or any part of it in any form = whatsoever. This email may be produced at the request of regulators or in c= onnection with civil litigation. Jefferies accepts no liability for any err= ors or omissions arising as a result of transmission. Use by other than intended recipients is prohibited. In t= he United Kingdom, Jefferies operates as Jefferies International Limited; r= egistered in England: no. 1978621; registered office: Vintners Place, 68 Up= per Thames Street, London EC4V 3BJ. Jefferies International Limited is authorised and regulated by the Financi= al Services Authority.
--_000_619F13B2042F204E8E8E93D73870255809DEA2ABEXJSQUSDAG04adj_--