Subject | Re: [Firebird-Java] Re: ConnectionPoolDataSource... |
---|---|
Author | Mandip S. Sangha |
Post date | 2002-09-20T12:54:15Z |
Hi Roman
I have a framework that uses javax.sql.DataSource objects for getting
connections to a database. An implementation
javax.sql.ConnectionPoolDataSource interface is also provided with the
framework. I was looking into using this class to create and maintain a
connection pool. Without pooling I guess I would be using the
FBSimpleDataSource class to pass DataSource objects to the framework.
Inorder to use the pooling I would have to create an instance
of ConnectionPoolDataSource class, set my particular database properties
and register it with JNDI. Then for a DataSource object to use this
pooling facility, I would have to use the setDataSourceName() method to
inform the DataSource object of the whereabouts of the
ConnectionPoolDataSource object registered with JNDI. The DataSource
object is itself registered with JNDI and whenever a lookup on the
DataSource is performed the resulting DataSource object will retrieve
connections from the ConnectionPoolDataSource object. Thus making the
connection pooling transparent. However, now that you mentioned the
FBWrappingDataSource class I think all the above discussion is probably
irrelevant since I think this class will have the same effect. Is this
true????
Regards
Mandip
Roman Rokytskyy wrote:
I have a framework that uses javax.sql.DataSource objects for getting
connections to a database. An implementation
javax.sql.ConnectionPoolDataSource interface is also provided with the
framework. I was looking into using this class to create and maintain a
connection pool. Without pooling I guess I would be using the
FBSimpleDataSource class to pass DataSource objects to the framework.
Inorder to use the pooling I would have to create an instance
of ConnectionPoolDataSource class, set my particular database properties
and register it with JNDI. Then for a DataSource object to use this
pooling facility, I would have to use the setDataSourceName() method to
inform the DataSource object of the whereabouts of the
ConnectionPoolDataSource object registered with JNDI. The DataSource
object is itself registered with JNDI and whenever a lookup on the
DataSource is performed the resulting DataSource object will retrieve
connections from the ConnectionPoolDataSource object. Thus making the
connection pooling transparent. However, now that you mentioned the
FBWrappingDataSource class I think all the above discussion is probably
irrelevant since I think this class will have the same effect. Is this
true????
Regards
Mandip
Roman Rokytskyy wrote:
>Hi,
>
>
>
>>Can anyone tell me if there is a class somewhere in the driver that
>>implements the DataSource interface and the setDataSourceName
>>(String name) method????
>>
>>
>
>there are:
>
>org.firebirdsql.jdbc.FBSimpleDataSource - simple implementation with
>no connection pooling
>
>org.firebirdsql.jdbc.FBWrappingDataSource - DataSource implementation
>with built-in connection pooling.
>
>However, none of them have setDataSourceName(String) method. What it
>is supposed to do?
>
>Best regards,
>Roman Rokytskyy
>
>
>
>To unsubscribe from this group, send an email to:
>Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>