incubator-aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jb...@apache.org
Subject svn commit: r1027954 - in /incubator/aries/sandbox/jbohn/interceptor-proto: application/ application/application-api/src/main/java/org/apache/aries/application/management/spi/resolve/ application/application-deployment-management/src/main/java/org/apac...
Date Wed, 27 Oct 2010 13:29:38 GMT
Author: jbohn
Date: Wed Oct 27 13:29:36 2010
New Revision: 1027954

URL: http://svn.apache.org/viewvc?rev=1027954&view=rev
Log:
merge from trunk -r 1023708:1027900

Added:
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/   (props changed)
      - copied from r1027630, incubator/aries/trunk/application/application-itest-twitter/
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/pom.xml
      - copied unchanged from r1027630, incubator/aries/trunk/application/application-itest-twitter/pom.xml
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-bundle/   (props changed)
      - copied from r1027630, incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-bundle/pom.xml
      - copied unchanged from r1027630, incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/pom.xml
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-bundle/src/
      - copied from r1027630, incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-bundle/src/main/
      - copied from r1027630, incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-bundle/src/main/java/
      - copied from r1027630, incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/java/
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-bundle/src/main/java/org/
      - copied from r1027630, incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/java/org/
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/
      - copied from r1027630, incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/aries/
      - copied from r1027630, incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/aries/
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/aries/application/
      - copied from r1027630, incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/aries/application/
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/aries/application/itest/
      - copied from r1027630, incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/aries/application/itest/
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/aries/application/itest/twitter/
      - copied from r1027630, incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/aries/application/itest/twitter/
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/aries/application/itest/twitter/TwitterQuery.java
      - copied unchanged from r1027630, incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/aries/application/itest/twitter/TwitterQuery.java
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-eba/   (props changed)
      - copied from r1027630, incubator/aries/trunk/application/application-itest-twitter/twitter-eba/
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-eba/pom.xml
      - copied unchanged from r1027630, incubator/aries/trunk/application/application-itest-twitter/twitter-eba/pom.xml
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/   (props changed)
      - copied from r1027630, incubator/aries/trunk/proxy/
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/pom.xml
      - copied unchanged from r1027630, incubator/aries/trunk/proxy/pom.xml
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-api/   (props changed)
      - copied from r1027630, incubator/aries/trunk/proxy/proxy-api/
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-api/pom.xml
      - copied unchanged from r1027630, incubator/aries/trunk/proxy/proxy-api/pom.xml
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-api/src/
      - copied from r1027630, incubator/aries/trunk/proxy/proxy-api/src/
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-api/src/main/
      - copied from r1027630, incubator/aries/trunk/proxy/proxy-api/src/main/
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-api/src/main/java/
      - copied from r1027630, incubator/aries/trunk/proxy/proxy-api/src/main/java/
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-api/src/main/java/org/
      - copied from r1027630, incubator/aries/trunk/proxy/proxy-api/src/main/java/org/
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-api/src/main/java/org/apache/
      - copied from r1027630, incubator/aries/trunk/proxy/proxy-api/src/main/java/org/apache/
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-api/src/main/java/org/apache/aries/
      - copied from r1027630, incubator/aries/trunk/proxy/proxy-api/src/main/java/org/apache/aries/
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-api/src/main/java/org/apache/aries/proxy/
      - copied from r1027630, incubator/aries/trunk/proxy/proxy-api/src/main/java/org/apache/aries/proxy/
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-api/src/main/java/org/apache/aries/proxy/InvocationHandlerWrapper.java
      - copied unchanged from r1027630, incubator/aries/trunk/proxy/proxy-api/src/main/java/org/apache/aries/proxy/InvocationHandlerWrapper.java
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-api/src/main/java/org/apache/aries/proxy/ProxyFactory.java
      - copied unchanged from r1027630, incubator/aries/trunk/proxy/proxy-api/src/main/java/org/apache/aries/proxy/ProxyFactory.java
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-api/src/main/java/org/apache/aries/proxy/ProxyManager.java
      - copied unchanged from r1027630, incubator/aries/trunk/proxy/proxy-api/src/main/java/org/apache/aries/proxy/ProxyManager.java
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-bundle/   (props changed)
      - copied from r1027630, incubator/aries/trunk/proxy/proxy-bundle/
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-bundle/pom.xml
      - copied unchanged from r1027630, incubator/aries/trunk/proxy/proxy-bundle/pom.xml
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-impl/   (props changed)
      - copied from r1027630, incubator/aries/trunk/proxy/proxy-impl/
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-impl/pom.xml
      - copied unchanged from r1027630, incubator/aries/trunk/proxy/proxy-impl/pom.xml
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-impl/src/
      - copied from r1027630, incubator/aries/trunk/proxy/proxy-impl/src/
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-impl/src/main/
      - copied from r1027630, incubator/aries/trunk/proxy/proxy-impl/src/main/
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-impl/src/main/java/
      - copied from r1027630, incubator/aries/trunk/proxy/proxy-impl/src/main/java/
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-impl/src/main/java/org/
      - copied from r1027630, incubator/aries/trunk/proxy/proxy-impl/src/main/java/org/
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-impl/src/main/java/org/apache/
      - copied from r1027630, incubator/aries/trunk/proxy/proxy-impl/src/main/java/org/apache/
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-impl/src/main/java/org/apache/aries/
      - copied from r1027630, incubator/aries/trunk/proxy/proxy-impl/src/main/java/org/apache/aries/
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/
      - copied from r1027630, incubator/aries/trunk/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/
    incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/
      - copied from r1027630, incubator/aries/trunk/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/
    incubator/aries/sandbox/jbohn/interceptor-proto/util/src/main/java/org/apache/aries/util/nls/
      - copied from r1027900, incubator/aries/trunk/util/src/main/java/org/apache/aries/util/nls/
    incubator/aries/sandbox/jbohn/interceptor-proto/util/src/main/java/org/apache/aries/util/nls/MessageUtil.java
      - copied unchanged from r1027900, incubator/aries/trunk/util/src/main/java/org/apache/aries/util/nls/MessageUtil.java
    incubator/aries/sandbox/jbohn/interceptor-proto/util/src/main/resources/OSGi-INF/
      - copied from r1027900, incubator/aries/trunk/util/src/main/resources/OSGi-INF/
    incubator/aries/sandbox/jbohn/interceptor-proto/util/src/main/resources/OSGi-INF/permissions.perm
      - copied unchanged from r1027900, incubator/aries/trunk/util/src/main/resources/OSGi-INF/permissions.perm
Modified:
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-api/src/main/java/org/apache/aries/application/management/spi/resolve/DeploymentManifestManager.java
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-api/src/main/java/org/apache/aries/application/management/spi/resolve/PostResolveTransformer.java
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-deployment-management/src/main/java/org/apache/aries/application/deployment/management/impl/DeploymentManifestManagerImpl.java
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-deployment-management/src/test/java/org/apache/aries/application/deployment/management/DeploymentGeneratorTest.java
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itests/pom.xml
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/AbstractIntegrationTest.java
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverAdvancedTest.java
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-management/src/test/java/org/apache/aries/application/management/impl/AriesApplicationManagerImplTest.java
    incubator/aries/sandbox/jbohn/interceptor-proto/application/application-noop-postresolve-process/src/main/java/org/apache/aries/application/noop/postresolve/process/impl/DefaultPostResolveTransformer.java
    incubator/aries/sandbox/jbohn/interceptor-proto/application/pom.xml
    incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-blueprint-aries/src/main/java/org/apache/aries/jpa/blueprint/aries/impl/NSHandler.java
    incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-blueprint-aries/src/test/java/org/apache/aries/jpa/blueprint/aries/test/NSHandlerTest.java
    incubator/aries/sandbox/jbohn/interceptor-proto/transaction/transaction-blueprint/src/main/resources/org/apache/aries/transaction/parsing/transactionv11.xsd
    incubator/aries/sandbox/jbohn/interceptor-proto/util/pom.xml
    incubator/aries/sandbox/jbohn/interceptor-proto/util/src/main/java/org/apache/aries/util/FragmentBuilder.java
    incubator/aries/sandbox/jbohn/interceptor-proto/util/src/main/java/org/apache/aries/util/VersionRange.java
    incubator/aries/sandbox/jbohn/interceptor-proto/util/src/main/resources/org/apache/aries/util/messages/UTILmessages.properties

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/application/application-api/src/main/java/org/apache/aries/application/management/spi/resolve/DeploymentManifestManager.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/application/application-api/src/main/java/org/apache/aries/application/management/spi/resolve/DeploymentManifestManager.java?rev=1027954&r1=1027953&r2=1027954&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/application/application-api/src/main/java/org/apache/aries/application/management/spi/resolve/DeploymentManifestManager.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/application/application-api/src/main/java/org/apache/aries/application/management/spi/resolve/DeploymentManifestManager.java Wed Oct 27 13:29:36 2010
@@ -21,6 +21,7 @@ package org.apache.aries.application.man
 import java.util.Collection;
 import java.util.jar.Manifest;
 
+import org.apache.aries.application.ApplicationMetadata;
 import org.apache.aries.application.Content;
 import org.apache.aries.application.ServiceDeclaration;
 import org.apache.aries.application.management.AriesApplication;
@@ -52,13 +53,9 @@ public interface DeploymentManifestManag
    * @throws ResolverException
    */
   DeployedBundles generateDeployedBundles( 
-      String appName, 
-      String appVersion, 
-      Collection<Content> appContent, 
+      ApplicationMetadata appMetadata, 
       Collection<ModelledResource> byValueBundles, 
-      Collection<Content> useBundleSet, 
-      Collection<Content> otherBundles, 
-      Collection<ServiceDeclaration> appImportServices) throws ResolverException;
+      Collection<Content> otherBundles) throws ResolverException;
 
   /**
    * Generate a Manifest representation of a DEPLOYMENT.MF, 

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/application/application-api/src/main/java/org/apache/aries/application/management/spi/resolve/PostResolveTransformer.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/application/application-api/src/main/java/org/apache/aries/application/management/spi/resolve/PostResolveTransformer.java?rev=1027954&r1=1027953&r2=1027954&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/application/application-api/src/main/java/org/apache/aries/application/management/spi/resolve/PostResolveTransformer.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/application/application-api/src/main/java/org/apache/aries/application/management/spi/resolve/PostResolveTransformer.java Wed Oct 27 13:29:36 2010
@@ -18,6 +18,7 @@
  */
 package org.apache.aries.application.management.spi.resolve;
 
+import org.apache.aries.application.ApplicationMetadata;
 import org.apache.aries.application.management.ResolverException;
 import org.apache.aries.application.modelling.DeployedBundles;
 
@@ -25,10 +26,11 @@ public interface PostResolveTransformer
 {
 /**
  *  This method is to perform any post process after the resolver returns back a collection of bundles. It returns the updated manifest map.
+ * @param appMetaData The application that was resolved
  * @param bundles A collection of bundles required by this application. 
  * @return Modified collection of bundles
  * @throws ResolverException
  */
-  DeployedBundles postResolveProcess(DeployedBundles deployedBundles) throws ResolverException;
+  DeployedBundles postResolveProcess(ApplicationMetadata appMetaData, DeployedBundles deployedBundles) throws ResolverException;
 
 }

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/application/application-deployment-management/src/main/java/org/apache/aries/application/deployment/management/impl/DeploymentManifestManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/application/application-deployment-management/src/main/java/org/apache/aries/application/deployment/management/impl/DeploymentManifestManagerImpl.java?rev=1027954&r1=1027953&r2=1027954&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/application/application-deployment-management/src/main/java/org/apache/aries/application/deployment/management/impl/DeploymentManifestManagerImpl.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/application/application-deployment-management/src/main/java/org/apache/aries/application/deployment/management/impl/DeploymentManifestManagerImpl.java Wed Oct 27 13:29:36 2010
@@ -143,11 +143,10 @@ public class DeploymentManifestManagerIm
     } catch (Exception e) {
       throw new ResolverException (e);
     }
-    Collection<Content> useBundles = app.getApplicationMetadata().getUseBundles();
 
     Collection<Content> bundlesToResolve = new ArrayList<Content>();
     bundlesToResolve.addAll(appMetadata.getApplicationContents());    
-    bundlesToResolve.addAll(useBundles);
+    bundlesToResolve.addAll(app.getApplicationMetadata().getUseBundles());
 
     //If we pass in provision bundles (e.g. import deployment manifest sanity check), we add them into our bundlesToResolve set.
     // This is because we want to make sure all bundles we passed into resolver the same as what we are going to get from resolver. 
@@ -157,9 +156,8 @@ public class DeploymentManifestManagerIm
       restrictedReqs.add(content);
     }
     
-    DeployedBundles deployedBundles = generateDeployedBundles (appMetadata.getApplicationSymbolicName(),
-        appMetadata.getApplicationVersion().toString(), appMetadata.getApplicationContents(), 
-        byValueBundles, useBundles, restrictedReqs, appMetadata.getApplicationImportServices());
+    DeployedBundles deployedBundles = generateDeployedBundles (appMetadata, 
+        byValueBundles, restrictedReqs);
     
     Manifest man = generateDeploymentManifest(appMetadata.getApplicationSymbolicName(),
         appMetadata.getApplicationVersion().toString(), deployedBundles);
@@ -178,21 +176,20 @@ public class DeploymentManifestManagerIm
   @Override
   public DeployedBundles generateDeployedBundles
   ( 
-      String appSymbolicName, 
-      String appVersion,
-      Collection<Content> appContent, 
+      ApplicationMetadata appMetadata, 
       Collection<ModelledResource> provideByValueBundles, 
-      Collection<Content> useBundleSet, 
-      Collection<Content> otherBundles, 
-      Collection<ServiceDeclaration> applicationImportService) throws ResolverException {  
+      Collection<Content> otherBundles) throws ResolverException {  
+    
+    _logger.debug(LOG_ENTRY, "generateDeployedBundles", new Object[]{appMetadata,
+        provideByValueBundles,otherBundles });
+    
+    Collection<Content> useBundleSet = appMetadata.getUseBundles();
+    Collection<Content> appContent = appMetadata.getApplicationContents();
     
-    _logger.debug(LOG_ENTRY, "generateDeployedBundles", new Object[]{appSymbolicName, appVersion, 
-        appContent, provideByValueBundles,useBundleSet,otherBundles });
     Collection<Content> bundlesToResolve = new ArrayList<Content>();
-    Set<ImportedBundle> appContentIB = null;
-    Set<ImportedBundle> useBundleIB = null;
-    useBundleIB = new HashSet<ImportedBundle> (toImportedBundle(useBundleSet));
-    appContentIB = new HashSet<ImportedBundle>(toImportedBundle(appContent));
+    Set<ImportedBundle> appContentIB = toImportedBundle(appContent);
+    Set<ImportedBundle> useBundleIB = toImportedBundle(useBundleSet);
+
 
     bundlesToResolve.addAll(useBundleSet);
 
@@ -201,7 +198,7 @@ public class DeploymentManifestManagerIm
     Collection<ModelledResource> byValueBundles = new ArrayList<ModelledResource>(provideByValueBundles);
     ModelledResource fakeBundleResource;
     try { 
-      fakeBundleResource = createFakeBundle(applicationImportService);
+      fakeBundleResource = createFakeBundle(appMetadata.getApplicationImportServices());
     } catch (InvalidAttributeException iax) { 
       ResolverException rx = new ResolverException (iax);
       _logger.debug(LOG_EXIT, "generateDeploymentManifest", new Object[] {rx});
@@ -209,6 +206,9 @@ public class DeploymentManifestManagerIm
       throw rx;
     }
     byValueBundles.add(fakeBundleResource);
+    
+    String appSymbolicName = appMetadata.getApplicationSymbolicName();
+    String appVersion = appMetadata.getApplicationVersion().toString();
     String uniqueName = appSymbolicName + "_" + appVersion;
     
     DeployedBundles deployedBundles = modellingHelper.createDeployedBundles(appSymbolicName, appContentIB, useBundleIB, Arrays.asList(fakeBundleResource));
@@ -246,6 +246,7 @@ public class DeploymentManifestManagerIm
     sharedBundles.addAll (deployedBundles.getDeployedProvisionBundle());
     sharedBundles.addAll (deployedBundles.getRequiredUseBundle()); 
 
+    Collection<ModelledResource> appContentBundles = deployedBundles.getDeployedContent();
     Collection<Content> requiredSharedBundles = new ArrayList<Content>();
     for (ModelledResource mr : sharedBundles) { 
       String version = mr.getExportedBundle().getVersion();
@@ -260,10 +261,13 @@ public class DeploymentManifestManagerIm
     Collection<ModelledResource> resolvedSharedBundles = resolver.resolve(appSymbolicName, appVersion
         , byValueBundles, requiredSharedBundles);
 
-    List<String> differences = findDifferences (resolvedSharedBundles, sharedBundles);
+    // we need to find out whether any shared bundles depend on the isolated bundles
+    List<String> suspects = findSuspects (resolvedSharedBundles, sharedBundles, appContentBundles);
     // If we have differences, it means that we have shared bundles trying to import packages
     // from isolated bundles. We need to build up the error message and throw a ResolverException
-    if (!differences.isEmpty()) { 
+    if (!suspects.isEmpty()) { 
+    	
+    	
       StringBuilder msgs = new StringBuilder();
       List<String> unsatisfiedRequirements = new ArrayList<String>();
 
@@ -271,7 +275,7 @@ public class DeploymentManifestManagerIm
       // Find the isolated bundles and store all the packages that they export in a map.
       for (ModelledResource mr : resolvedSharedBundles) {
         String mrName = mr.getSymbolicName() + "_" + mr.getExportedBundle().getVersion();
-        if (differences.contains(mrName)) {
+        if (suspects.contains(mrName)) {
           List<String> exportedPackages = new ArrayList<String>();
           isolatedBundles.put(mrName, exportedPackages);
           for (ExportedPackage ep : mr.getExportedPackages()) {
@@ -283,8 +287,8 @@ public class DeploymentManifestManagerIm
       // are exported from the isolated bundles.
       for (ModelledResource mr : resolvedSharedBundles) {
         String mrName = mr.getSymbolicName() + "_" + mr.getExportedBundle().getVersion();
-        // if current reource isn't an isolated bundle check it's requirements
-        if (!!! differences.contains(mrName)) {
+        // if current resource isn't an isolated bundle check it's requirements
+        if (!!! suspects.contains(mrName)) {
           // Iterate through the imported packages of the current shared bundle.
           for (ImportedPackage ip : mr.getImportedPackages()) {
             String packageName = ip.getPackageName();
@@ -330,7 +334,7 @@ public class DeploymentManifestManagerIm
     }
       
     if (postResolveTransformer != null) try {  
-      deployedBundles = postResolveTransformer.postResolveProcess (deployedBundles);
+      deployedBundles = postResolveTransformer.postResolveProcess (appMetadata, deployedBundles);
     } catch (ServiceUnavailableException e) { 
       _logger.debug(MessageUtil.getMessage("POST_RESOLVE_TRANSFORMER_UNAVAILABLE",e));
     }
@@ -488,31 +492,37 @@ public class DeploymentManifestManagerIm
 
   /**
    * We've done a sanity check resolve on our sharedBundles and received back 
-   * resolvedSharedBundles. These two collections should be equal in size and 
-   * contain the same elements. If this is not true, we've found a circular dependency. 
+   * resolvedSharedBundles. The resolvedSharedBundles should not contain any bundles listed in the isolated bundle list.
+   * If this is not true, we've found a case of shared bundles depending on isolated bundles. 
    * This method extracts the name_versions of those bundles in resolvedSharedBundles
    * that do not appear in sharedBundles. 
    * @param resolvedSharedBundles What we got back from the resolver
    * @param sharedBundles         What we expected to get back from the resolver
-   * @return                      The difference
+   * @param appContentBundles     The isolated bundles
+   * @return                      The isolated bundles depended by the shared bundles
    */
-  private List<String> findDifferences (Collection<ModelledResource> resolvedSharedBundles, 
-      Collection<ModelledResource> sharedBundles){
-    _logger.debug(LOG_ENTRY, "findDifferences", new Object[]{resolvedSharedBundles,sharedBundles });
+  private List<String> findSuspects (Collection<ModelledResource> resolvedSharedBundles, 
+      Collection<ModelledResource> sharedBundles, Collection<ModelledResource> appContentBundles){
+    _logger.debug(LOG_ENTRY, "findSuspects", new Object[]{resolvedSharedBundles,sharedBundles, appContentBundles });
     Set<String> expectedBundles = new HashSet<String>();
+    Set<String> isolatedBundles = new HashSet<String>();
     for (ModelledResource sb : sharedBundles) { 
       expectedBundles.add(sb.getExportedBundle().getSymbolicName() + "_" + 
           sb.getExportedBundle().getVersion());
     }
+    for (ModelledResource sb : appContentBundles) { 
+    	isolatedBundles.add(sb.getExportedBundle().getSymbolicName() + "_" + 
+            sb.getExportedBundle().getVersion());
+    }
     List<String> suspects = new ArrayList<String>();
     for (ModelledResource mr : resolvedSharedBundles) {
       String thisBundle = mr.getExportedBundle().getSymbolicName() + "_" + 
       mr.getExportedBundle().getVersion();
-      if (!expectedBundles.contains(thisBundle)) { 
+      if (!expectedBundles.contains(thisBundle) && (isolatedBundles.contains(thisBundle))) { 
         suspects.add(thisBundle);   
       }
     }
-    _logger.debug(LOG_EXIT, "pruneFakeBundleFromResults", new Object[]{suspects});
+    _logger.debug(LOG_EXIT, "findSuspects", new Object[]{suspects});
 
     return suspects;
   }
@@ -523,12 +533,12 @@ public class DeploymentManifestManagerIm
    * @return a collection of ImportedBundle objects
    * @throws ResolverException
    */
-  private Collection<ImportedBundle> toImportedBundle(Collection<Content> content) throws ResolverException
+  private Set<ImportedBundle> toImportedBundle(Collection<Content> content) throws ResolverException
   {
 
     _logger.debug(LOG_ENTRY, "toImportedBundle", new Object[]{content});
 
-    List<ImportedBundle> result = new ArrayList<ImportedBundle>();
+    Set<ImportedBundle> result = new HashSet<ImportedBundle>();
     for (Content c : content) {
       try {
         result.add(modellingManager.getImportedBundle(c.getContentName(), c.getVersion().toString()));

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/application/application-deployment-management/src/test/java/org/apache/aries/application/deployment/management/DeploymentGeneratorTest.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/application/application-deployment-management/src/test/java/org/apache/aries/application/deployment/management/DeploymentGeneratorTest.java?rev=1027954&r1=1027953&r2=1027954&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/application/application-deployment-management/src/test/java/org/apache/aries/application/deployment/management/DeploymentGeneratorTest.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/application/application-deployment-management/src/test/java/org/apache/aries/application/deployment/management/DeploymentGeneratorTest.java Wed Oct 27 13:29:36 2010
@@ -181,6 +181,8 @@ public class DeploymentGeneratorTest
         new MethodCall(ApplicationMetadata.class, "getApplicationSymbolicName"), "aries.test");
     Skeleton.getSkeleton(appMetadata).setReturnValue(
         new MethodCall(ApplicationMetadata.class, "getApplicationVersion"), new Version("1.0.0"));
+    Skeleton.getSkeleton(appMetadata).setReturnValue(
+        new MethodCall(ApplicationMetadata.class, "getUseBundles"), Collections.EMPTY_LIST);    
     
     app = Skeleton.newMock(AriesApplication.class);
     Skeleton.getSkeleton(app).setReturnValue(new MethodCall(AriesApplication.class, "getApplicationMetadata"), appMetadata);
@@ -240,12 +242,10 @@ public class DeploymentGeneratorTest
   {
     
     Skeleton.getSkeleton(appMetadata).setReturnValue(new MethodCall(ApplicationMetadata.class, "getApplicationContents"), Arrays.asList(mockContent("aries.test.a", "1.0.0"), mockContent("aries.test.b", "[1.0.0, 2.0.0)" )));
+    Skeleton.getSkeleton(appMetadata).setReturnValue(new MethodCall(ApplicationMetadata.class, "getUseBundles"), Arrays.asList(BUNDLE_C, BUNDLE_D));
     
-    
-    DeployedBundles deployedBundles = deplMFMgr.generateDeployedBundles (appMetadata.getApplicationSymbolicName(),
-        appMetadata.getApplicationVersion().toString(), appMetadata.getApplicationContents(), 
-        new ArrayList<ModelledResource>(), 
-        Arrays.asList(BUNDLE_C, BUNDLE_D), Collections.<Content>emptyList(), appMetadata.getApplicationImportServices());
+    DeployedBundles deployedBundles = deplMFMgr.generateDeployedBundles (appMetadata, 
+        new ArrayList<ModelledResource>(), Collections.<Content>emptyList()); 
     Manifest man = deplMFMgr.generateDeploymentManifest(appMetadata.getApplicationSymbolicName(),
         appMetadata.getApplicationVersion().toString(), deployedBundles);
     
@@ -290,10 +290,8 @@ public class DeploymentGeneratorTest
     
     
     try { 
-      DeployedBundles deployedBundles = deplMFMgr.generateDeployedBundles (appMetadata.getApplicationSymbolicName(),
-          appMetadata.getApplicationVersion().toString(), appMetadata.getApplicationContents(), 
-          new ArrayList<ModelledResource>(), 
-          new ArrayList<Content>(), Collections.<Content>emptyList(), appMetadata.getApplicationImportServices());
+      DeployedBundles deployedBundles = deplMFMgr.generateDeployedBundles (appMetadata, 
+          new ArrayList<ModelledResource>(), new ArrayList<Content>());
       deplMFMgr.generateDeploymentManifest(appMetadata.getApplicationSymbolicName(),
           appMetadata.getApplicationVersion().toString(), deployedBundles);
     } catch (ResolverException rx) { 
@@ -343,10 +341,9 @@ public class DeploymentGeneratorTest
     Skeleton.getSkeleton(app).setReturnValue(new MethodCall(AriesApplication.class, "getApplicationMetadata"), appMetadata);
     
     try {
-      DeployedBundles deployedBundles = deplMFMgr.generateDeployedBundles (appMetadata.getApplicationSymbolicName(),
-          appMetadata.getApplicationVersion().toString(), appMetadata.getApplicationContents(), 
+      DeployedBundles deployedBundles = deplMFMgr.generateDeployedBundles (appMetadata, 
           Arrays.asList(new ModelledResource[] {testIsolated1.getBundle(), testIsolated2.getBundle()}), 
-          new ArrayList<Content>(), Collections.<Content>emptyList(), appMetadata.getApplicationImportServices());
+          new ArrayList<Content>());
       deplMFMgr.generateDeploymentManifest(appMetadata.getApplicationSymbolicName(),
           appMetadata.getApplicationVersion().toString(), deployedBundles);
     } catch (ResolverException rx) { 

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Oct 27 13:29:36 2010
@@ -0,0 +1,4 @@
+target
+.classpath
+.project
+.settings

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-bundle/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Oct 27 13:29:36 2010
@@ -0,0 +1,4 @@
+target
+.classpath
+.project
+.settings

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-eba/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Oct 27 13:29:36 2010
@@ -0,0 +1,4 @@
+target
+.classpath
+.project
+.settings

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itests/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itests/pom.xml?rev=1027954&r1=1027953&r2=1027954&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itests/pom.xml (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itests/pom.xml Wed Oct 27 13:29:36 2010
@@ -113,6 +113,14 @@
         </dependency>
         
         <dependency>
+            <groupId>org.apache.aries.application.itest.twitter</groupId>
+            <artifactId>org.apache.aries.application.itest.twitter.eba</artifactId>
+            <version>${version}</version>
+            <type>eba</type>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
             <groupId>org.apache.aries.application</groupId>
             <artifactId>org.apache.aries.application.management</artifactId>
             <scope>test</scope>
@@ -208,6 +216,9 @@
                         <goals>
                             <goal>generate-depends-file</goal>
                         </goals>
+                        <configuration>
+                            <outputFile>${project.build.directory}/test-classes/META-INF/maven/dependencies.properties</outputFile>
+                        </configuration>
                     </execution>
                 </executions>
             </plugin>

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/AbstractIntegrationTest.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/AbstractIntegrationTest.java?rev=1027954&r1=1027953&r2=1027954&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/AbstractIntegrationTest.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/AbstractIntegrationTest.java Wed Oct 27 13:29:36 2010
@@ -20,8 +20,14 @@ import static org.ops4j.pax.exam.CoreOpt
 import static org.ops4j.pax.exam.CoreOptions.wrappedBundle;
 import static org.ops4j.pax.exam.OptionUtils.combine;
 
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Properties;
 
 import org.junit.After;
 import org.junit.Before;
@@ -31,6 +37,8 @@ import org.ops4j.pax.exam.Inject;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 import org.ops4j.pax.exam.options.MavenArtifactProvisionOption;
+import org.ops4j.pax.url.mvn.Handler;
+import org.ops4j.pax.url.mvn.ServiceConstants;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
@@ -63,11 +71,11 @@ public class AbstractIntegrationTest {
           }  
       }
   }
-
+  
   protected Bundle getBundle(String symbolicName) {
     return getBundle(symbolicName, null);
   }
-
+	
   protected Bundle getBundle(String bundleSymbolicName, String version) {
     Bundle result = null;
     for (Bundle b : bundleContext.getBundles()) {
@@ -83,11 +91,12 @@ public class AbstractIntegrationTest {
   }
 
   public static MavenArtifactProvisionOption mavenBundle(String groupId,
-      String artifactId) {
+          String artifactId) {
     return CoreOptions.mavenBundle().groupId(groupId).artifactId(artifactId)
         .versionAsInProject();
   }
 
+  
   protected static Option[] updateOptions(Option[] options) {
     // We need to add pax-exam-junit here when running with the ibm
     // jdk to avoid the following exception during the test run:
@@ -150,4 +159,55 @@ public class AbstractIntegrationTest {
     }
   }
  
+  public static URL getUrlToEba(String groupId, String artifactId) throws MalformedURLException {
+    String artifactVersion = getArtifactVersion(groupId, artifactId);
+
+    // Need to use handler from org.ops4j.pax.url.mvn
+    URL urlToEba = new URL(null,
+        ServiceConstants.PROTOCOL + ":" + groupId + "/" +artifactId + "/"
+            + artifactVersion + "/eba", new Handler());
+    return urlToEba;
+  }
+
+  public static String getArtifactVersion(final String groupId, final String artifactId)
+  {
+    final Properties dependencies = new Properties();
+    try {
+      InputStream in = getFileFromClasspath("META-INF/maven/dependencies.properties");
+      try {
+        dependencies.load(in);
+      } finally {
+        in.close();
+      }
+      final String version = dependencies.getProperty(groupId + "/" + artifactId + "/version");
+      if (version == null) {
+        throw new RuntimeException("Could not resolve version. Do you have a dependency for "
+            + groupId + "/" + artifactId + " in your maven project?");
+      }
+      return version;
+    } catch (IOException e) {
+      // TODO throw a better exception
+      throw new RuntimeException(
+          "Could not resolve version. Did you configure the depends-maven-plugin in your maven project? "
+              + " Or maybe you did not run the maven build and you are using an IDE?");
+    }
+  }  
+
+  private static InputStream getFileFromClasspath( final String filePath )
+    throws FileNotFoundException
+  {
+    try
+    {
+        URL fileURL = AbstractIntegrationTest.class.getClassLoader().getResource( filePath );
+        if( fileURL == null )
+        {
+            throw new FileNotFoundException( "File [" + filePath + "] could not be found in classpath" );
+        }
+        return fileURL.openStream();
+    }
+    catch (IOException e)
+    {
+        throw new FileNotFoundException( "File [" + filePath + "] could not be found: " + e.getMessage() );
+    }
+  }
 }
\ No newline at end of file

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverAdvancedTest.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverAdvancedTest.java?rev=1027954&r1=1027953&r2=1027954&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverAdvancedTest.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverAdvancedTest.java Wed Oct 27 13:29:36 2010
@@ -28,6 +28,7 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.FileReader;
+import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashSet;
@@ -397,13 +398,58 @@ public class OBRResolverAdvancedTest ext
     /* 
      * HelloWorldManager hwm = getOsgiService(HelloWorldManager.class);
      * int numberOfServices = hwm.getNumOfHelloServices();
-     * assertEquals(numberOfServices, 2); 
+     * assertEquals(2, numberOfServices); 
      */
     ctx.stop();
     manager.uninstall(ctx);
    
   }
 
+
+
+  //Test for JIRA-461 which currently fails.
+  @Test
+  public void testTwitter() throws Exception
+  {
+    RepositoryAdmin repositoryAdmin = getOsgiService(RepositoryAdmin.class);
+    Repository[] repos = repositoryAdmin.listRepositories();
+    for (Repository repo : repos) {
+      repositoryAdmin.removeRepository(repo.getURI());
+    }
+
+    
+    // Use the superclasses' getUrlToEba() method instead of the pax-exam mavenBundle() method because pax-exam is running in a
+    // diffference bundle which doesn't have visibility to the META-INF/maven/dependencies.properties file used to figure out the
+    // version of the maven artifact.
+    URL twitterEbaUrl = getUrlToEba("org.apache.aries.application.itest.twitter",
+        "org.apache.aries.application.itest.twitter.eba");
+
+    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    repositoryAdmin.addRepository("http://sigil.codecauldron.org/spring-external.obr");
+    AriesApplication app = manager.createApplication(twitterEbaUrl);
+    app = manager.resolve(app);
+    DeploymentMetadata depMeta = app.getDeploymentMetadata();
+    List<DeploymentContent> provision = depMeta.getApplicationProvisionBundles();
+    Collection<DeploymentContent> useBundles = depMeta.getDeployedUseBundle();
+    Collection<DeploymentContent> appContent = depMeta.getApplicationDeploymentContents();
+    // We cannot be sure whether there are two or three provision bundles pulled in by Felix OBR as there is an outstanding defect
+    // https://issues.apache.org/jira/browse/FELIX-2672
+    // The workaround is to check we get the two bunldes we are looking for, instead of insisting on just having two bundles.
+    
+    List<String> provisionBundleSymbolicNames = new ArrayList<String>();
+    for (DeploymentContent dep : provision) {
+       provisionBundleSymbolicNames.add(dep.getContentName());
+    }
+    String provision_bundle1 = "com.springsource.org.apache.commons.lang";
+    String provision_bundle2 = "twitter4j";
+    assertTrue("Bundle " + provision_bundle1 + " not found.", provisionBundleSymbolicNames.contains(provision_bundle1));
+    assertTrue("Bundle " + provision_bundle2 + " not found.", provisionBundleSymbolicNames.contains(provision_bundle2));
+    assertEquals(useBundles.toString(), 0, useBundles.size());
+    assertEquals(appContent.toString(), 1, appContent.size());
+    AriesApplicationContext ctx = manager.install(app);
+    ctx.start();
+  }
+  
   private void generateOBRRepoXML(boolean nullURI, String ... bundleFiles) throws Exception
   {
     Set<ModelledResource> mrs = new HashSet<ModelledResource>();

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/application/application-management/src/test/java/org/apache/aries/application/management/impl/AriesApplicationManagerImplTest.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/application/application-management/src/test/java/org/apache/aries/application/management/impl/AriesApplicationManagerImplTest.java?rev=1027954&r1=1027953&r2=1027954&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/application/application-management/src/test/java/org/apache/aries/application/management/impl/AriesApplicationManagerImplTest.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/application/application-management/src/test/java/org/apache/aries/application/management/impl/AriesApplicationManagerImplTest.java Wed Oct 27 13:29:36 2010
@@ -147,11 +147,8 @@ public class AriesApplicationManagerImpl
       return null;
     }
 
-    public DeployedBundles generateDeployedBundles(String appName,
-        String appVersion, Collection<Content> appContent,
-        Collection<ModelledResource> byValueBundles,
-        Collection<Content> useBundleSet, Collection<Content> otherBundles,
-        Collection<ServiceDeclaration> appImportServices)
+    public DeployedBundles generateDeployedBundles(ApplicationMetadata appMetadata,
+        Collection<ModelledResource> byValueBundles, Collection<Content> otherBundles)
         throws ResolverException {
       // Not required or used in this test
       return null;

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/application/application-noop-postresolve-process/src/main/java/org/apache/aries/application/noop/postresolve/process/impl/DefaultPostResolveTransformer.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/application/application-noop-postresolve-process/src/main/java/org/apache/aries/application/noop/postresolve/process/impl/DefaultPostResolveTransformer.java?rev=1027954&r1=1027953&r2=1027954&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/application/application-noop-postresolve-process/src/main/java/org/apache/aries/application/noop/postresolve/process/impl/DefaultPostResolveTransformer.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/application/application-noop-postresolve-process/src/main/java/org/apache/aries/application/noop/postresolve/process/impl/DefaultPostResolveTransformer.java Wed Oct 27 13:29:36 2010
@@ -18,6 +18,8 @@
  */
 
 package org.apache.aries.application.noop.postresolve.process.impl;
+
+import org.apache.aries.application.ApplicationMetadata;
 import org.apache.aries.application.management.ResolverException;
 import org.apache.aries.application.management.spi.resolve.PostResolveTransformer;
 import org.apache.aries.application.modelling.DeployedBundles;
@@ -28,7 +30,7 @@ public class DefaultPostResolveTransform
 {
 
   @Override
-  public DeployedBundles postResolveProcess(DeployedBundles deployedBundles)
+  public DeployedBundles postResolveProcess(ApplicationMetadata appMetadata, DeployedBundles deployedBundles)
       throws ResolverException
   {
     

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/application/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/application/pom.xml?rev=1027954&r1=1027953&r2=1027954&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/application/pom.xml (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/application/pom.xml Wed Oct 27 13:29:36 2010
@@ -226,6 +226,7 @@
         <module>application-noop-platform-repository</module>
 	   <module>application-noop-postresolve-process</module>
 	   <module>application-default-local-platform</module>
+        <module>application-itest-twitter</module>
 
     </modules>
 

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-blueprint-aries/src/main/java/org/apache/aries/jpa/blueprint/aries/impl/NSHandler.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-blueprint-aries/src/main/java/org/apache/aries/jpa/blueprint/aries/impl/NSHandler.java?rev=1027954&r1=1027953&r2=1027954&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-blueprint-aries/src/main/java/org/apache/aries/jpa/blueprint/aries/impl/NSHandler.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-blueprint-aries/src/main/java/org/apache/aries/jpa/blueprint/aries/impl/NSHandler.java Wed Oct 27 13:29:36 2010
@@ -383,7 +383,7 @@ public class NSHandler implements Namesp
           .append("=*))");
       else
           filter.append("(").append(PersistenceContextProvider.PROXY_FACTORY_EMF_ATTRIBUTE)
-                  .append("=*)");
+                  .append("=true)");
 
       // Add the empty name filter if necessary
       if (!"".equals(unitName))

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-blueprint-aries/src/test/java/org/apache/aries/jpa/blueprint/aries/test/NSHandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-blueprint-aries/src/test/java/org/apache/aries/jpa/blueprint/aries/test/NSHandlerTest.java?rev=1027954&r1=1027953&r2=1027954&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-blueprint-aries/src/test/java/org/apache/aries/jpa/blueprint/aries/test/NSHandlerTest.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-blueprint-aries/src/test/java/org/apache/aries/jpa/blueprint/aries/test/NSHandlerTest.java Wed Oct 27 13:29:36 2010
@@ -271,7 +271,7 @@ public class NSHandlerTest {
     ReferenceMetadata reference = (ReferenceMetadata) registeredComponents.get(0);
     
     assertEquals(EntityManagerFactory.class.getName(), reference.getInterface());
-    assertEquals("(&(org.apache.aries.jpa.proxy.factory=*)(osgi.unit.name=myUnit))", reference.getFilter());
+    assertEquals("(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name=myUnit))", reference.getFilter());
     
     Map<String,Object> props = new HashMap<String, Object>();
     props.put(PersistenceContextProvider.PERSISTENCE_CONTEXT_TYPE, PersistenceContextType.TRANSACTION);
@@ -293,7 +293,7 @@ public class NSHandlerTest {
     ReferenceMetadata reference = (ReferenceMetadata) registeredComponents.get(0);
     
     assertEquals(EntityManagerFactory.class.getName(), reference.getInterface());
-    assertEquals("(&(org.apache.aries.jpa.proxy.factory=*)(osgi.unit.name=myUnit))", reference.getFilter());
+    assertEquals("(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name=myUnit))", reference.getFilter());
     
     Map<String,Object> props = new HashMap<String, Object>();
     props.put(PersistenceContextProvider.PERSISTENCE_CONTEXT_TYPE, PersistenceContextType.TRANSACTION);
@@ -317,7 +317,7 @@ public class NSHandlerTest {
     ReferenceMetadata reference = (ReferenceMetadata) registeredComponents.get(0);
     
     assertEquals(EntityManagerFactory.class.getName(), reference.getInterface());
-    assertEquals("(&(org.apache.aries.jpa.proxy.factory=*)(osgi.unit.name=myUnit))", reference.getFilter());
+    assertEquals("(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name=myUnit))", reference.getFilter());
     
     Map<String,Object> props = new HashMap<String, Object>();
     props.put(PersistenceContextProvider.PERSISTENCE_CONTEXT_TYPE, PersistenceContextType.TRANSACTION);
@@ -341,7 +341,7 @@ public class NSHandlerTest {
     ReferenceMetadata reference = (ReferenceMetadata) registeredComponents.get(0);
     
     assertEquals(EntityManagerFactory.class.getName(), reference.getInterface());
-    assertEquals("(&(org.apache.aries.jpa.proxy.factory=*)(osgi.unit.name=myUnit))", reference.getFilter());
+    assertEquals("(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name=myUnit))", reference.getFilter());
     
     Map<String,Object> props = new HashMap<String, Object>();
     props.put(PersistenceContextProvider.PERSISTENCE_CONTEXT_TYPE, PersistenceContextType.TRANSACTION);
@@ -362,7 +362,7 @@ public class NSHandlerTest {
     ReferenceMetadata reference = (ReferenceMetadata) registeredComponents.get(0);
     
     assertEquals(EntityManagerFactory.class.getName(), reference.getInterface());
-    assertEquals("(&(org.apache.aries.jpa.proxy.factory=*)"+NSHandler.EMPTY_UNIT_NAME_FILTER+")", 
+    assertEquals("(&(org.apache.aries.jpa.proxy.factory=true)"+NSHandler.EMPTY_UNIT_NAME_FILTER+")", 
         reference.getFilter());
     
     Map<String,Object> props = new HashMap<String, Object>();
@@ -386,7 +386,7 @@ public class NSHandlerTest {
     ReferenceMetadata reference = (ReferenceMetadata) registeredComponents.get(0);
     
     assertEquals(EntityManagerFactory.class.getName(), reference.getInterface());
-    assertEquals("(&(org.apache.aries.jpa.proxy.factory=*)"+NSHandler.EMPTY_UNIT_NAME_FILTER+")", 
+    assertEquals("(&(org.apache.aries.jpa.proxy.factory=true)"+NSHandler.EMPTY_UNIT_NAME_FILTER+")", 
         reference.getFilter());
     
     Map<String,Object> props = new HashMap<String, Object>();
@@ -452,7 +452,7 @@ public class NSHandlerTest {
       reference = (ReferenceMetadata) registeredComponents.get(0);
       
       assertEquals(EntityManagerFactory.class.getName(), reference.getInterface());
-      assertEquals("(&(org.apache.aries.jpa.proxy.factory=*)(osgi.unit.name=myUnit))", reference.getFilter());
+      assertEquals("(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name=myUnit))", reference.getFilter());
       
       Map<String,Object> props = new HashMap<String, Object>();
       props.put(PersistenceContextProvider.PERSISTENCE_CONTEXT_TYPE, PersistenceContextType.TRANSACTION);
@@ -499,7 +499,7 @@ public class NSHandlerTest {
       reference = (ReferenceMetadata) registeredComponents.get(0);
       
       assertEquals(EntityManagerFactory.class.getName(), reference.getInterface());
-      assertEquals("(&(org.apache.aries.jpa.proxy.factory=*)(osgi.unit.name=myUnit))", reference.getFilter());
+      assertEquals("(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name=myUnit))", reference.getFilter());
       
       Map<String,Object> props = new HashMap<String, Object>();
       props.put(PersistenceContextProvider.PERSISTENCE_CONTEXT_TYPE, PersistenceContextType.TRANSACTION);

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/proxy/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Oct 27 13:29:36 2010
@@ -0,0 +1,4 @@
+.settings
+target
+.classpath
+.project

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-api/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Oct 27 13:29:36 2010
@@ -0,0 +1,4 @@
+.settings
+target
+.classpath
+.project

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-bundle/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Oct 27 13:29:36 2010
@@ -0,0 +1,4 @@
+.settings
+target
+.classpath
+.project

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-impl/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Oct 27 13:29:36 2010
@@ -0,0 +1,4 @@
+.settings
+target
+.classpath
+.project

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/transaction/transaction-blueprint/src/main/resources/org/apache/aries/transaction/parsing/transactionv11.xsd
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/transaction/transaction-blueprint/src/main/resources/org/apache/aries/transaction/parsing/transactionv11.xsd?rev=1027954&r1=1027953&r2=1027954&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/transaction/transaction-blueprint/src/main/resources/org/apache/aries/transaction/parsing/transactionv11.xsd (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/transaction/transaction-blueprint/src/main/resources/org/apache/aries/transaction/parsing/transactionv11.xsd Wed Oct 27 13:29:36 2010
@@ -54,7 +54,8 @@
         <xsd:annotation>
             <xsd:documentation>
         <![CDATA[
-          Ttransaction defines one or more methods that are intercepted with the specified transaction attribute. Multiple methods names can be wild-carded with '*'.  Methods can be whitespace separated and be a mixture of fixed string and wild-cards. The bean attribute refers to the bean component id and can only be used for top level transaction element.  Similar as methods, beans can be whitespace separated and be a mixture of fixed string and wild-cards.   Two wild-cards next to each other are not supported for either the bean or method attribute.        ]]>
+            The Ttransaction defines one or more methods that are intercepted with the specified transaction attribute. Multiple methods names can be wild-carded with a '*'.  Method can be a mixture of fixed string and one wild-card.   Methods can be whitespace or comma separated. The bean attribute refers to the bean component id and can only be used for top level transaction element.  Similar as methods, beans can be whitespace separated and be a mixture of fixed string and one wild-card.
+        ]]>
             </xsd:documentation>
         </xsd:annotation>
         <xsd:attribute name="method" type="xsd:string" />

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/util/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/util/pom.xml?rev=1027954&r1=1027953&r2=1027954&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/util/pom.xml (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/util/pom.xml Wed Oct 27 13:29:36 2010
@@ -42,6 +42,7 @@
         <aries.osgi.export.pkg>
             org.apache.aries.util;
             org.apache.aries.util.tracker;
+            org.apache.aries.util.nls;
         </aries.osgi.export.pkg>
         <aries.osgi.import.pkg>
             !org.apache.aries.util*,

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/util/src/main/java/org/apache/aries/util/FragmentBuilder.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/util/src/main/java/org/apache/aries/util/FragmentBuilder.java?rev=1027954&r1=1027953&r2=1027954&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/util/src/main/java/org/apache/aries/util/FragmentBuilder.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/util/src/main/java/org/apache/aries/util/FragmentBuilder.java Wed Oct 27 13:29:36 2010
@@ -31,6 +31,7 @@ import java.util.jar.JarEntry;
 import java.util.jar.JarOutputStream;
 import java.util.jar.Manifest;
 
+import org.apache.aries.util.internal.MessageUtil;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;
@@ -256,7 +257,7 @@ public class FragmentBuilder {
             } else if ((expecting & CHAR) > 0) {            
                 sb.append(c);
             } else {
-                throw new IllegalArgumentException("Invalid delimited string: " + value);
+                throw new IllegalArgumentException(MessageUtil.getMessage("UTIL0012E", value));
             }
         }
 

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/util/src/main/java/org/apache/aries/util/VersionRange.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/util/src/main/java/org/apache/aries/util/VersionRange.java?rev=1027954&r1=1027953&r2=1027954&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/util/src/main/java/org/apache/aries/util/VersionRange.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/util/src/main/java/org/apache/aries/util/VersionRange.java Wed Oct 27 13:29:36 2010
@@ -51,21 +51,25 @@ public final class VersionRange {
      */
     public VersionRange(String version) {
         this.version = version;
-        processVersionAttribute(this.version);
+        processVersionAttribute(version);
     }
 
     /**
-     * 
+     * This method should be used to create a version range from a single
+     * version string.
      * @param version
      *            version for the versioninfo
      * @param exactVersion
-     *            whether this is an exact version
+     *            whether this is an exact version {@code true} or goes to infinity
+     *            {@code false}
      */
     public VersionRange(String version, boolean exactVersion) {
-        this.version = version;
+        
         if (exactVersion) {
-            processExactVersionAttribute(this.version);
+            // Do not store this string as it might be just a version, or a range!
+            processExactVersionAttribute(version);
         } else {
+            this.version = version;
             processVersionAttribute(this.version);
         }
 
@@ -101,7 +105,8 @@ public final class VersionRange {
      */
     @Override
     public String toString() {
-        // Some constructors don't take in a string, so construct one if needed
+        // Some constructors don't take in a string that we can return directly, 
+        // so construct one if needed
         if (version == null) {
             if (maximumVersion == null) {
                 version = minimumVersion.toString();

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/util/src/main/resources/org/apache/aries/util/messages/UTILmessages.properties
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/util/src/main/resources/org/apache/aries/util/messages/UTILmessages.properties?rev=1027954&r1=1027953&r2=1027954&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/util/src/main/resources/org/apache/aries/util/messages/UTILmessages.properties (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/util/src/main/resources/org/apache/aries/util/messages/UTILmessages.properties Wed Oct 27 13:29:36 2010
@@ -20,3 +20,6 @@ UTIL0008E=UTIL0008E: Unable to parse the
 UTIL0009E=UTIL0009E: Unable to parse the version. Could not parse {0}.
 UTIL0010E=UTIL0010E: Unable to parse the version. Could not parse empty string.
 UTIL0011E=UTIL0011E: Unable to parse {0} for the exact version. Could not parse {0}.
+UTIL0012E=UTIL0012E: The string {0} is not correctly delimited.
+UTIL0013E=UTIL0013E: The resource bundle format {0} is not supported.
+UTIL0014E=UTIL0014E: Unable to determine which Bundle was trying to load the message ResourceBundle {0}.



Mime
View raw message