Re: jdbc xa patches

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Vadim Nasardinov <vadimn(at)redhat(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: jdbc xa patches
Date: 2005-07-27 22:37:47
Message-ID: 42E80CBB.1030006@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Vadim Nasardinov wrote:
> On Wednesday 27 July 2005 00:33, Oliver Jowett wrote:
>
>>>>Having ResourceAssociationState as a full-blown class seems like
>>>>overkill since you only have one instance anyway.
>>>
>>>Maybe. Java 1.4 doesn't have enums. What do you suggest as an
>>>alternative?
>>
>>Just a bare int?
>
>
> Java 1.4's typesafe enum pattern doesn't usually strike me as an
> overkill, as long as you're aware of its problems:
>
> http://www.google.com/search?q=Java+typesafe+enum

Shrug, the main reason for an enum-like pattern is to get type safety,
but in this case there's only one field that ever uses the enum (and
it's never passed around as a parameter), so there's not much scope for
getting it wrong.

-O

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2005-07-27 22:47:16 Re: smallint mapping issue
Previous Message Oliver Jowett 2005-07-27 22:35:05 Re: JDBC JAR Problem