X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3023252801 for ; Wed, 27 Jul 2005 19:37:55 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 95061-09 for ; Wed, 27 Jul 2005 22:37:45 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 35FFB52C3A for ; Wed, 27 Jul 2005 19:37:45 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1DxuX5-0002By-Ib; Thu, 28 Jul 2005 10:37:47 +1200 Message-ID: <42E80CBB.1030006@opencloud.com> Date: Thu, 28 Jul 2005 10:37:47 +1200 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050324) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Vadim Nasardinov Cc: pgsql-jdbc@postgresql.org Subject: Re: jdbc xa patches References: <20050726193540.M74424@yvyyl> <20050726225605.T74424@yvyyl> <42E70E8E.9010408@opencloud.com> <200507271104.19933.vadimn@redhat.com> In-Reply-To: <200507271104.19933.vadimn@redhat.com> X-Enigmail-Version: 0.90.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.009 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/378 X-Sequence-Number: 13526 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