You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by bu...@apache.org on 2005/10/06 23:37:14 UTC
DO NOT REPLY [Bug 28611] -
Create a DataSourceResourceLoader that can be wired to the datasource with IoC
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28611>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=28611
vterzic@intgas.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
------- Additional Comments From vterzic@intgas.com 2005-10-06 23:37 -------
To make this patch truly work with spring you need to change method below.
If method is left unchanged Velocity will look for JNDI context which may not be
available and spring with throw an error. Since we provided dataSource via
spring IOC context call is not necessary.
private Connection openDbConnection() throws Exception {
if (dataSource != null)
return dataSource.getConnection();
if (ctx == null) {
ctx = new InitialContext();
}
if (dataSource == null) {
dataSource = (DataSource)ctx.lookup(dataSourceName);
}
return dataSource.getConnection();
}
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org