pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <craig@postnewspapers.com.au>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: Vitalii Tymchyshyn <tivv00@gmail.com>
Cc: Dave Cramer <pg@fastcrypt.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: JDBC gripe list
Date: Wed, 30 Mar 2011 08:20:21 +0800
Message-ID: <4D927745.9080900@postnewspapers.com.au> (raw)
In-Reply-To: <4D91BABD020000250003BEA3@gw.wicourts.gov>
References: <AANLkTik0kW5_jCAc7h0T_Q5cCGx=tunasHJ=nf0X=+ij@mail.gmail.com>
	<AANLkTi=+JZvbmJnjjJZZGvxb4oetzwZ1KH3SHqJ-SBJm@mail.gmail.com>
	<4D914191.8050103@postnewspapers.com.au>
	<4D919A02.60607@gmail.com>
	<4D91A252020000250003BE85@gw.wicourts.gov>
	<4D91ECD5.6010109@gmail.com>
	<4D91BABD020000250003BEA3@gw.wicourts.gov>

On 03/29/2011 11:55 PM, Kevin Grittner wrote:
> Vitalii Tymchyshyn<tivv00@gmail.com>  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



view thread (65+ messages)  latest in thread

Message-ID: <4D927745.9080900@postnewspapers.com.au>
Permalink:  ../4D927745.9080900@postnewspapers.com.au/
Also on:    postgresql.org/message-id/4D927745.9080900@postnewspapers.com.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: craig@postnewspapers.com.au, Kevin.Grittner@wicourts.gov, tivv00@gmail.com, pg@fastcrypt.com
  Subject: Re: JDBC gripe list
  In-Reply-To: <4D927745.9080900@postnewspapers.com.au>
  References: <AANLkTik0kW5_jCAc7h0T_Q5cCGx=tunasHJ=nf0X=+ij@mail.gmail.com> <AANLkTi=+JZvbmJnjjJZZGvxb4oetzwZ1KH3SHqJ-SBJm@mail.gmail.com> <4D914191.8050103@postnewspapers.com.au> <4D919A02.60607@gmail.com> <4D91A252020000250003BE85@gw.wicourts.gov> <4D91ECD5.6010109@gmail.com> <4D91BABD020000250003BEA3@gw.wicourts.gov> <4D927745.9080900@postnewspapers.com.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox