Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/applicationContext.xml =================================================================== diff -u -r36a3488f8517a3143da11d93f287c782f7e758bd -rc624fa1214cb17e6966fc6593f13080404b0df0f --- lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/applicationContext.xml (.../applicationContext.xml) (revision 36a3488f8517a3143da11d93f287c782f7e758bd) +++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/applicationContext.xml (.../applicationContext.xml) (revision c624fa1214cb17e6966fc6593f13080404b0df0f) @@ -61,8 +61,9 @@ - - + + + @@ -72,23 +73,23 @@ - PROPAGATION_SUPPORTS,readOnly,-RepositoryCheckedException,-RepositoryRuntimeException - PROPAGATION_REQUIRED,-RepositoryCheckedException,-RepositoryRuntimeException - PROPAGATION_REQUIRED,-RepositoryCheckedException,-RepositoryRuntimeException - PROPAGATION_REQUIRED,-RepositoryCheckedException,-RepositoryRuntimeException - PROPAGATION_REQUIRED,-RepositoryCheckedException,-RepositoryRuntimeException - PROPAGATION_REQUIRED,-RepositoryCheckedException,-RepositoryRuntimeException - PROPAGATION_REQUIRED,-RepositoryCheckedException,-RepositoryRuntimeException - PROPAGATION_REQUIRED,-RepositoryCheckedException,-RepositoryRuntimeException - PROPAGATION_REQUIRED,-RepositoryCheckedException,-RepositoryRuntimeException - PROPAGATION_REQUIRED,-RepositoryCheckedException,-RepositoryRuntimeException - PROPAGATION_REQUIRED,-RepositoryCheckedException,-RepositoryRuntimeException - PROPAGATION_SUPPORTS,-RepositoryCheckedException,-RepositoryRuntimeException - PROPAGATION_SUPPORTS,-RepositoryCheckedException,-RepositoryRuntimeException + PROPAGATION_SUPPORTS,readOnly + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_SUPPORTS + PROPAGATION_SUPPORTS - PROPAGATION_REQUIRED,readOnly,-RepositoryCheckedException,-RepositoryRuntimeException - PROPAGATION_REQUIRED,readOnly,-RepositoryCheckedException,-RepositoryRuntimeException - PROPAGATION_REQUIRED,readOnly,-RepositoryCheckedException,-RepositoryRuntimeException + PROPAGATION_REQUIRED,readOnly + PROPAGATION_REQUIRED,readOnly + PROPAGATION_REQUIRED,readOnly Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/package.html =================================================================== diff -u -r76ec9f8751b089a3c39e97bd92e72e4d11b41911 -rc624fa1214cb17e6966fc6593f13080404b0df0f --- lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/package.html (.../package.html) (revision 76ec9f8751b089a3c39e97bd92e72e4d11b41911) +++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/package.html (.../package.html) (revision c624fa1214cb17e6966fc6593f13080404b0df0f) @@ -77,16 +77,16 @@

Note: All interfaces with Admin in their name are only to be used within the repository and must not be used by tools.

-

Spring Context File

+

Spring Context

The context file for Spring is available as /org/lamsfoundation/lams/contentrepository/applicationContext.xml.

The only bean that should be accessed directly is the repository service. The bean reference is "repositoryService".

-

There is a local context file available as /org/lamsfoundation/lams/contentrepository/localApplicationContext.xml. -This should only be used in junit testing. This uses a local database (rather than the JNDI datasource) and -does not use a cache.

+

The content repository uses the core datasource and the shared transaction manager +defined in /org/lamsfoundation/lams/applicationContext.xml. When using the content repository +for junit testing, make sure you include /org/lamsfoundation/lams/localApplicationContext.xml.

Typical Usage

@@ -240,12 +240,13 @@ RepositoryCheckedException.

All the calls on IRepository should be transactional, defined -in the Spring context file. If any are not defined in the context file, then -this is a bug and should be corrected!!!!!!!!!. All -of the transactions should roll back on both the RepositoryCheckedException -(as it is defined in the context file) and RepositoryRuntimeException -as the Spring trasactions will roll back on any RuntimeException. -However, all we can roll back are database changes. We cannot roll back +in the Spring context file. Runtime exceptions will trigger the transaction +to be marked for rollback. Checked exceptions will NOT trigger the transaction +to be marked for rollback so it is up to the calling code to trigger a +rollback if needed. This allows the calling code to handle the exception and +continue the transaction.

+ +

However, all we can roll back are database changes. We cannot roll back file system changes. For this reason, we try to do the database changes first. But it isn't perfect.

@@ -254,7 +255,7 @@