Iv�n:
Ok, so it's late in the day and maybe that's why I can't get why you want to do
it this way.. (is there some reason why you can't move the initialization of the
pool to the LoginHanlder servlet class??).. but if you *have* to initialize in
your execSQL class, you could concievably do it this way:
Declare the pool in the LoginHandler class, and in the execSQL constructor,
initialise it. *Except* just add the following logic:
if (LoginHandler.pool == null) {
//go ahead and initialise the pool
}
else {
//don't touch the pool object - sombody already initialized it
}
So basically the first guy who creates an execSQL object would be in charge of
creating the pool. (I haven't tried this, by the way.) Again, i don't see why
anybody would want to do it this way - seems sort of backwards.. But doubtless
you have your reasons..:)
Regards,
Geeta
Iv�n Escobedo wrote:
> Geeta, thanks for replying, now i have a question, i want to use a method
> where i can encapsulate all the process like this:
>
> LoginHandler.class
> ...
> execSQL SQLObject = new execSQL()
> SQLObject.execUpdate(Query)
> ...
>
> and in execSQL.class is all the instructions to instantiate the pool, but...
> execSQL is not a servlet, so, it does not have an init method.
>
> What do I have to do so i can use execSQL as a bridge?
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html