Re: Could DBCP set different username when getConnection

2017-02-16 Thread 王钦

Thank you for your help.


Qin


On 2017年02月17日 04:14, Phil Steitz wrote:

On 2/16/17 1:31 AM, John Patrick wrote:

>From my understanding of you question. You would need a pool per role/user.

That is available in PerUserPoolDataSource [1].

Phil

[1] http://commons.apache.org/proper/commons-dbcp/api-2.1.1/index.html

Note to devs:  the 2.2 javadocs seem to be missing from the web site.

John


On 16 February 2017 at 08:48, 王钦  wrote:

Hi All:

 I define some roles and grant different privileges in database. And I
use DBCP to manage the connection. How could I set different user name when
I get one connection from DBCP?

Thanks for reading this mail.


Qin





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


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




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







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



Re: Could DBCP set different username when getConnection

2017-02-16 Thread 王钦
Thank you for you suggestion. But it should consume much more system 
memory...



On 2017年02月16日 17:31, John Patrick wrote:

>From my understanding of you question. You would need a pool per role/user.

John


On 16 February 2017 at 08:48, 王钦  wrote:

Hi All:

 I define some roles and grant different privileges in database. And I
use DBCP to manage the connection. How could I set different user name when
I get one connection from DBCP?

Thanks for reading this mail.


Qin





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


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







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



Re: Could DBCP set different username when getConnection

2017-02-16 Thread Phil Steitz
On 2/16/17 1:31 AM, John Patrick wrote:
> >From my understanding of you question. You would need a pool per role/user.

That is available in PerUserPoolDataSource [1].

Phil

[1] http://commons.apache.org/proper/commons-dbcp/api-2.1.1/index.html

Note to devs:  the 2.2 javadocs seem to be missing from the web site.
>
> John
>
>
> On 16 February 2017 at 08:48, 王钦  wrote:
>> Hi All:
>>
>> I define some roles and grant different privileges in database. And I
>> use DBCP to manage the connection. How could I set different user name when
>> I get one connection from DBCP?
>>
>> Thanks for reading this mail.
>>
>>
>> Qin
>>
>>
>>
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
>> For additional commands, e-mail: user-h...@commons.apache.org
>>
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
>
>


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



Re: Could DBCP set different username when getConnection

2017-02-16 Thread John Patrick
>From my understanding of you question. You would need a pool per role/user.

John


On 16 February 2017 at 08:48, 王钦  wrote:
> Hi All:
>
> I define some roles and grant different privileges in database. And I
> use DBCP to manage the connection. How could I set different user name when
> I get one connection from DBCP?
>
> Thanks for reading this mail.
>
>
> Qin
>
>
>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
>

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



Could DBCP set different username when getConnection

2017-02-16 Thread 王钦

Hi All:

I define some roles and grant different privileges in database. And 
I use DBCP to manage the connection. How could I set different user name 
when I get one connection from DBCP?


Thanks for reading this mail.


Qin





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