Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 604209FBB53 for ; Fri, 20 Apr 2007 18:17:20 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 85781-05 for ; Fri, 20 Apr 2007 18:17:12 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by postgresql.org (Postfix) with ESMTP id 2F7A89FBB46 for ; Fri, 20 Apr 2007 18:17:15 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id k3so800036ugf for ; Fri, 20 Apr 2007 14:17:13 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=OQy/RoHONtpPB25fOl1eOMAvUUq10TYUDhRcwfCc7iIx0I6XEpG+TUcwqMbiFQBpoGiZ471i37oIM8mfzD8EAl0l4FeQmEhk0pdLMzDJj7OZeXLVCZzioTTEkhUM1lJGyNYaSvuWThaxYgm3mU7sXUmkp4uYdxJoarvbBKhzfmM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=hcWi5YO7fKYltTScdZOp+ac69RmZZQAw5R5j9OEIVWDr5TP+Xnr9F6MkHSxju2DSHvmS0uB38vDOM13kXZbpt9rWchy1zG0EsUWVXRvaQy4ECR3qi5F8yzGCI+PhpxKJZrEIiBBqJfAnyN97CUaeLpD12yqxz4STzOjp84ZLAso= Received: by 10.82.134.12 with SMTP id h12mr5344545bud.1177103833493; Fri, 20 Apr 2007 14:17:13 -0700 (PDT) Received: from ?192.168.1.34? ( [82.20.19.199]) by mx.google.com with ESMTP id b30sm473670ika.2007.04.20.14.17.09; Fri, 20 Apr 2007 14:17:10 -0700 (PDT) Message-ID: <46292DCB.1010202@enterprisedb.com> Date: Fri, 20 Apr 2007 22:16:59 +0100 From: Heikki Linnakangas User-Agent: Icedove 1.5.0.8 (X11/20061116) MIME-Version: 1.0 To: Bill Middleton CC: books@ejurka.com, pgsql-jdbc@postgresql.org Subject: Re: PGXADataSource does not implement DataSource References: <4efe54510704201300i4636c611r88dbb48c96be7270@mail.gmail.com> <4629234B.8050507@enterprisedb.com> <4efe54510704201356i7f5c1d51i9b73b2e186c81b31@mail.gmail.com> In-Reply-To: <4efe54510704201356i7f5c1d51i9b73b2e186c81b31@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/83 X-Sequence-Number: 16932 Bill Middleton wrote: > Hello again, and thanks for the feedback. Yes, I'm likely in way over my > head here. However, things are working acceptably with minimal testing so > far. I register my modified PGXA as the resource in a > UserTransactionService and then pass it into hibernate via jndi lookup, > along with a transactionmanager. The interesting bits of > hibernate.cfg.xmlare then: > > > org.hibernate.dialect.PostgreSQLDialect > java:comp:myDS > > org.hibernate.transaction.JTATransactionFactory > > Hibernate accesses the DS in > org.hibernate.connection.DataSourceConnectionProvider > > I'm using the atomikos TM, and sharing the DS between hibernate and a > (also > slightly modified) up jboss cache. I'm not an expert on hibernate or atomikos, but I don't think hibernate should ever see the raw PGXADataSource object. Whatever is handling the connection pool, either Atomikos or JBoss, should get a connection from the XADataSource object, and wrap that in a DataSource implementation of it's own. That wrapper object is registered in JNDI, and hibernate gets it from there. Where is the connection pool configured? What's in the jboss cache and how is it modified? -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com