Index: src/webapp/WEB-INF/assembly/boot/datasource.xml =================================================================== --- src/webapp/WEB-INF/assembly/boot/datasource.xml (revision 233258) +++ src/webapp/WEB-INF/assembly/boot/datasource.xml (working copy) @@ -2,36 +2,43 @@ - + Creates a JNDI-based datasource bean name "JetspeedDS". The information + provided here is merged with the basic configuration for the + jdbc-connection-descriptor with the matching jcd-alias property + ("JetspeedDS") located under /etc/db-ojb/repository_database.xml in the + source tree. + + Another requirement for this to work is to have the + ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl + or to have + ConnectionManagerClass=org.apache.jetspeed.components.rdbms.ojb.ConnectionManagerImpl. + (either will do, both are recommended, see comments in configuration file). + These properties are located in /etc/db-ojb/OJB.properties in the source tree. + + FYI: The two OJB configuration files mentioned above are currently already setup this way + in the default Jetspeed implementation. + + However, if you need to locate/modify these files in a running instance of jetspeed, + they will be located under /WEB-INF/classes. + --> + java:comp/env/jdbc/jetspeed + JNDI one above you can uncomment the configuration below and fill in + the datasource information as it relates to your environment. + + A requirement for this to work is to have the + ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl + or to have + ConnectionManagerClass=org.apache.jetspeed.components.rdbms.ojb.ConnectionManagerImpl + This property is located in /etc/db-ojb/OJB.properties in the source tree. + --> - - - - \ No newline at end of file + Index: etc/db-ojb/repository_database.xml =================================================================== --- etc/db-ojb/repository_database.xml (revision 233258) +++ etc/db-ojb/repository_database.xml (working copy) @@ -32,14 +32,15 @@ --> Index: etc/db-ojb/test-repository-datasource-spring.xml =================================================================== --- etc/db-ojb/test-repository-datasource-spring.xml (revision 233258) +++ etc/db-ojb/test-repository-datasource-spring.xml (working copy) @@ -3,7 +3,7 @@ - + ${org.apache.jetspeed.database.driver} @@ -16,11 +16,8 @@ ${org.apache.jetspeed.database.password} - + - - - Index: etc/db-ojb/OJB.properties =================================================================== --- etc/db-ojb/OJB.properties (revision 233258) +++ etc/db-ojb/OJB.properties (working copy) @@ -131,12 +131,15 @@ # this default connection factory entry in each JDBCConnectionDescriptor. # +# Note that due to using org.apache.jetspeed.components.rdbms.ojb.ConnectionManagerImpl as +# ConnectionManager (see below) this connection factory class will be used +# as a fallback only, i.e. if no special connection factory has been defined +# in the JDBC connection descriptor. + #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl -# Use Spring managed-connections instead -ConnectionFactoryClass=org.springframework.orm.ojb.support.LocalDataSourceConnectionFactory - #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryNotPooledImpl -#ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl +ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl +#ConnectionFactoryClass=org.springframework.orm.ojb.support.LocalDataSourceConnectionFactory #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl # # @@ -144,9 +147,16 @@ # ConnectionManager #---------------------------------------------------------------------------------------- # The ConnectionManagerClass entry defines the ConnectionManager implemementation to be used -ConnectionManagerClass=org.apache.ojb.broker.accesslayer.ConnectionManagerImpl # +# It is recommended to use the improved connection manager provided by Jetspeed. +# Instead of always using the ConnectionFactoryClass specified above, it uses the +# specific class configured for a JDBC connection descriptor (and the class specified +# above as a fallback only). + +#ConnectionManagerClass=org.apache.ojb.broker.accesslayer.ConnectionManagerImpl +ConnectionManagerClass=org.apache.jetspeed.components.rdbms.ojb.ConnectionManagerImpl # +# #---------------------------------------------------------------------------------------- # SqlGenerator #---------------------------------------------------------------------------------------- @@ -459,4 +469,4 @@ #---------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------- # End of OJB.properties file -#---------------------------------------------------------------------------------------- \ No newline at end of file +#----------------------------------------------------------------------------------------