diff options
author | adrianocrestani <adrianocrestani@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-28 06:38:34 +0000 |
---|---|---|
committer | adrianocrestani <adrianocrestani@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-28 06:38:34 +0000 |
commit | aaea9a7255e72725634af9f46bb59c4f61418776 (patch) | |
tree | 4ca00006ac9373cf7a85f358abe2df47dcf0510e /branches/sca-java-1.x/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java | |
parent | e14097e558d803c2b22a92ec3484330ffebf1459 (diff) |
applying patch tuscany_2552_phillipe_ramalho_09_30_2009.patch from TUSCANY-2552
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@830448 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java')
-rw-r--r-- | branches/sca-java-1.x/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/branches/sca-java-1.x/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java b/branches/sca-java-1.x/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java index ef23b1b4cd..3e17ae007b 100644 --- a/branches/sca-java-1.x/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java +++ b/branches/sca-java-1.x/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java @@ -75,6 +75,7 @@ import org.apache.tuscany.sca.data.collection.LocalItemCollection; import org.apache.tuscany.sca.data.collection.NotFoundException; import org.apache.tuscany.sca.domain.manager.impl.ContributionCollectionImpl.Cache.ContributionCache; import org.apache.tuscany.sca.domain.search.DomainSearch; +import org.apache.tuscany.sca.domain.search.IndexException; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.MonitorFactory; import org.apache.tuscany.sca.monitor.Problem; @@ -225,7 +226,14 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl // add it to the search index, contributionUpdated is called to guarantee // only one contribution with the same URI in the index if (domainSearch != null) { // can be null in unit tests - domainSearch.contributionUpdated(contribution, contribution); + + try { + domainSearch.updateContribution(contribution, contribution); + + } catch (IndexException e) { + logger.warning("Could not update contribution on index: " + contribution.getURI()); + } + } return key; @@ -274,7 +282,13 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl // delete it from the search index if (domainSearch != null) { // can be null in unit tests - domainSearch.contributionRemoved(contribution); + + try { + domainSearch.removeContribution(contribution); + } catch (IndexException e) { + logger.warning("Could not remove contribution from index: " + contribution.getURI()); + } + } return; |