You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by hese <10...@gmail.com> on 2012/02/21 17:17:00 UTC
Error @Injecting Spring Datasource when there are more than one
Datasources
I am using tapestry spring integration. I have three datasources defined in
my spring application context. When I try to inject one of them I get an
error
"Service interface javax.sql.DataSource is matched by 3 services:
dataSourceAnalytics, dataSourceFirewall, dataSourceUser. Automatic
dependency resolution requires that exactly one service implement the
interface."
java -
@Inject
private DataSource dataSourceFirewall;
What is the syntax for asking tapestry to inject a particular datasource?
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Error-Injecting-Spring-Datasource-when-there-are-more-than-one-Datasources-tp5502662p5502662.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
Re: Error @Injecting Spring Datasource when there are more than one
Datasources
Posted by hese <10...@gmail.com>.
ok got the answer from here -
http://tapestry.apache.org/injection.html
@Inject
@Service("dataSourceFirewall")
private DataSource dataSourceFirewall;
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Error-Injecting-Spring-Datasource-when-there-are-more-than-one-Datasources-tp5502662p5502687.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