Re: JDBC gripe list

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: JDBC gripe list
Дата
Msg-id 4D927745.9080900@postnewspapers.com.au
обсуждение исходный текст
Ответ на Re: JDBC gripe list  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-jdbc
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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: JDBC gripe list
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: JDBC gripe list