Index: lams_contentrepository/build.xml
===================================================================
diff -u -r09decccca1a4d871be5772d51638fa13aa928349 -rf753f75b21cc32230f53d50c509c4ca23cb4aec4
--- lams_contentrepository/build.xml (.../build.xml) (revision 09decccca1a4d871be5772d51638fa13aa928349)
+++ lams_contentrepository/build.xml (.../build.xml) (revision f753f75b21cc32230f53d50c509c4ca23cb4aec4)
@@ -175,6 +175,12 @@
+
+
+
+
+
+
Index: lams_contentrepository/conf/hibernate/mappings/org/lamsfoundation/lams/contentrepository/CrNode.hbm.xml
===================================================================
diff -u -rd3f488ff70266c8a676e11ee261b74b7a4c43d51 -rf753f75b21cc32230f53d50c509c4ca23cb4aec4
--- lams_contentrepository/conf/hibernate/mappings/org/lamsfoundation/lams/contentrepository/CrNode.hbm.xml (.../CrNode.hbm.xml) (revision d3f488ff70266c8a676e11ee261b74b7a4c43d51)
+++ lams_contentrepository/conf/hibernate/mappings/org/lamsfoundation/lams/contentrepository/CrNode.hbm.xml (.../CrNode.hbm.xml) (revision f753f75b21cc32230f53d50c509c4ca23cb4aec4)
@@ -15,12 +15,15 @@
name="org.lamsfoundation.lams.contentrepository.CrNode"
table="lams_cr_node"
>
+
@hibernate.class
table="lams_cr_node"
true
+
+
true
+
+
-->
-
+
Index: lams_contentrepository/conf/hibernate/mappings/org/lamsfoundation/lams/contentrepository/CrNodeVersionProperty.hbm.xml
===================================================================
diff -u -r09decccca1a4d871be5772d51638fa13aa928349 -rf753f75b21cc32230f53d50c509c4ca23cb4aec4
--- lams_contentrepository/conf/hibernate/mappings/org/lamsfoundation/lams/contentrepository/CrNodeVersionProperty.hbm.xml (.../CrNodeVersionProperty.hbm.xml) (revision 09decccca1a4d871be5772d51638fa13aa928349)
+++ lams_contentrepository/conf/hibernate/mappings/org/lamsfoundation/lams/contentrepository/CrNodeVersionProperty.hbm.xml (.../CrNodeVersionProperty.hbm.xml) (revision f753f75b21cc32230f53d50c509c4ca23cb4aec4)
@@ -22,6 +22,8 @@
true
IValue
+
+
+
@hibernate.class
table="lams_cr_workspace"
true
IWorkspace
+
+
+
+
+
+
+
+
+
+ jboss:service=Naming
+ jboss:service=TransactionManager
+
+ MyCluster
+ REPL_SYNC
+ 10000
+ 15000
+ true
+
+
+ org.jboss.cache.eviction.LRUPolicy
+
+
+
+
+ 5
+
+
+ 200
+ 300
+ 900
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/SimpleRepository.java
===================================================================
diff -u -rd3f488ff70266c8a676e11ee261b74b7a4c43d51 -rf753f75b21cc32230f53d50c509c4ca23cb4aec4
--- lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/SimpleRepository.java (.../SimpleRepository.java) (revision d3f488ff70266c8a676e11ee261b74b7a4c43d51)
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/SimpleRepository.java (.../SimpleRepository.java) (revision f753f75b21cc32230f53d50c509c4ca23cb4aec4)
@@ -548,9 +548,10 @@
ItemNotFoundException, FileException {
long start = System.currentTimeMillis();
+ String key = "getFileItem "+uuid;
IVersionedNode latestNodeVersion = getNode(ticket.getWorkspaceId(),uuid,version);
- log.error("getFileItem latestNodeVersion "+(System.currentTimeMillis()-start));
+ log.error(key+" latestNodeVersion "+(System.currentTimeMillis()-start));
if ( relPath == null ) {
@@ -562,7 +563,7 @@
// find the node indicated by the relPath
IVersionedNode childNode = latestNodeVersion.getNode(relPath);
- log.error("getFileItem latestNodeVersion.getNode "+(System.currentTimeMillis()-start));
+ log.error(key+" latestNodeVersion.getNode "+(System.currentTimeMillis()-start));
return childNode;
}
}
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/SimpleVersionedNode.java
===================================================================
diff -u -rd3f488ff70266c8a676e11ee261b74b7a4c43d51 -rf753f75b21cc32230f53d50c509c4ca23cb4aec4
--- lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/SimpleVersionedNode.java (.../SimpleVersionedNode.java) (revision d3f488ff70266c8a676e11ee261b74b7a4c43d51)
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/SimpleVersionedNode.java (.../SimpleVersionedNode.java) (revision f753f75b21cc32230f53d50c509c4ca23cb4aec4)
@@ -715,13 +715,13 @@
}
CrNode childNode = nodeDAO.findChildNode(nodeVersion, relPath);
- log.error(key+" childNodeDB"+(System.currentTimeMillis()-start));
+ log.error(key+" childNodeDB "+(System.currentTimeMillis()-start));
if ( childNode != null ) {
SimpleVersionedNode newNode = (SimpleVersionedNode) beanFactory.getBean("node", SimpleVersionedNode.class);
newNode.node = childNode;
newNode.nodeVersion = childNode.getNodeVersion(null); // get latest and only version
- log.error(key+" returningNode"+(System.currentTimeMillis()-start));
+ log.error(key+" returningNode "+(System.currentTimeMillis()-start));
return (IVersionedNode) newNode;
} else {
throw new ItemNotFoundException("Unable to find node with path "+relPath
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/contentRepositoryApplicationContext.xml
===================================================================
diff -u -r09decccca1a4d871be5772d51638fa13aa928349 -rf753f75b21cc32230f53d50c509c4ca23cb4aec4
--- lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/contentRepositoryApplicationContext.xml (.../contentRepositoryApplicationContext.xml) (revision 09decccca1a4d871be5772d51638fa13aa928349)
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/contentRepositoryApplicationContext.xml (.../contentRepositoryApplicationContext.xml) (revision f753f75b21cc32230f53d50c509c4ca23cb4aec4)
@@ -60,6 +60,7 @@
${hibernate.c3p0.maxPoolSize}
${hibernate.c3p0.timeout}
${hibernate.c3p0.max_statement}
+ net.sf.hibernate.cache.TreeCacheProvider
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/struts/action/Download.java
===================================================================
diff -u -rd3f488ff70266c8a676e11ee261b74b7a4c43d51 -rf753f75b21cc32230f53d50c509c4ca23cb4aec4
--- lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/struts/action/Download.java (.../Download.java) (revision d3f488ff70266c8a676e11ee261b74b7a4c43d51)
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/struts/action/Download.java (.../Download.java) (revision f753f75b21cc32230f53d50c509c4ca23cb4aec4)
@@ -131,8 +131,10 @@
long start = System.currentTimeMillis();
ITicket ticket = RepositoryDispatchAction.getTicket(request);
- if ( ticket == null )
+ if ( ticket == null ) {
errorInContent(request, response,"No ticket found in session. Unable to access repository.",null);
+ return;
+ }
Long uuid = RepositoryDispatchAction.getLong(request.getParameter(RepositoryDispatchAction.UUID_NAME));
Long version = null;
@@ -153,7 +155,12 @@
if ( node.isNodeType(NodeType.PACKAGENODE) ) {
// now get the path of the initial page in the package
- String initialPage = getInitialPage(request, response, node);
+ IValue value = node.getProperty(PropertyName.INITIALPATH);
+ String initialPage = value != null ? value.getString() : null;
+ if ( initialPage == null || initialPage.length() ==0 ) {
+ errorInContent(request, response,"No initial page found for this set of content. Node Data is "+node.toString(),null);
+ return;
+ }
// redirect to the initial path
// prepend with servlet and id - initial call doesn't include the id
@@ -172,6 +179,7 @@
} else {
errorInContent(request, response,"Unsupported node type "
+node.getNodeType()+". Node Data is "+node.toString(),null);
+ return;
}
} else {
@@ -185,21 +193,28 @@
callId = "download "+Math.random()+" "+uuid;
- if ( uuid == null )
+ if ( uuid == null ) {
errorInContent(request, response, "UUID value is missing. "+expectedFormat,null);
+ return;
+ }
- if ( version == null )
+ if ( version == null ) {
errorInContent(request, response, "Version value is missing. "+expectedFormat,null);
+ return;
+ }
- if ( relPathString == null )
+ if ( relPathString == null ) {
errorInContent(request, response, "Filename is missing. "+expectedFormat,null);
+ return;
+ }
log.error(callId+" beforeGetFileItem2 "+(System.currentTimeMillis()-start));
IVersionedNode node = getFileItem(ticket, uuid, version, relPathString);
log.error(callId+" getFileItem2 "+(System.currentTimeMillis()-start));
if ( ! node.isNodeType(NodeType.FILENODE) ) {
errorInContent(request, response,"Unexpected type of node "
+node.getNodeType()+" Expected File node. Data is "+node,null);
+ return;
}
handleFileNode(request, response, node);
@@ -234,27 +249,7 @@
}
/**
- * @param request
* @param response
- * @param node
- * @param value
- * @return
- * @throws ValueFormatException
- * @throws IOException
- */
- private String getInitialPage(HttpServletRequest request, HttpServletResponse response, IVersionedNode node)
- throws ValueFormatException, IOException {
-
- IValue value = node.getProperty(PropertyName.INITIALPATH);
- String initialPage = value != null ? value.getString() : null;
- if ( initialPage == null || initialPage.length() ==0 ) {
- errorInContent(request, response,"No initial page found for this set of content. Node Data is "+node.toString(),null);
- }
- return initialPage;
- }
-
- /**
- * @param response
* @param aNode
* @throws IOException
*/
Index: lams_contentrepository/src/java/treecache.xml
===================================================================
diff -u
--- lams_contentrepository/src/java/treecache.xml (revision 0)
+++ lams_contentrepository/src/java/treecache.xml (revision f753f75b21cc32230f53d50c509c4ca23cb4aec4)
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ jboss:service=Naming
+ jboss:service=TransactionManager
+
+
+
+
+ name=DefaultCache
+ locatorURI=socket://:5555
+
+
+
+ org.jboss.cache.JBossTransactionManagerLookup
+
+
+
+ REPEATABLE_READ
+
+
+ LOCAL
+
+
+ TreeCache-Cluster
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5000
+
+
+ 10000
+
+
+ 15000
+
+
+
+
+
+
+
+
+
+ 5
+
+
+ 5000
+ 1000
+
+
+ 200
+ 900
+
+
+
+
+
+
+