Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E480F1337B68 for ; Tue, 29 Mar 2011 21:20:49 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 02411-06 for ; Wed, 30 Mar 2011 00:20:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [173.230.139.50]) by mail.postgresql.org (Postfix) with ESMTP id F3F161337B47 for ; Tue, 29 Mar 2011 21:20:31 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by www.postnewspapers.com.au (Postfix) with ESMTP id F3DFB123; Tue, 29 Mar 2011 20:20:30 -0400 (EDT) X-Virus-Scanned: amavisd-new at postnewspapers.com.au.com Received: from www.postnewspapers.com.au ([127.0.0.1]) by localhost (www.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id WYUwS7jZxGsg; Tue, 29 Mar 2011 20:20:29 -0400 (EDT) Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by www.postnewspapers.com.au (Postfix) with ESMTP id 2AE0E2D; Tue, 29 Mar 2011 20:20:29 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 32C6BAEB0B; Wed, 30 Mar 2011 08:20:28 +0800 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (mail.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id s3skXpG3W7f0; Wed, 30 Mar 2011 08:20:22 +0800 (WST) Received: from [10.1.1.5] (58-7-255-44.dyn.iinet.net.au [58.7.255.44]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTPSA id 467E0AEB0A; Wed, 30 Mar 2011 08:20:22 +0800 (WST) Message-ID: <4D927745.9080900@postnewspapers.com.au> Date: Wed, 30 Mar 2011 08:20:21 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Thunderbird/3.1.7 MIME-Version: 1.0 To: Kevin Grittner CC: Vitalii Tymchyshyn , Dave Cramer , List Subject: Re: JDBC gripe list References: <4D914191.8050103@postnewspapers.com.au> <4D919A02.60607@gmail.com> <4D91A252020000250003BE85@gw.wicourts.gov> <4D91ECD5.6010109@gmail.com> <4D91BABD020000250003BEA3@gw.wicourts.gov> In-Reply-To: <4D91BABD020000250003BEA3@gw.wicourts.gov> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201103/126 X-Sequence-Number: 21681 On 03/29/2011 11:55 PM, Kevin Grittner wrote: > Vitalii Tymchyshyn wrote: > If they prohibit this, it would be a problem. > Can the security policy be adjusted to allow this specific > exception without too much pain? It's probably not a good idea to directly create threads from within a container anyway. "Ideally" (from the container app purist and container designer's point of view, not reality) you ask the container for a thread from a managed pool, either by requesting one from JNDI or through @Resource injection. Of course, the pre-defined pools are vendor-specific (argh!) so an additional connection param specifying the jndi name of the connection pool to use would probably be necessary. >> 1) Thread creation may be prohibited by SecurityManager. I'd >> expect J2EE containers prohibit such a thing since EJBs are >> prohibited to create it's own threads. > > I've never used EJBs, as the description of the technology sounded > awful to me up front. EJBs prior to EJB3.1 were indeed awful. With EJB3.1 and CDI/Weld, EJBs and containerized applications are starting to become quite nice. Unfortunately all the dependency injection stuff is still excitingly buggy and the container configuration mechanisms are both vendor specific and rather stupid, limiting the utility of the whole thing a bit. Give it another five to ten years at Java's almost C++-esque rate of development these days and it'll be really nice to use :S ( Stupid configuration mechanism example: JAAS separates the concept of "role" from "user" and "group". Roles are application-defined and are mapped onto container-defined local users and groups. Great idea, except that the role-to-user/group mapping is defined in a vendor-specific xml deployment descriptor THAT IS BUNDLED INSIDE THE APPLICATION! The app has no way of knowing about the users and groups of any given deployment site, so the whole role/user/group separation is rendered useless in one incredible master stroke of pain. At least in Glassfish there's no way to override the bundled descriptor (glassfish-web.xml) during deployment or edit the role mappings after deployment. ) -- Craig Ringer