Vijay Kumar wrote:
Hi Mark,

Thanks for your update.

I should have specify my requirement little more clear to you to understand
what you are saying.

I have Oracle Database where my objects are installed and I have also a
Linux instance where i installed Tomcat.
I am currently creating connection to the Oracle database from Tomcat using
'apps' user as this schema is having all permissions.

One of my client want to monitor the connections that are created from my
application. For this i want to pass my Linux user information (userid)
while creating the connection from my application or in context.xml file.

Please suggest is it possible or not?


Possible, it certainly is.
But is it the best solution to fulfill your customer's wishes, that is another 
question.

I believe that you have to think carefully about all the implications, in your application as well as on the performance of the system, before rushing to any kind of "solution".

For example, would it not be easier for your application to just write a line to some logfile, whenever it accesses the database on behalf of the logged-in user (and read and analyse that file later, and provide that information to your customer) ? If your customer just wants to know who is really using the database and/or how much, that would be enough.

If you really want to open the connection to the database under each individual user-id, then it means for example that the database has to know each of those user-id's (and keep them up-to-date). It also means that different user-id's could have different access rights (or none), and that your application would have to take this into account. And so on.. It is not just the fact of opening the connection. It may be the whole design of your application that would need to change.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to