db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject RE: [torque] Oracle 9 and Oracle Label Security
Date Sat, 21 May 2005 10:50:46 GMT




Hi,

Torque is agnostic of which database user accesses the database. It just
asks the pool to get a connection, and uses whatever connection the pool
gives back.
The difficulty would be to tell the pool which user is logged on; I see no
way to do this via Torque.

However, you can use any method to get your own connection for the specific
user, and use this connection to do whatever you want with torqe. For
almost all methods which access the database, there is a version where you
can supply your own connection (e.g. someObject.save(connection),
SomePeer.doSelect(Criteria, Connection)....). This is usually used for
transaction management, but you can also use it for using different
database connections for different users. Just make sure to close every
conection you use (best use a try...finally block) if you get connections
explicitly.

Maybe you can use the PerUserPoolDataSource in commons-dbcp
(http://jakarta.apache.org/commons/dbcp) for supporting multiple users. I
could not find out from a quick glance how one has to configure this pool,
but it sounds as if it supports different users in one pool (which is what
you want)

   Thomas

"Eric Jablow" <erjablow@praxiseng.com> schrieb am 20.05.2005 21:48:33:

> In my current project, we are using Oracle 9, and we
> need to introduce Oracle Label Security. OLS adds a
> column to secured tables and restricts what users may
> see and do with the secured tables based on their
> privileges and the tables' rows' security column.
>
> For this to work, a user must to log onto the database
> using his own identity.  I get the feeling though that users
> using a Torque-based application reach the database through
> one particular Torque user, the one the database schema was
> constructed with.  Is there any way to usefully have a user
> reach the database through his own credentials and not the
> standard Torque user?
>
> Respectfully,
> Eric Jablow
>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message