Index: lams_build/lib/lams/lams-contentrepository.jar =================================================================== RCS file: /usr/local/cvsroot/lams_build/lib/lams/lams-contentrepository.jar,v diff -u -r1.9 -r1.10 Binary files differ Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/applicationContext.xml =================================================================== RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/applicationContext.xml,v diff -u -r1.3 -r1.4 --- lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/applicationContext.xml 30 Aug 2005 04:42:23 -0000 1.3 +++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/applicationContext.xml 7 Sep 2005 07:13:30 -0000 1.4 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/package.html,v diff -u -r1.3 -r1.4 --- lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/package.html 21 Apr 2005 03:39:03 -0000 1.3 +++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/package.html 7 Sep 2005 07:13:30 -0000 1.4 @@ -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 @@