Subject Thread safe datasource as a Tomcat global resource
Author Juan Pedro López

In case I define a global resource in Tomcat 6 to access the same
Firebird database through JNDI, I have two main options:

- Use FBDriver through DBCP
- Use Jaybird's built-in pooling classes like FBWrapingDatasource.

Anyway, I will get the same datasource object in every web application
under my Tomcat instance.

My question is: are both options thread safe?

I mean, is Datasource.getConnection() call thread safe in both cases?

If both options are right, what's the best choice from a general point
of view?

I am using Jaybird 2.1.1.

Thank you very much,

Juan Pedro López