Return-Path: Delivered-To: apmail-poi-user-archive@www.apache.org Received: (qmail 39938 invoked from network); 2 Dec 2008 15:57:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Dec 2008 15:57:33 -0000 Received: (qmail 56349 invoked by uid 500); 2 Dec 2008 15:57:44 -0000 Delivered-To: apmail-poi-user-archive@poi.apache.org Received: (qmail 56339 invoked by uid 500); 2 Dec 2008 15:57:44 -0000 Mailing-List: contact user-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Users List" Delivered-To: mailing list user@poi.apache.org Received: (qmail 56328 invoked by uid 99); 2 Dec 2008 15:57:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Dec 2008 07:57:44 -0800 X-ASF-Spam-Status: No, hits=4.0 required=10.0 tests=DNS_FROM_OPENWHOIS,FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Dec 2008 15:56:14 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1L7XcT-0000fd-FW for user@poi.apache.org; Tue, 02 Dec 2008 07:57:01 -0800 Message-ID: <20794395.post@talk.nabble.com> Date: Tue, 2 Dec 2008 07:57:01 -0800 (PST) From: Rob Y To: user@poi.apache.org Subject: Re: Using POI via JNI In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: ryampolsky@yahoo.com References: <20774758.post@talk.nabble.com> <20775023.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Josh Micich wrote: > > Hello Rob, > > So you might be stuck with leaving the JVM permanently loaded. This > may not be such a bad thing if you application is multi-threaded and > has the potential for concurrent calls to POI. Multi-threading would > be harder to support assuming short-lived JVMs. > > cheers, > Josh > Leaving the JVM loaded is fine so long as my 'print to excel' library is the only thing that uses Java in the app. But if the calling app wanted to use Java itself, there'd be a conflict. At very least, it'd want to start up a JVM with a different classpath than I use, since I've got my code and poi in .jar files that make up my classpath. My app's structured Apache-like as a transaction processing system with a pool of shared processes as opposed to a single multi-threaded process. The second time a user goes to create an XLS, they may be running in a different process than the first time, so having the JVM preloaded is less of a benefit and more of an overhead. I think it'd be better to just exit my process after creating the XLS and let the system dispatcher launch a new copy as needed. Luckily, I have that option, but it's pretty incredible that Sun's had this DestroyJavaVM thing in their documentation all along and still haven't implemented it properly. Does anybody know how Apache Tomcat deals with this? Presumably it's got a pool of processes that need to run different Java code on different invocations. I guess if they all use the same classpath, then the same JVM could service them all. Is that the trick? Rob -- View this message in context: http://www.nabble.com/Using-POI-via-JNI-tp20774758p20794395.html Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@poi.apache.org For additional commands, e-mail: user-help@poi.apache.org