Domain Management - Add support for database authentication. Need advice

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Domain Management - Add support for database authentication. Need advice

Flemming Harms
Hi everybody

I'm currently working on "Domain Management - Add support for database authentication" https://issues.jboss.org/browse/AS7-1370 and https://issues.jboss.org/browse/AS7-1371 and struggling with a design issue. What I need to solve is that you are able to setup a connection pool for database authentication, and I was told that I could not depend on the JBOSS subsystem when running in domain mode.

So I basic need some functionality to handle a database connection pool, I can see 3 options but I don't know what is the best approach and what the guidelines are

1. Reuse some existing code in the project, I don't if it possible to take advantage of existing code for maintaining a database connection pool?
2. Use an existing 3 party lib, that will provide this functionality. I don't what are the common guidelines for adding new 3 party libs to the project?.
3. Write my own simple connection pool manager.

I was started on no. 3 and don't think it will be a huge task.

What do you think, does it make sense?

br
Flemming


_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Domain Management - Add support for database authentication. Need advice

Jason T. Greene
I would just go with 3 since all it does is execute two queries at most which are always read operations. A simple semapahore can be used to block callers when the pool is full It should also be optional since most jdbc drivers support pooling on their own.

On Jul 17, 2012, at 2:34 PM, Flemming Harms <[hidden email]> wrote:

Hi everybody

I'm currently working on "Domain Management - Add support for database authentication" https://issues.jboss.org/browse/AS7-1370 and https://issues.jboss.org/browse/AS7-1371 and struggling with a design issue. What I need to solve is that you are able to setup a connection pool for database authentication, and I was told that I could not depend on the JBOSS subsystem when running in domain mode.

So I basic need some functionality to handle a database connection pool, I can see 3 options but I don't know what is the best approach and what the guidelines are

1. Reuse some existing code in the project, I don't if it possible to take advantage of existing code for maintaining a database connection pool?
2. Use an existing 3 party lib, that will provide this functionality. I don't what are the common guidelines for adding new 3 party libs to the project?.
3. Write my own simple connection pool manager.

I was started on no. 3 and don't think it will be a huge task.

What do you think, does it make sense?

br
Flemming

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Domain Management - Add support for database authentication. Need advice

Flemming Harms
Under normal circumstances I properly go with no 2. But I kinda have the feeling you want to keep this simple and lightweight.

I will stick to solution no 3.
Thanks for the advice both.


2012/7/18 Jason Greene <[hidden email]>
I would just go with 3 since all it does is execute two queries at most which are always read operations. A simple semapahore can be used to block callers when the pool is full It should also be optional since most jdbc drivers support pooling on their own.

On Jul 17, 2012, at 2:34 PM, Flemming Harms <[hidden email]> wrote:

Hi everybody

I'm currently working on "Domain Management - Add support for database authentication" https://issues.jboss.org/browse/AS7-1370 and https://issues.jboss.org/browse/AS7-1371 and struggling with a design issue. What I need to solve is that you are able to setup a connection pool for database authentication, and I was told that I could not depend on the JBOSS subsystem when running in domain mode.

So I basic need some functionality to handle a database connection pool, I can see 3 options but I don't know what is the best approach and what the guidelines are

1. Reuse some existing code in the project, I don't if it possible to take advantage of existing code for maintaining a database connection pool?
2. Use an existing 3 party lib, that will provide this functionality. I don't what are the common guidelines for adding new 3 party libs to the project?.
3. Write my own simple connection pool manager.

I was started on no. 3 and don't think it will be a huge task.

What do you think, does it make sense?

br
Flemming

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev


_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Domain Management - Add support for database authentication. Need advice

Darran Lofthouse
On 07/18/2012 11:15 AM, Flemming Harms wrote:
> Under normal circumstances I properly go with no 2. But I kinda have the
> feeling you want to keep this simple and lightweight.

Yeah keeping things lightweight in the host controller process is important.

> I will stick to solution no 3. Thanks for the advice both.
>
> 2012/7/18 Jason Greene <[hidden email] <mailto:[hidden email]>>
>
>     I would just go with 3 since all it does is execute two queries at
>     most which are always read operations. A simple semapahore can be
>     used to block callers when the pool is full It should also be
>     optional since most jdbc drivers support pooling on their own.
>
>     On Jul 17, 2012, at 2:34 PM, Flemming Harms
>     <[hidden email] <mailto:[hidden email]>> wrote:
>
>>     Hi everybody
>>
>>     I'm currently working on "Domain Management - Add support for
>>     database authentication" https://issues.jboss.org/browse/AS7-1370
>>     and https://issues.jboss.org/browse/AS7-1371 and struggling with a
>>     design issue. What I need to solve is that you are able to setup a
>>     connection pool for database authentication, and I was told that I
>>     could not depend on the JBOSS subsystem when running in domain mode.
>>
>>     So I basic need some functionality to handle a database connection
>>     pool, I can see 3 options but I don't know what is the best
>>     approach and what the guidelines are
>>
>>     1. Reuse some existing code in the project, I don't if it possible
>>     to take advantage of existing code for maintaining a database
>>     connection pool?
>>     2. Use an existing 3 party lib, that will provide this
>>     functionality. I don't what are the common guidelines for adding
>>     new 3 party libs to the project?.
>>     3. Write my own simple connection pool manager.
>>
>>     I was started on no. 3 and don't think it will be a huge task.
>>
>>     What do you think, does it make sense?
>>
>>     br
>>     Flemming
>>
>>     _______________________________________________
>>     jboss-as7-dev mailing list
>>     [hidden email] <mailto:[hidden email]>
>>     https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
>
>
>
> _______________________________________________
> jboss-as7-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>


_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev