Subject | Proposal for FBDriver modification |
---|---|
Author | wegorkie |
Post date | 2004-09-19T06:04:39Z |
I have one idea related to problems I was writing of lately.
It would be easy to solve problems with Connection's configurations as
soon as it would be easy to plug in own Connections implementations
into the driver.
What do you think of modifing FBDriver.java in such a manner:
This code:
public Connection connect(String url, Properties info)
throws SQLException
{
(...)
FBManagedConnectionFactory mcf = new FBManagedConnectionFactory(type);
(...)
}
replace with something like this:
public Connection connect(String url, Properties info)
throws SQLException
{
(...)
FBManagedConnectionFactory mcf=getManagedConnectionFactory(type);
(...)
}
protected FBManagedConnectionFactory getManagedConnectionFactory(...)
{
return new FBManagedConnectionFactory(type);
}
That way it would be possible to inherit driver and replace connection
factory with own one.
Is it good idea, what do you think?
Maciek
It would be easy to solve problems with Connection's configurations as
soon as it would be easy to plug in own Connections implementations
into the driver.
What do you think of modifing FBDriver.java in such a manner:
This code:
public Connection connect(String url, Properties info)
throws SQLException
{
(...)
FBManagedConnectionFactory mcf = new FBManagedConnectionFactory(type);
(...)
}
replace with something like this:
public Connection connect(String url, Properties info)
throws SQLException
{
(...)
FBManagedConnectionFactory mcf=getManagedConnectionFactory(type);
(...)
}
protected FBManagedConnectionFactory getManagedConnectionFactory(...)
{
return new FBManagedConnectionFactory(type);
}
That way it would be possible to inherit driver and replace connection
factory with own one.
Is it good idea, what do you think?
Maciek