Re: How can code in a Realm gain access to a Globally Named Resource

2014-11-26 Thread Konstantin Kolinko
2014-11-27 0:26 GMT+03:00 : > > Initially I had difficulty with getServer() giving me null. > To fix it I stopped calling this method from within the Realm's constructor, > instead I get the DataSource the first time it's needed. Learn about org.apache.catalina.Lifecycle interface that is impleme

RE: How can code in a Realm gain access to a Globally Named Resource

2014-11-26 Thread vince.webb
;ve written of this Realm. The first extended JDBCRealm, another extends DataSourceRealm, they both work but not 100% of the time. > -Original Message- > From: Mark Thomas [mailto:ma...@apache.org] > Sent: 26 November 2014 17:01 > To: Tomcat Users List > Subject: Re: How

Re: How can code in a Realm gain access to a Globally Named Resource

2014-11-26 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 11/26/14 12:01 PM, Mark Thomas wrote: > On 26/11/2014 16:23, Christopher Schultz wrote: > > > >> I'm not sure, but I would guess you can't define a Realm in >> server.xml and use a DataSource defined in context.xml. If the >> Realm is

Re: How can code in a Realm gain access to a Globally Named Resource

2014-11-26 Thread Mark Thomas
On 26/11/2014 16:23, Christopher Schultz wrote: > I'm not sure, but I would guess you can't define a Realm in server.xml > and use a DataSource defined in context.xml. If the Realm is in > server.xml, then you should be able to grab the globally-accessible > DataSources by using their existing (

Re: How can code in a Realm gain access to a Globally Named Resource

2014-11-26 Thread Christopher Schultz
How can code in a Realm >> gain access to a Globally Named Resource >> > Vince, > > On 11/25/14 9:00 PM, vince.w...@thomsonreuters.com wrote: >>>> Web applications gain access to Globally Named JDBC >>>> Resources by adding a >>>> to contex

RE: How can code in a Realm gain access to a Globally Named Resource

2014-11-26 Thread vince.webb
Chris, thank you for your reply > -Original Message- > From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Sent: 26 November 2014 04:17 > To: Tomcat Users List > Subject: Re: How can code in a Realm gain access to a Globally Named > Resource > &g

Re: How can code in a Realm gain access to a Globally Named Resource

2014-11-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Vince, On 11/25/14 9:00 PM, vince.w...@thomsonreuters.com wrote: > Web applications gain access to Globally Named JDBC Resources > by adding a to context.xml > > Then using code like: > > Context initContext = new InitialContext(); dbLookupStr