Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 35836 invoked from network); 26 Feb 2011 15:57:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Feb 2011 15:57:32 -0000 Received: (qmail 61277 invoked by uid 500); 26 Feb 2011 15:57:32 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 60998 invoked by uid 500); 26 Feb 2011 15:57:30 -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 60991 invoked by uid 99); 26 Feb 2011 15:57:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Feb 2011 15:57:29 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bpendleton.derby@gmail.com designates 209.85.214.172 as permitted sender) Received: from [209.85.214.172] (HELO mail-iw0-f172.google.com) (209.85.214.172) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Feb 2011 15:57:21 +0000 Received: by iwl42 with SMTP id 42so2147032iwl.31 for ; Sat, 26 Feb 2011 07:57:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=tplcQg34VNWDff//yLjGC/n5mBrhn1mwaLqLXuA8vyE=; b=XvZyC+P6fk0a3+h4tryYBT+ct6mETwvO0VtvwyioieWl4q3KiX7LfHf7+Wl388HpP0 wE/HIcYr/K2gv7enkce8bOVlj/mCsrBWOKk/NaLws7yCWvJfYPA/JZVUPxsLfu0uMgks ASUE8sdYFcnAuabsRlmy9dzrGwPattD0C+7XI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=Rx7B74g3Da+9Nbs0p3V7Hj1VVjRYfth/j6oGlOjXg5YEd/ihATF/K1FOEotR6UcnVk DFDCNozhPXlTVnq70hq+0QBimzpjk6k6Y1CO4u9+NT6Zsd4RjziBOsHeWpsN6WmYX+YV c33jWBfpJjQtHReM6b9uRg4cs9aumiYK2J87s= Received: by 10.42.139.134 with SMTP id g6mr2352524icu.359.1298735821075; Sat, 26 Feb 2011 07:57:01 -0800 (PST) Received: from [192.168.0.102] (c-67-170-231-73.hsd1.ca.comcast.net [67.170.231.73]) by mx.google.com with ESMTPS id y8sm1416417ica.14.2011.02.26.07.56.59 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 26 Feb 2011 07:57:00 -0800 (PST) Message-ID: <4D6922C5.1050304@gmail.com> Date: Sat, 26 Feb 2011 07:56:53 -0800 From: Bryan Pendleton User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: Derby Discussion Subject: Re: Access to embedded derby db References: <31018634.post@talk.nabble.com> In-Reply-To: <31018634.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 02/25/2011 11:43 PM, linux86 wrote: > Can I ignore the lock on db or access to db in read only mode? No, those techniques are likely to bring crashes and database corruption, I'm afraid. In general, the only way to have multiple independent Java executables accessing the same Derby database is to channel them all through a NetworkServer instance. Can you control the JDBC URL used by the other program? If so, you could point it to a Network Server URL of a server that you controlled. Alternatively, if you can invoke the other program from within your own Java program (that is, if the other program is a simple Java executable), you could start the network server from within your own program prior to starting the other program, and then your own super-program would be able to serve concurrent requests from other tools as well as allowing the other program's direct access to the DB from within your super-program. thanks, bryan