Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 94725 invoked from network); 19 Jun 2003 05:01:28 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 19 Jun 2003 05:01:28 -0000 Received: (qmail 11031 invoked by uid 97); 19 Jun 2003 05:03:57 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 11024 invoked from network); 19 Jun 2003 05:03:57 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 19 Jun 2003 05:03:57 -0000 Received: (qmail 93281 invoked by uid 500); 19 Jun 2003 05:01:15 -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 93266 invoked from network); 19 Jun 2003 05:01:15 -0000 Received: from main.gmane.org (80.91.224.249) by daedalus.apache.org with SMTP; 19 Jun 2003 05:01:15 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19SrXc-0002LX-00 for ; Thu, 19 Jun 2003 07:00:56 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: tomcat-user@jakarta.apache.org Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19SrX7-0002Jy-00 for ; Thu, 19 Jun 2003 07:00:25 +0200 From: "Bill Barker" Subject: Re: Can I set up 2 realms for the same server so I can access 2 databases Date: Wed, 18 Jun 2003 22:10:12 -0700 Lines: 60 Message-ID: References: <24A8596C44DF4F4DA442CBE269C351BDBADFF4@wbmail.guidestar.net> X-Complaints-To: usenet@main.gmane.org X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: news X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Actually Angus' comment isn't really true. You just configure a seperate Realm under each of your s, and Tomcat should do exactly what you want. "Angus Mezick" wrote in message news:24A8596C44DF4F4DA442CBE269C351BDBADFF4@wbmail.guidestar.net... According to the spec, you can have 0 or 1 realms configured. Now, if you want to rewrite the code that uses the realms for logging people in I think you can use 2 DB's. > -----Original Message----- > From: Val T. [mailto:vtobin@realityclick.com] > Sent: Wednesday, June 18, 2003 2:40 PM > To: Tomcat Users List > Subject: Can I set up 2 realms for the same server so I can > access 2 databases > > > Hi, > > I've got two sites set up on one server, and I am trying to > set up security > for each of them. They use 2 different databases. Is it > possible to set > things up in the server.xml the way I have below, or do I > have to put all > users in the same database? I can't find anything on the Web > that deals > with this issue. > > className="org.apache.catalina.realm.JDBCRealm" > userTable="tblUSERS" debug="99" > userRoleTable="tblUSERROLES" userNameCol="Username" > > connectionURL="jdbc:mysql://localhost/DB1?user=MyName&pass > word=MyPW" > driverName="com.mysql.jdbc.Driver" /> > > className="org.apache.catalina.realm.JDBCRealm" > userTable="tblUSERS" debug="99" > userRoleTable="tblUSERROLES" userNameCol="Username" > > connectionURL="jdbc:mysql://localhost/DB2?user=MyName&pass > word=MyPW" > driverName="com.mysql.jdbc.Driver" /> > > Thank you for any help. > > Val > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org