Jump to content

Thread-safe connections?


Recommended Posts

By: Dave Cherkassky - dcherk

Thread-safe connections?

2006-03-17 15:06

We are trying to run a subreport within a report. However we are getting an exception thrown from the subreport code because it is trying to use the same java.sql.Connection as was passed into the report. Apparently the subreport is running on a different thread. Our implementation of java.sql.Connection detects that it is being used by 2 threads at the same time and throws an IllegalStateException.

 

Questions:

- do we have to have threadsafe Connection objects to run subreports?

- what if the Connection is closed by the calling thread before the subreport is finished? Does the calling thread wait for all subreport threads?

- does each subreport have it's own thread and do they run in parallel?

- I assume that if Jasper Reports is using multiple threads it is doing thread pooling? How do we configure the pool?

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...