[jboss-cvs] JBossAS SVN: r97214 - projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Dec 1 05:29:20 EST 2009


Author: thomas.diesler at jboss.com
Date: 2009-12-01 05:29:20 -0500 (Tue, 01 Dec 2009)
New Revision: 97214

Modified:
   projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemoteBundle.java
Log:
Fix issue with remote access of already uninstalled bundle

Modified: projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemoteBundle.java
===================================================================
--- projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemoteBundle.java	2009-12-01 10:28:17 UTC (rev 97213)
+++ projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemoteBundle.java	2009-12-01 10:29:20 UTC (rev 97214)
@@ -49,6 +49,9 @@
    private ManagedBundleMBean bundle;
    private BundleInfo bundleInfo;
    private String location;
+   
+   private long bundleId;
+   private String symbolicName;
    private Version version;
    
    public RemoteBundle(OSGiRuntimeImpl runtime, ManagedBundleMBean bundle, BundleInfo bundleInfo)
@@ -63,8 +66,12 @@
       super(runtime);
       this.bundle = bundle;
       
+      // Initialize cached properties to avoid remote access 
+      bundleId = bundle.getBundleId();
+      symbolicName = bundle.getSymbolicName();
+      
       String versionStr = getHeaders().get(Constants.BUNDLE_VERSION);
-      this.version = Version.parseVersion(versionStr);
+      version = Version.parseVersion(versionStr);
    }
 
    @Override
@@ -76,13 +83,13 @@
    @Override
    public long getBundleId()
    {
-      return bundle.getBundleId();
+      return bundleId;
    }
 
    @Override
    public String getSymbolicName()
    {
-      return bundle.getSymbolicName();
+      return symbolicName;
    }
 
    @Override




More information about the jboss-cvs-commits mailing list