Author: isilval
Date: Mon Feb 26 06:41:34 2007
New Revision: 511825

URL: http://svn.apache.org/viewvc?view=rev&rev=511825
Log:
remove hack

Modified:
    
incubator/tuscany/sandbox/isilval/notification/local/src/main/java/org/apache/tuscany/notification/local/NotificationComponentTypeLoader.java
    
incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/NotificationImplementationLoaderTestCase.java

Modified: 
incubator/tuscany/sandbox/isilval/notification/local/src/main/java/org/apache/tuscany/notification/local/NotificationComponentTypeLoader.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/sandbox/isilval/notification/local/src/main/java/org/apache/tuscany/notification/local/NotificationComponentTypeLoader.java?view=diff&rev=511825&r1=511824&r2=511825
==============================================================================
--- 
incubator/tuscany/sandbox/isilval/notification/local/src/main/java/org/apache/tuscany/notification/local/NotificationComponentTypeLoader.java
 (original)
+++ 
incubator/tuscany/sandbox/isilval/notification/local/src/main/java/org/apache/tuscany/notification/local/NotificationComponentTypeLoader.java
 Mon Feb 26 06:41:34 2007
@@ -47,8 +47,7 @@
 
     public void load(NotificationImplementation implementation,
                      DeploymentContext deploymentContext) throws 
LoaderException {
-        Class<?> implClass = this.getClass(); // FIXME Hack, for Java, this is 
the implClass, Ruby uses the script class loader
-        URL resource = 
implClass.getClassLoader().getResource(implementation.getComponentTypeName() + 
".componentType");
+        URL resource = 
deploymentContext.getClassLoader().getResource(implementation.getComponentTypeName()
 + ".componentType");
         NotificationComponentType componentType;
         if (resource == null) {
             throw new LoaderException("Can't locate component type side file 
for [" + implementation.getComponentTypeName() + "]");

Modified: 
incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/NotificationImplementationLoaderTestCase.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/NotificationImplementationLoaderTestCase.java?view=diff&rev=511825&r1=511824&r2=511825
==============================================================================
--- 
incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/NotificationImplementationLoaderTestCase.java
 (original)
+++ 
incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/NotificationImplementationLoaderTestCase.java
 Mon Feb 26 06:41:34 2007
@@ -49,6 +49,7 @@
 
     public void testLoad() throws Exception {
         DeploymentContext deploymentContext = 
EasyMock.createMock(DeploymentContext.class);
+        
EasyMock.expect(deploymentContext.getClassLoader()).andReturn(this.getClass().getClassLoader());
         EasyMock.replay(deploymentContext);
 
         LoaderRegistry registry = new MockLoaderRegistry();



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to