Subject Re: [Firebird-Java] connect would work better
Author Mark Rotteveel
On 22-10-2010 11:44, jnm53 wrote:
> My curent question is intern in Jaybird as following:
>
>
> Code :
>
> public FBManagedConnectionFactory(GDSType gdsType, FBConnectionProperties connectionProperties) {
> this.defaultCm = new FBStandAloneConnectionManager();
> this.connectionProperties = connectionProperties;
> IF( gdsType != NULL)
> setType(gdsType.toString());
> }
>
> The variable gdsType is in this methode set to null; I protected the instruction setType( gdsType.toSting()); while testing the null valeur of this varaible
> using the methode

Why are you changing the internals of Jaybird without clear
understanding of its inner workings?

>
> Code :
>
> public static GDSType getDefaultGDSType() {
> RETURN defaultType;
> }

RETURN, IF, NULL are not valid Java, what language are you using?

>
> As the defaultType is null.

The defaultType is normally not null, it is set to the first plugin
loaded when GDSFactory is loaded by the classloader (normally the
pure-Java plugin IIRC).

> My questions are as following:
> gdsType == null is normal?
> else which is the value to set to the defaultType;
> ans morevover what would be the cause for these data if they are abnormals.
> Moreover I need two datas to be intitialized and how to do to initialize them.
> I need the GdsType defaults.

It is set when the driver is loaded. Please explain clearly when this
error occurs?

> this variable is stratégic in connecting. I tried various approach to connect the database ans each time i got this variable.
> I have still asked to be subscribed on the Jaybird user group and I have no acknoledgement from this team up to now.

I am not sure what you are saying here.

> I founded two variables that should be initialized and that are not...
>
> Code :
>
> IF (gdsType == NULL) gdsType = defaultType;
>
> GDSFactoryPlugin gdsPlugin = (GDSFactoryPlugin) typeToPluginMap
> .get(gdsType);
>
> IF (gdsPlugin == NULL)
> throw new IllegalArgumentException("Specified GDS type " + gdsType
> + " is unknown.");
>
> RETURN gdsPlugin.getGDS();
>
> Thats defaultType and typeToPluginMap.
> how is it possible to get some information related to the gdsType defaults?

If they are not initialized, then you are most likely not using Jaybird
correctly. Please describe the actual problem you are having, not what
you think is causing it.

Please provide a SSCE (see http://sscce.org/ ) and say which exact
version of Jaybird you are using, and the problem you are experiencing,
so that we can try to reproduce it.

Mark

--
Mark Rotteveel