dcsimg
Dynamic creation of arrays of objects implementing Runnable
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Erik_Yuzwa
Posted On:   Friday, May 31, 2002 12:11 PM

Okay this is a ridiculous question, but I'm still puzzled of what's going on. I'm creating a small ConnectionPool which just does the standard thing of holding a pool of connections to the db, and the class implements the Runnable interface. What I'm trying to do, is to dynamically create an array of these ConnectionPool objects, so that I can create seperate pools for each of our databases. Sounds simple, but everytime I try to initialize each ConnectionPool, I get a NullPointerException. If I create the ConnectionPool by itself (ie. without putting it into an array), it works just fine. Can anyone point me in the right direction? What's going on? thanks in advance..    More>>

Okay this is a ridiculous question, but I'm still puzzled of what's going on. I'm creating a small ConnectionPool which just does the standard thing of holding a pool of connections to the db, and the class implements the Runnable interface.



What I'm trying to do, is to dynamically create an array of these ConnectionPool objects, so that I can create seperate pools for each of our databases. Sounds simple, but everytime I try to initialize each ConnectionPool, I get a NullPointerException. If I create the ConnectionPool by itself (ie. without putting it into an array), it works just fine.



Can anyone point me in the right direction? What's going on?

thanks in advance..

   <<Less

Re: Dynamic creation of arrays of objects implementing Runnable

Posted By:   Les_Jones  
Posted On:   Wednesday, June 5, 2002 05:11 AM

Difficult to tell from the info given. Create a small sample and post some of the code.

(Don't forget to include code withing
 and 
tags.)
About | Sitemap | Contact