Discussions

EJB design: JDBC connection pooling and DB views

  1. JDBC connection pooling and DB views (3 messages)

    We have a reasonably complex database that we must wrap with J2EE, and it has numerous views defined for ease of access. One of the crucial ones requires the client to get and use a view based on their database login. Multiple users can be concurrently accessing the database (10's, not 100's).

    How do we handle this with EJB's and connection pooling? Do we need a JDBC connection pool for each user? Is their a simple, scalable way?
  2. JDBC connection pooling and DB views[ Go to top ]

    To my mind, no you don't need a pool for each person, you're connection will exist at the database level and can access your views as need be, best through stored procedures.

    Max
  3. JDBC connection pooling and DB views[ Go to top ]

    Hi Ian,

    I think you are saying that you need each user to connect to the database via the J2EE application using unique database logons rather than having one common logon for the application as a whole?

    I ran into a similar problem a few years ago when building a J2EE application for a client. The DBA insisted that each user had to log on uniquely for security and auditing reasons so this prevented the use of one connection pool for the application and forced the use of a connection pool per active user (using their individual Oracle user id).

    Wasn't ideal from a performance point-of-view but the DBA wouldn't budge ...

    Cheers,

    Andy.
  4. JDBC connection pooling and DB views[ Go to top ]

    yep Andy - our DBA won't budge either. Looks like our solution will mirror yours..bummer :-{