Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Using user's oracle credentials to connect to database within BMP

Using user's oracle credentials to connect to database within BMP

From: Jeff Rhines <jrhines_at_yahoo.com>
Date: 12 Dec 2001 14:19:26 -0800
Message-ID: <2ab04786.0112121419.4087071c@posting.google.com>

hello all,

Although i've been using java a while, i'm new to both oracle and ejb, and have been trying to solve a simple puzzle the past couple of days.  I'm using JDeveloper to test, and have an Oracle 8 database backing it up. There is one BMP entity bean that i can retrieve and view with the usual jndi lookup, then retrieval by primary key. However, i can't figure out how to connect to the database from within the bean using the same user principal/credentials that were used to connect to OC4J. That is, if joe schmoe has a database (and app server account), and looks up my bean via jndi, i want to also connect to the database as joe schmoe. However, i can only get joe's name (via entityContext.getPrincipal().getName() ), and have no way to get his credentials, which i need to connect to the database. Am i bound to only connecting as joe to the app server, then super-using the database? I'd prefer the redundant security, especially since the ejb layer is a new project. It will fail if we have to fully open up the database to a user in the ejb layer. What am i missing?

TIA,
Jeff Received on Wed Dec 12 2001 - 16:19:26 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US