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 E447A5389E for ; Sun, 3 Apr 2005 10:33:24 +0100 (BST) 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 10630-08 for ; Sun, 3 Apr 2005 09:33:16 +0000 (GMT) Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by svr1.postgresql.org (Postfix) with ESMTP id 372DB5385B for ; Sun, 3 Apr 2005 10:33:13 +0100 (BST) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 3E67D30952; Sun, 3 Apr 2005 11:33:04 +0200 (MET DST) From: "Nico" X-Newsgroups: pgsql.interfaces.jdbc Subject: DataSource lookup Date: Sun, 3 Apr 2005 11:33:03 +0200 Organization: Hub.Org Networking Services Lines: 18 Message-ID: X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-RFC2646: Format=Flowed; Original To: pgsql-jdbc@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=3.359 tagged_above=0 required=5 tests=FORGED_YAHOO_RCVD, PRIORITY_NO_NAME X-Spam-Level: *** X-Archive-Number: 200504/6 X-Sequence-Number: 12613 How do I find out what's the name of the JNDI data source I need for a PostgreSQL connection pool? Currently I do this, javax.naming.Context env=(javax.naming.Context) new javax.naming.InitialContext().lookup("java:comp/env"); pool=(DataSource)env.lookup("jdbc/"+dbname); connection=pool.getConnection("username","password"); but then I get a MySQL connection(MySQL & PostgreSQL run both on server). I only have permission to my personal account, not the shared directories where I think the jndi resources are located. In my web.xml are no resources defined. Kind regards, Nico.