You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by cablepuff <ca...@gmail.com> on 2011/03/27 17:54:09 UTC

Re: tapestry-spring: injecting with multiple implementation.

Well its ugly but i have to get around it by manual loading the JNDI data
source. 


         private static DataSource getJndiDataSource() {
		DataSource dataSource = null;
		final String datasourceContext = "java:comp/env/jdbc/DS"
		try {
			final Context initialContext = new InitialContext();
			dataSource = (DataSource) initialContext.lookup(datasourceContext);
		} catch (final NamingException namingException) {
			AppModule.LOG.error("can't get data source", namingException);
		}
		return dataSource;
	}

--
View this message in context: http://tapestry.1045711.n5.nabble.com/tapestry-spring-injecting-with-multiple-implementation-tp3318764p4266441.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org