Subject RE: [Firebird-Java] Re: To Ryan
Author Ryan Baldwin
Hi Roman,

This all looks great to me.(-:

>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.

I would tend to preffer an exception - if this were acceptable for the
'scripted' usages of the methods.

Thanks
Ryan

-----Original Message-----
From: Roman Rokytskyy [mailto:rrokytskyy@...]
Sent: 20 August 2003 12:45
To: Firebird-Java@yahoogroups.com
Subject: [Firebird-Java] Re: To Ryan


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?



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/