summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfmoga <fmoga@13f79535-47bb-0310-9956-ffa450edef68>2011-06-09 08:37:15 +0000
committerfmoga <fmoga@13f79535-47bb-0310-9956-ffa450edef68>2011-06-09 08:37:15 +0000
commitd9e0a73826902ae27d9757427b56a90276878e4c (patch)
tree6650e535577304377ace41e4d9d5369e5c4cab31
parent0de1e5126516b79e813e2d326499fd3a8d64a67c (diff)
Minor modifications to the comet samples.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1133716 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--sca-java-2.x/contrib/samples/learning-more/binding-comet/pubsub-webapp/src/main/webapp/index.html3
-rw-r--r--sca-java-2.x/contrib/samples/learning-more/binding-comet/single-response-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryRepository.java2
-rw-r--r--sca-java-2.x/contrib/samples/learning-more/binding-comet/single-response-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryRepositoryImpl.java7
-rw-r--r--sca-java-2.x/contrib/samples/learning-more/binding-comet/single-response-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryServiceImpl.java12
4 files changed, 9 insertions, 15 deletions
diff --git a/sca-java-2.x/contrib/samples/learning-more/binding-comet/pubsub-webapp/src/main/webapp/index.html b/sca-java-2.x/contrib/samples/learning-more/binding-comet/pubsub-webapp/src/main/webapp/index.html
index ea217ac35d..e7b6354ac9 100644
--- a/sca-java-2.x/contrib/samples/learning-more/binding-comet/pubsub-webapp/src/main/webapp/index.html
+++ b/sca-java-2.x/contrib/samples/learning-more/binding-comet/pubsub-webapp/src/main/webapp/index.html
@@ -35,8 +35,7 @@
document.getElementById('connect').onclick = function(event) {
/* transport can be : long-polling or streaming */
SCA.TuscanyComet.connect(document.getElementById('transport').value);
- document.getElementById('connect').disabled = true;
- document.getElementById('transport').disabled = true;
+ document.getElementById('connect').value = 'Switch';
}
diff --git a/sca-java-2.x/contrib/samples/learning-more/binding-comet/single-response-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryRepository.java b/sca-java-2.x/contrib/samples/learning-more/binding-comet/single-response-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryRepository.java
index ca16142bf5..12cdfb4235 100644
--- a/sca-java-2.x/contrib/samples/learning-more/binding-comet/single-response-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryRepository.java
+++ b/sca-java-2.x/contrib/samples/learning-more/binding-comet/single-response-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryRepository.java
@@ -25,6 +25,6 @@ import org.oasisopen.sca.annotation.Remotable;
@Remotable
public interface CountryRepository {
- List<Country> getStartingWith(String text);
+ List<Country> findStartingWith(String text);
}
diff --git a/sca-java-2.x/contrib/samples/learning-more/binding-comet/single-response-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryRepositoryImpl.java b/sca-java-2.x/contrib/samples/learning-more/binding-comet/single-response-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryRepositoryImpl.java
index 65ac77723e..8be65c9147 100644
--- a/sca-java-2.x/contrib/samples/learning-more/binding-comet/single-response-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryRepositoryImpl.java
+++ b/sca-java-2.x/contrib/samples/learning-more/binding-comet/single-response-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryRepositoryImpl.java
@@ -25,9 +25,7 @@ import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
-import org.oasisopen.sca.ComponentContext;
import org.oasisopen.sca.annotation.Constructor;
-import org.oasisopen.sca.annotation.Context;
import org.oasisopen.sca.annotation.EagerInit;
import org.oasisopen.sca.annotation.Init;
import org.oasisopen.sca.annotation.Property;
@@ -39,9 +37,6 @@ import org.oasisopen.sca.annotation.Service;
@Service(CountryRepository.class)
public class CountryRepositoryImpl implements CountryRepository {
- @Context
- protected ComponentContext context;
-
private String fileName;
private List<Country> countries;
@@ -70,7 +65,7 @@ public class CountryRepositoryImpl implements CountryRepository {
}
@Override
- public List<Country> getStartingWith(String text) {
+ public List<Country> findStartingWith(String text) {
List<Country> result = new ArrayList<Country>();
for (Country c : countries) {
if (c.getName().toLowerCase().startsWith(text.toLowerCase())) {
diff --git a/sca-java-2.x/contrib/samples/learning-more/binding-comet/single-response-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryServiceImpl.java b/sca-java-2.x/contrib/samples/learning-more/binding-comet/single-response-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryServiceImpl.java
index 2a9321db1d..ad0786be59 100644
--- a/sca-java-2.x/contrib/samples/learning-more/binding-comet/single-response-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryServiceImpl.java
+++ b/sca-java-2.x/contrib/samples/learning-more/binding-comet/single-response-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryServiceImpl.java
@@ -26,11 +26,11 @@ import org.oasisopen.sca.annotation.Service;
@Service(CountryService.class)
public class CountryServiceImpl implements CountryService {
- @Reference
- protected CountryRepository repository;
+ @Reference
+ protected CountryRepository repository;
- @Override
- public List<Country> getCountriesStartingWith(String text) {
- return repository.getStartingWith(text);
- }
+ @Override
+ public List<Country> getCountriesStartingWith(String text) {
+ return repository.findStartingWith(text);
+ }
}