Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DB Connection Exception in Multithreaded code

 
Roshini Sridharan
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

There's a multithreaded code that creates N no. of threads, each thread creates a new DB Connection instance to connect to a DB using JDBC. So there are N no. of individual connections to the database created by each thread. In this context find that when one of thread is being created and it tries to get the DB Connection the below Exception is being throwed.

As per the exception, find its relevant to the JDBC URL formation. Please note the method that obtains the DB Connection is a synchronized one.



Would like to know the possible cause for this and the possble solution like implementing colleection pooling would help.

Thanks in advance.

Regards
Roshini
 
Ammar Shah
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Reasons for "invalid arguments in call" usually are around invalid
configuration (URL, user/pwd).
 
Roshini Sridharan
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can someone provide me some insight into this issue.

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic