Assuming you are using straight JDBC or a persistence framework designed for per-user connections, I believe that the org.apache.commons.dbcp.datasources.PerUserPoolDataSource pool can do what you want, but I've never used per-user pools myself. Also, I bet that c3p0 (http://sourceforge.net/projects/c3p0/) can do it also.

-dain

On Nov 10, 2008, at 11:55 AM, Paul Spencer wrote:

I have an application that requires a logged in user be restricted to a schema within the database. For the sake of illustration, the application is an address book and their is one schema per user. The database structure of the table and views within each schema are exactly same.

My questions:

1) How do insure that a logged in user will only access the data in their schema?

2) How can a new schema be automatically created when user is created?

Paul Spencer





Reply via email to