Subject Re: To Ryan
Author Roman Rokytskyy
Ryan,

> Breifly my reasoning here was just that I wanted to avoid causing
> the user to have to import from the gds interface package. For
> example - FBManager is as far as I'm aware an API class - that is
> the user may import and reference this class from there application.
> If a GDSType class in the gds package where used everywhere then if
> the user wanted to set the driver type for FBManager they would have
> to reference a class from the gds package - which perhaps they
> should remain unaware of.

My idea is to have single class with static factory method that is
able to convert string representation into GDSType instance. In many
places it makes sense to have the possibility to specify type of the
driver as string (FBWrappingDataSource, FBConnectionPoolDataSource,
FBManager, etc.) because type of the driver will be specified either
in configuration or in HTML form (JMX access to FBManagerMBean).

So, my idea is that GDSType is the only type-safe enumeration class
that is referenced in the code and we standardize string
representation (case insensitive) for each type. My proposal is:

- "PURE_JAVA" and "TYPE4" for type 4 driver;
- "NATIVE" and "TYPE2" for type 2 driver;
- "EMBEDDED" for type 2 with embedded engine.

All "public" (i.e. classes that are supposed to be used by users) will
have method

public void setType(String type) {
...
}

We have to decide if we throw SQLException if type is not known or we
default to type 4 and add a warning to the connection.

What do you think?

Roman

P.S. Did you receive yesterday my email from Yahoo account?