Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0-M4
-
None
Description
Convert OJB to use a Spring managed datasource as opposed to directly setting the JNDI name in OJB.properties.
The procedure for this is outlined here: http://www.springframework.org/docs/reference/orm.html#d0e7571.
This allows for developers to easily override the datasource in use within Spring as opposed to having to mess with OJB ( IMO, this a good thing). The deafult will work exactly like the existing implementation in that it will use a JNDI datasource. I will also include a commented-out datasource bean definition that uses a simple DBCP Pooled datasource as opposed to a JNDI one.
On a side note. I have been using this approach for internal projects and it is working out very well. The only difference as I use Hibernate on internal projects as opposed to OJB, but the logic is still very similar and the results are the same, a datasource managed in Spring as opposed the ORMs proprietary configuration format.