You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2009/01/06 05:49:44 UTC

svn commit: r731829 - in /activemq/camel/branches/camel-1.x: ./ components/camel-osgi/src/main/java/org/apache/camel/osgi/Activator.java components/camel-osgi/src/main/java/org/apache/camel/osgi/OsgiComponentResolver.java

Author: ningjiang
Date: Mon Jan  5 20:49:43 2009
New Revision: 731829

URL: http://svn.apache.org/viewvc?rev=731829&view=rev
Log:
Merged revisions 731824 via svnmerge from 
https://svn.apache.org/repos/asf/activemq/camel/trunk

........
  r731824 | ningjiang | 2009-01-06 12:30:23 +0800 (Tue, 06 Jan 2009) | 1 line
  
  CAMEL-1221 Fixed the osgi plateform test error
........

Modified:
    activemq/camel/branches/camel-1.x/   (props changed)
    activemq/camel/branches/camel-1.x/components/camel-osgi/src/main/java/org/apache/camel/osgi/Activator.java
    activemq/camel/branches/camel-1.x/components/camel-osgi/src/main/java/org/apache/camel/osgi/OsgiComponentResolver.java

Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jan  5 20:49:43 2009
@@ -1 +1 @@
-/activemq/camel/trunk:709850,711200,711206,711219-711220,711523,711531,711756,711784,711859,711874,711962,711971,712064,712119,712148,712662,712692,712925,713013,713107,713136,713273,713290,713292,713295,713314,713475,713625,713932,713944,714032,717965,717989,718242,718273,718312-718515,719163-719184,719334,719339,719524,719662,719848,719851,719855,719864,719978-719979,720207,720435-720437,720806,721272,721331,721333-721334,721360,721669,721764,721813,721985,722005,722070,722110,722415,722438,722726,722845,722878,723264,723314,723325-723327,723409,723835,723966,724122,724619,724681,725040,725309-725320,725340,725351,725569-725572,725612,725652-725660,725715,725883,726339,726640-726645,726932,727113,727375,727377,727624,727713,727946,729401,729892,730069,730132,730154,730157,730275,730299,730504-730505,730508,730571,730599,730759,730903,730916,730923,730936,730992,731126,731168-731169,731488,731492,731799
+/activemq/camel/trunk:709850,711200,711206,711219-711220,711523,711531,711756,711784,711859,711874,711962,711971,712064,712119,712148,712662,712692,712925,713013,713107,713136,713273,713290,713292,713295,713314,713475,713625,713932,713944,714032,717965,717989,718242,718273,718312-718515,719163-719184,719334,719339,719524,719662,719848,719851,719855,719864,719978-719979,720207,720435-720437,720806,721272,721331,721333-721334,721360,721669,721764,721813,721985,722005,722070,722110,722415,722438,722726,722845,722878,723264,723314,723325-723327,723409,723835,723966,724122,724619,724681,725040,725309-725320,725340,725351,725569-725572,725612,725652-725660,725715,725883,726339,726640-726645,726932,727113,727375,727377,727624,727713,727946,729401,729892,730069,730132,730154,730157,730275,730299,730504-730505,730508,730571,730599,730759,730903,730916,730923,730936,730992,731126,731168-731169,731488,731492,731799,731824

Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: activemq/camel/branches/camel-1.x/components/camel-osgi/src/main/java/org/apache/camel/osgi/Activator.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-osgi/src/main/java/org/apache/camel/osgi/Activator.java?rev=731829&r1=731828&r2=731829&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-osgi/src/main/java/org/apache/camel/osgi/Activator.java (original)
+++ activemq/camel/branches/camel-1.x/components/camel-osgi/src/main/java/org/apache/camel/osgi/Activator.java Mon Jan  5 20:49:43 2009
@@ -84,7 +84,8 @@
         
     }
 
-    protected void addComponentEntry(Enumeration e, Map<String, ComponentEntry> entries) {
+    protected synchronized void addComponentEntry(String entryPath, Bundle bundle, Map<String, ComponentEntry> entries) {
+        Enumeration e = bundle.getEntryPaths(entryPath);
         if (e != null) {
             while (e.hasMoreElements()) {
                 String path = (String)e.nextElement();
@@ -101,9 +102,9 @@
         
     }
 
-    protected synchronized void mayBeAddComponentAndLanguageFor(Bundle bundle) {        
-        addComponentEntry(bundle.getEntryPaths(META_INF_COMPONENT), COMPONENTS);
-        addComponentEntry(bundle.getEntryPaths(META_INF_LANGUAGE), LANGUAGES);
+    protected void mayBeAddComponentAndLanguageFor(Bundle bundle) {        
+        addComponentEntry(META_INF_COMPONENT, bundle, COMPONENTS);
+        addComponentEntry(META_INF_LANGUAGE, bundle, LANGUAGES);
     }
     
     protected synchronized void mayBeAddTypeConverterFor(Bundle bundle) {
@@ -127,7 +128,7 @@
         }
     }
 
-    protected synchronized void mayBeRemoveComponentAndLanguageFor(Bundle bundle) {
+    protected void mayBeRemoveComponentAndLanguageFor(Bundle bundle) {
         removeComponentEntry(bundle, COMPONENTS);
         removeComponentEntry(bundle, LANGUAGES);        
     }
@@ -251,13 +252,16 @@
         return getClassFromEntries(name, LANGUAGES);
     }
     
-    protected static Class getClassFromEntries(String name, Map<String, ComponentEntry> entries) throws Exception {
+    protected static synchronized Class getClassFromEntries(String name, Map<String, ComponentEntry> entries) throws Exception {
         ComponentEntry entry = entries.get(name);
         if (entry == null) {
             return null;
         }
         if (entry.type == null) {
             URL url = entry.bundle.getEntry(entry.path);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("The entry " + name + "'s url is" + url);
+            }
             // lets load the file
             Properties properties = new Properties();
             BufferedInputStream reader = null;

Modified: activemq/camel/branches/camel-1.x/components/camel-osgi/src/main/java/org/apache/camel/osgi/OsgiComponentResolver.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-osgi/src/main/java/org/apache/camel/osgi/OsgiComponentResolver.java?rev=731829&r1=731828&r2=731829&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-osgi/src/main/java/org/apache/camel/osgi/OsgiComponentResolver.java (original)
+++ activemq/camel/branches/camel-1.x/components/camel-osgi/src/main/java/org/apache/camel/osgi/OsgiComponentResolver.java Mon Jan  5 20:49:43 2009
@@ -38,7 +38,7 @@
     
     private static final transient Log LOG = LogFactory.getLog(OsgiComponentResolver.class);
 
-    protected synchronized Class getComponent(String name) throws Exception {
+    protected Class getComponent(String name) throws Exception {
         return Activator.getComponent(name);       
     }