Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 1914 invoked from network); 14 Sep 2009 08:48:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Sep 2009 08:48:44 -0000 Received: (qmail 13051 invoked by uid 500); 14 Sep 2009 08:48:43 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 12974 invoked by uid 500); 14 Sep 2009 08:48:43 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 12963 invoked by uid 99); 14 Sep 2009 08:48:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Sep 2009 08:48:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Sep 2009 08:48:40 +0000 Received: by brutus.apache.org (Postfix, from userid 33) id 88802234C045; Mon, 14 Sep 2009 01:48:18 -0700 (PDT) From: bugzilla@apache.org To: dev@tomcat.apache.org Subject: DO NOT REPLY [Bug 47832] New: Custom resource factory placement X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Tomcat 6 X-Bugzilla-Component: Catalina X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kvasiliev@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@tomcat.apache.org X-Bugzilla-Target-Milestone: default X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Mon, 14 Sep 2009 01:48:18 -0700 (PDT) X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/bugzilla/show_bug.cgi?id=47832 Summary: Custom resource factory placement Product: Tomcat 6 Version: 6.0.20 Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: kvasiliev@gmail.com In the documentation about custom resource factories (http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html) I read following: You will need to compile this class against a class path that includes all of the JAR files in the $CATALINA_HOME/lib directory. When you are through, place the factory class (and the corresponding bean class) unpacked under $CATALINA_HOME/lib, or in a JAR file inside $CATALINA_HOME/lib. In this way, the required class files are visible to both Catalina internal resources and your web application. Does it mean that I must ALWAYS put it in common, or I must put it in common if I want it to be visible to Tomcat? Can I put custom factory to WEB-INF/lib of my application if I don't want it to be visible to Tomcat? Actually we have a custom factory that derive from org.apache.tomcat.dbcp.dbcp. BasicDataSourceFactory. We have it inside our war, we're plug it in inside application's context.xml as Factory just searching for properties.file and if it is found, it's props will be used to create datasource, otherwise props from context.xml will be used. When we're trying to get jdbc/db by calling DataSource dataSource = ( DataSource )( new InitialContext () ).lookup( "java:/comp/env/jdbc/db" ); our FactoryClass is actually called instead. So it is works this way, but I still don't understand is it proper way or not. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org