Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 33053 invoked from network); 18 Mar 2006 23:24:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Mar 2006 23:24:33 -0000 Received: (qmail 58852 invoked by uid 500); 18 Mar 2006 23:24:33 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 58389 invoked by uid 500); 18 Mar 2006 23:24:30 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 58377 invoked by uid 99); 18 Mar 2006 23:24:30 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Mar 2006 15:24:30 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [211.29.132.182] (HELO mail01.syd.optusnet.com.au) (211.29.132.182) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Mar 2006 15:24:29 -0800 Received: from [127.0.0.1] (d220-236-87-93.dsl.nsw.optusnet.com.au [220.236.87.93]) (authenticated sender gianny.damour) by mail01.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k2INO14h032527 for ; Sun, 19 Mar 2006 10:24:07 +1100 Message-ID: <441C9691.8050906@optusnet.com.au> Date: Sun, 19 Mar 2006 10:24:01 +1100 From: Gianny Damour User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: user@geronimo.apache.org Subject: Re: Help with CMP Entity Bean References: <124d285e0603171212u5a366ceai810193c007443002@mail.gmail.com> In-Reply-To: <124d285e0603171212u5a366ceai810193c007443002@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Olivier Voutat wrote: > Well, > > I'm trying to create a simple application with a Cmp Entity Bean but > I'm missing how I should do the Database connection tags. My database > pool is already deployed and working. Here are my ejb-jar.xml and > openejb-jar.xml : > > > xmlns="http://java.sun.com/xml/ns/j2ee > " > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee > > http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"> > ProdutoCmp > <...> > > xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.0" xmlns:pkgen=" > http://www.openejb.org/xml/ns/pkgen-2.0" > xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1" xmlns:sys=" > http://geronimo.apache.org/xml/ns/deployment-1.0" > configId="ProdutoCmp/ProdutoCmp"> > > ProdutoCmp > If the database pool is already deployed, i.e. not deployed at the same time than your EJB module within an EAR, then you cannot use the resource-link tag. This tag allows you to point to a connectiondefinition-instance defined in the same EAR module than your EJB moduler (this is more or less like the ejb-link mechanism). In your case, you need to use a http://geronimo.apache.org/xml/ns/naming-1.0:objectNameGroup (have a look to geronimo-naming-1.0.xsd for more details). I think that you want something like this: . Thanks, Gianny