You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-commits@ws.apache.org by da...@apache.org on 2006/08/24 19:57:07 UTC
svn commit: r434448 -
/webservices/muse/trunk/modules/muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/axis2/Axis2Environment.java
Author: danj
Date: Thu Aug 24 10:57:07 2006
New Revision: 434448
URL: http://svn.apache.org/viewvc?rev=434448&view=rev
Log:
Applied Joel's patch from MUSE-75. I added a re-throw to the empty catch block at the end of getDataResource()
so that I/O errors would be reported.
Modified:
webservices/muse/trunk/modules/muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/axis2/Axis2Environment.java
Modified: webservices/muse/trunk/modules/muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/axis2/Axis2Environment.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/axis2/Axis2Environment.java?rev=434448&r1=434447&r2=434448&view=diff
==============================================================================
--- webservices/muse/trunk/modules/muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/axis2/Axis2Environment.java (original)
+++ webservices/muse/trunk/modules/muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/axis2/Axis2Environment.java Thu Aug 24 10:57:07 2006
@@ -18,6 +18,7 @@
package org.apache.muse.core.platform.osgi.axis2;
import java.io.File;
+import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.InetAddress;
@@ -245,11 +246,23 @@
}
}
}
-
+
if (input == null)
input = this.getClass().getResourceAsStream(path);
if (input == null)
input = this.getClass().getResourceAsStream("/OSGI-INF/" + path);
+ if (input == null){
+ input = OSGiReflectUtilHelper.getDefault().getResource(path);
+ }
+ if(input == null && bundle != null){
+ try {
+ File file = BundleRootHelper.getRootForBundle(bundle);
+ File lastTry = new File(file.getAbsolutePath() +"/"+ path);
+ input = new FileInputStream(lastTry);
+ } catch(Throwable t){
+ throw new RuntimeException(t.getMessage(), t);
+ }
+ }
return input;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-commits-help@ws.apache.org