Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 78201 invoked from network); 29 Nov 2004 14:55:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 29 Nov 2004 14:55:16 -0000 Received: (qmail 59074 invoked by uid 500); 29 Nov 2004 14:54:38 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 59048 invoked by uid 500); 29 Nov 2004 14:54:38 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 59031 invoked by uid 99); 29 Nov 2004 14:54:38 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=HTML_60_70,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from beaubourg.smartjog.net (HELO mx.beaubourg.smartjog.net) (212.180.104.242) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 29 Nov 2004 06:54:37 -0800 Received: from localhost (localhost [127.0.0.1]) by mx.beaubourg.smartjog.net (Postfix) with ESMTP id 0B6DDC021; Mon, 29 Nov 2004 15:54:35 +0100 (CET) Received: from mx.beaubourg.smartjog.net ([127.0.0.1]) by localhost (mail [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07684-03-6; Mon, 29 Nov 2004 15:54:31 +0100 (CET) Received: from aborgolt (aborgolt.beaubourg.smartjog.lan [192.168.0.63]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mx.beaubourg.smartjog.net (Postfix) with SMTP id 913E9C049; Mon, 29 Nov 2004 15:54:28 +0100 (CET) Message-ID: <018501c4d623$fccab900$3f00a8c0@aborgolt> From: "Alexandre Borgoltz" To: Subject: Fw: [tomcat 5.5] Reference a JNDI env resource from another env-resource Date: Mon, 29 Nov 2004 15:59:12 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0182_01C4D62C.5E775340" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Virus-Scanned: by amavisd-new-20030616-p9 (Debian) at smartjog.com X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------=_NextPart_000_0182_01C4D62C.5E775340 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi,=20 I have developed my own BeanFactory as explained in your = JNDI-RESOURCE-HOWTO. Everything works fine and I can use the corresponding factory = successfully.=20 But when I try to upgrade it a bit, I'm facing a problem: I'd like my factory to access a database to update the bean it returns. = So I'd like it to use the datasource I've also configured in server.xml: To be more precise, I've also added the = following ResourceLink in my declaration: =20 When I try to lookup and use one of these resources directly from the = webapps, it just works great. But if I try to modify my custom factory = to make it lookup the datasource, it gets a NamingException (Comp is not = linked to the initial context).=20 I suppose this means the initial context is created after the resources = are created. Is there a way to have my custom resource reference another = resource (in this case, the datasource)? Then is there a way to specify = the order of loading for resources? (Here I'll need the datasource to be = loaded BEFORE the custom factory...) I thank you in advance, Alexandre BORGOLTZ Head of Technology SmartJog SA Phone: +33 (0)1 4996 6324=20 Fax: +33 (0)1 4996 6405 Mobile: +33 (0)6 8882 1417 alexandre.borgoltz@smartjog.com ------=_NextPart_000_0182_01C4D62C.5E775340--