Revision
5072 -
Directory Listing
-
[select for diffs]
Modified
Mon Feb 19 14:51:37 2007 UTC
(14 years ago)
by
wgrevink
Diff to
previous 5071
WCL-1
Only store successful WebdavResponses in the cache (successful being defined as having a HTTP response code between 200 and 299 inclusive)
Revision
5068 -
Directory Listing
-
[select for diffs]
Modified
Mon Feb 19 11:52:34 2007 UTC
(14 years ago)
by
wgrevink
Diff to
previous 5067
WCL-1
Moved calculation of EventValidity and caching logic for fetch...ById(id) service methods from WebdavServiceImpl class to SearchDocumentById class.
The previous implementation wasn't optimal: it had as drawback that each fetch...ById(id) service method stored it's result using it's own cache key
resulting in potentially redundant webdav calls and cache entries.
Revision
4990 -
Directory Listing
-
[select for diffs]
Modified
Tue Feb 13 15:43:51 2007 UTC
(14 years ago)
by
wgrevink
Diff to
previous 4980
WCL-1 Finalized jms reconnect
1)RepositoryChangeListener thread is now a daemon thread
2)Avoid possible deadlock by moving the registry of the jms exception listener outside of the loop that retries until
a jms connection has successfully been established.
3)Added the possibility to pass an arbitrary number of JNDI configuration parameters to the UpdateNotificationConfig,
all these parameters will be used in creating the JNDI InitialContext
Revision
4898 -
Directory Listing
-
[select for diffs]
Modified
Thu Feb 8 09:38:37 2007 UTC
(14 years ago)
by
wgrevink
Diff to
previous 4882
WCL-1
Fixed NullPointerException which occurs while doing a fetchDocumentCollection using a broken dasl
Added brokenInputTest which reproduces this bug.
Revision
4882 -
Directory Listing
-
[select for diffs]
Modified
Tue Feb 6 14:23:06 2007 UTC
(14 years ago)
by
wgrevink
Diff to
previous 4878
WCL-1
Refactored Facet binding: use a custom Marshaller to create a Map iso. a List of Facets in FacetCollectionImpl
This results in a more straightforward implementation of getFacet(String facetName)
Revision
4878 -
Directory Listing
-
[select for diffs]
Modified
Tue Feb 6 09:31:03 2007 UTC
(14 years ago)
by
wgrevink
Diff to
previous 4874
WCL-1
*)Added some logging to the CachingService implementation
*)Type safety: Remove a cached entry from the cache if it is of the wrong type.
Revision
4873 -
Directory Listing
-
[select for diffs]
Modified
Mon Feb 5 14:48:03 2007 UTC
(14 years ago)
by
wgrevink
Diff to
previous 4867
WCL-1
Some package renaming/reordering.
*)All webdav methods (Search Get etc.) in nl.hippo.client.webdav.method
*)Binding of Document(Collection | Metadata) in nl.hippo.client.webdav.binding.content
*)Binding of Facets(Collection | Value) in nl.hippo.client.webdav.binding.facets
Revision
4822 -
Directory Listing
-
[select for diffs]
Modified
Thu Feb 1 10:57:06 2007 UTC
(14 years, 1 month ago)
by
wgrevink
Diff to
previous 4814
WCL-1
Implemented correct caching for the fetchDocumentById(), fetchMetadataById() and fetchContentById() methods in the WebdavService.
This implementation is much simpler than the proposed implementation using a dedicated ID cache with references to the 'real' cache.
The problem with that solution is that it introduces a new level of complexity (two tightly coupled cache instances) that can
potentially be the source of a whole new category of bugs and instability. Even if the two caches are based on the same instance, it
remains that a new and potentially problematic concept -'reference to a cache entry in a cache entry'- is introduced.
This implementation reuses existing concepts and is based on the following two observations:
1)A fetch..ById() method in the WebdavService allways binds the result of the inbuilt find-by-id dasl in order to retrieve the
DocumentPath to the Document to be fetched. This means that we DO have the DocumentPath at our disposal during the execute of
a fetch..ById() method.
2)We have the NOPCachingService at our disposal which enables us to do anything without the real cache knowing about it.
To cut a long story short, here's the code:
public Document fetchDocumentById(String documentId) throws ClientException {
assertDocumentIdIsEnabled();
WebdavCacheKey key = new WebdavCacheKey(config, documentId, "ID-DOCUMENT");
Object result = cache.get(key);
if (result == null) {
CachingService nullCache = new NOPCachingService();
DocumentPath path = documentFactory.resolvePath(nullCache, documentId);
if (path != null) {
result = documentFactory.fetchDocument(nullCache, path);
store(cache, key, result, path);
}
}
return (Document) result;
}
private void store(CachingService cache, WebdavCacheKey key, Object object, DocumentPath path) throws ClientException {
if (object == null) {
return;
}
try {
EventValidity eventValidity = new EventValidityImpl(path.getDocumentPath());
CachedResponse cr = new CachedResponseImpl(eventValidity, object);
cache.store(key, cr);
} catch (IOException e) {
throw new ClientException("Exception while caching the response", e);
}
}
The JMSEventCacheTest contains some tests to verify that this actually does what we want: Te cache entry is evicted only on a change event
on the Document itself: testFindDocumentById(), testFindMetadataById() and testFindContentById()
Some more refactorings:
*) Removed getPath() method from interface CacheKey, it is webdav-eventcaching specific and doesn't belong in this general interface.
It's webdav-clientlib implementation (WebdavCacheKey) still has it and it is only used inside this lib.
*) Split up huge method in BindingFactory into several smaller methods: no functional change, just cleaning up.
*) Fixed compilation error in JMSEventCacheTest that was introduced by yesterday's change in constructing a JCSDefaultCache()
Revision
4805 -
Directory Listing
-
[select for diffs]
Modified
Tue Jan 30 15:16:16 2007 UTC
(14 years, 1 month ago)
by
wgrevink
Diff to
previous 4800
WCL-1
Added NullTest and improved behaviour of WebdavService for incorrect parameters.
fetch... with null param -> illegalArgumentException
fetch...ById with non-existing id -> returns null
fetch.. with non existing path -> returns null
fetchCollection with no results returns DocumeentCollection with empty (not null) document list.
Revision
4770 -
Directory Listing
-
[select for diffs]
Modified
Mon Jan 29 13:14:37 2007 UTC
(14 years, 1 month ago)
by
wgrevink
Diff to
previous 4768
WCL-1
Commented out debug system.out.println statements.
TODO: implement logging throughout the webdav clientlib
Revision
4764 -
Directory Listing
-
[select for diffs]
Modified
Mon Jan 29 11:28:05 2007 UTC
(14 years, 1 month ago)
by
wgrevink
Diff to
previous 4759
WCL-1
1)Removed targetPath parameter from fetchDocumentById, fetchMetadataById and fetchContentById in webdav service
=> the fetch...ById methods now allways search the entire repository from the filesPath (preview or live) downwards.
2)Small optimailzation: moved searchbyid dasl template loading to static initializer
Revision
4723 -
Directory Listing
-
[select for diffs]
Modified
Thu Jan 25 13:29:34 2007 UTC
(14 years, 1 month ago)
by
wgrevink
Diff to
previous 4669
WCL-1
1)Added fetchMetadata(path) to webdav service
2)Renamed executeGet(path) to fetchContent() in webdav service
Revision
4654 -
Directory Listing
-
[select for diffs]
Modified
Tue Jan 23 15:44:15 2007 UTC
(14 years, 1 month ago)
by
wgrevink
Diff to
previous 4637
WCL-1
Added service layer to cachemanager and repository-update-notifier
webdav-clientlib, cachemanager and repository-update-notifier now all implement repository-client-api,
cachemanager-api and repository-update-notifier-api become obsolete.
Revision
4637 -
Directory Listing
-
[select for diffs]
Modified
Mon Jan 22 11:06:11 2007 UTC
(14 years, 1 month ago)
by
wgrevink
Diff to
previous 4632
WCL-1
Implemented new interface/implementation naming convention.
interface -> no pre/postfix
implementation => impl postfix
Revision
4530 -
Directory Listing
-
[select for diffs]
Modified
Fri Jan 12 16:24:57 2007 UTC
(14 years, 1 month ago)
by
wgrevink
Diff to
previous 4523
HIPDOC-21
Bump version of cachemanager-api, cachemanager, repository-client-api, webdav-clientlib and jsf-repository-browser
Revision
4505 -
Directory Listing
-
[select for diffs]
Modified
Fri Jan 12 11:35:37 2007 UTC
(14 years, 1 month ago)
by
wgrevink
Diff to
previous 4494
HIPDOC-21
Added IDocumentPath/DocumentPath with methods:
public String getNamespace();
public String getFilesPath();
public String getRootPath();
public String getRelativePath();
public String getDocumentPath();
IDocument/Document now returns a IDocumentPath iso a String for the Document path
Removed SearchResultFactory, moved fetch.. method to DocumentFactory
Simplified cachekey computing, there is no need for crc calculation on a stream since the dasl is eventually converted to a string anyway
Added SearchPerformanceTest for gaining insight in the speed
Revision
4467 -
Directory Listing
-
[select for diffs]
Modified
Thu Jan 11 12:36:25 2007 UTC
(14 years, 1 month ago)
by
wgrevink
Diff to
previous 4449
HIPDOC-21
Mainly cosmetic changes:
Added dependency to cachemanager-api in cachemanager project.xml
Added dependency to cachemanager-api and cachemanager in webdav-clientlib project.xml
Added .project, .classpath and target to .svnignore for cachemanager and cachemanager-api
Added NOTICE and LICENCE files
Removed unused imports
Removed unused local variables
Added serialversionUID for Serialized classes
Removed accidentally checked in class files
Removed eclipse generated TODO comments