users@glassfish.java.net

Re: Database Passthrough

From: <noreply_at_java.net>
Date: Sat, 06 Nov 2010 09:09:40 -0700

[quote=hanodl]

Hi

I need to do my authentication for the user sessions on the database, Thus I
need to pass through from the session to the database the username and
password and all access on the database has to be with their own username and
password, for only certain users will be granted the roles on the database.

Does anyone have an idea how to do it?

[/quote]

Normally Glassfish (like most application servers) will use connection pools
to provide access to the database.  This means that in a typical
installation all database access is performed by one database user on behalf
of many application users.

To achieve what you want, you would have to have /n/ connection pools and /n/
users (i.e. one connection pool per user).  Then you would need to write
code that, at login time, would figure out which connection pool to associate
with the current user.  This is almost certainly not what you want to do. 
But it is possible.

Best,
Laird


--
[Message sent by forum member 'ljnelson']
View Post: http://forums.java.net/node/713377