On 18/11/2010 17:02, Rob Gregory wrote: > Awww... Is there going to be a replacement for the ServerFactory?
You need to get a reference to a Container (Context/Host/Engine) and then navigate Context->Host->Engine->Service->Server How you get the reference depends on where you start from. > Also what sort out timescales are you looking at before a production release > of Tomcat 7 is available? http://markmail.org/message/7nwn6v22hcyikuob So far, 7.0.4 has gone fairly well. There hasn't yet been anything that has really worried me. If things go to plan, there should be a 7.0.5 fairly soon. Mark > > Thanks Again. > Rob > > >> -----Original Message----- >> From: Mark Thomas [mailto:ma...@apache.org] >> Sent: 18 November 2010 16:59 >> To: Tomcat Users List >> Subject: Re: Dynamic GlobalNamingResources / Shared JDBC connection pools >> >> On 18/11/2010 16:54, Rob Gregory wrote: >>> Spot on Mark. >>> >>> I have been googling and playing around for over a day on this, Following >> your suggestion it boils down to a couple of lines of code:- >>> >>> StandardServer server = (StandardServer) ServerFactory.getServer(); >>> Context context = server.getGlobalNamingContext(); >>> context.bind(dataSourceName, datasource); >>> >>> Thanks again for the push in the right direction. >> >> No problem. Just be aware ServerFactory is gone in 7.0.x. >> >> Mark >> >>> >>> Rob >>> >>> >>>> -----Original Message----- >>>> From: Mark Thomas [mailto:ma...@apache.org] >>>> Sent: 18 November 2010 10:30 >>>> To: Tomcat Users List >>>> Subject: Re: Dynamic GlobalNamingResources / Shared JDBC connection pools >>>> >>>> On 18/11/2010 09:34, Rob Gregory wrote: >>>>> Thanks Chris, >>>>> >>>>> After messing around with JNDI yesterday I came to the same conclusion >> that >>>> Tomcat is doing some isolation >>>> >>>> Random thoughts that may or may not help. >>>> >>>> If you look in the DataSourceRealm you will see some code that lets a >>>> web-app use a DataSource from either webapp JNDI or global JNDI. That >>>> might give you some pointers. >>>> >>>> Also, I'm pretty sure there is some write protection applied to the >>>> global JNDI somewhere. That might also get in your way. >>>> >>>> Mark >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>>> For additional commands, e-mail: users-h...@tomcat.apache.org >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org