commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "apachep2" <apach...@hotmail.com>
Subject RE: Newbie question
Date Tue, 04 Mar 2003 16:13:17 GMT
Use a Singleton to initialize a new pool and return a connection from
the pool.

-----Original Message-----
From: Stefan Smeets [mailto:stefan@staf.pi.be] 
Sent: March 4, 2003 10:53 AM
To: Jakarta Commons Users List
Subject: Re: Newbie question

hi again,

What I want is a class that has 2 functions.

1 to initialize a new pool for a new database (arguments : url , un, pw
,
identifier)
1 to get a connection (arguments : idenfifier).

eg

pool.init("jdbc:....." , "scott" , "tiger" , "customerdb");
pool.getConnection("customerdb");

The idea is that you configure the pool and all classes in my
application
can use it just by calling the static function getConnection...

That's about the idea ... just simplify the interface for creating
connections (isn't that a Facade )

thx

stef




----- Original Message -----
From: "Kenny Smith" <tomcat-user@journalscape.com>
To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
Sent: Tuesday, March 04, 2003 4:23 PM
Subject: Re: Newbie question


> Hi Stefan,
>
> I'm actually not sure what you mean by a "facade?" I mean.. I know the
> word, just not how you are using it in relation to DBCP.
>
> Kenny
>
> Stefan Smeets wrote:
> > Hi,
> >
> > I was looking at DBCP and it seems that it's what I am looking for..
.the only problem is that the documentation is a bit cryptic. Has anyone
got
better info or an example on how to implement a "facade" using dbcp
classes.
> >
> > Thanx a lot
> >
> > stefan smeets
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


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

Mime
View raw message