Backed out changeset d152fbd22bdd
authorMartin Taal <martin.taal@openbravo.com>
Tue, 05 Nov 2013 17:40:38 +0100
changeset 21416 62cfb2e198ef
parent 21415 d152fbd22bdd
child 21417 900483c4a614
Backed out changeset d152fbd22bdd
To revert the change to .project
.project
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseComponentProvider.java
--- a/.project	Tue Nov 05 10:50:44 2013 +0100
+++ b/.project	Tue Nov 05 17:40:38 2013 +0100
@@ -23,11 +23,4 @@
 		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
 		<nature>org.openarchitectureware.base.oawNature</nature>
 	</natures>
-	<linkedResources>
-		<link>
-			<name>modules/org.openbravo.client.analytics/mondrian-3.5.0-src</name>
-			<type>2</type>
-			<location>/home/mtaal/mydownloads/reporting/mondrian/mondrian-3.5.0/mondrian-3.5.0-src</location>
-		</link>
-	</linkedResources>
 </projectDescription>
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseComponentProvider.java	Tue Nov 05 10:50:44 2013 +0100
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseComponentProvider.java	Tue Nov 05 17:40:38 2013 +0100
@@ -25,7 +25,10 @@
 import java.util.List;
 import java.util.Map;
 
-import org.openbravo.base.weld.WeldUtils;
+import javax.enterprise.inject.Any;
+import javax.enterprise.inject.Instance;
+import javax.inject.Inject;
+
 import org.openbravo.client.kernel.BaseComponentProvider.ComponentResource.ComponentResourceType;
 import org.openbravo.model.ad.module.Module;
 
@@ -40,6 +43,10 @@
 
   private static Map<String, List<String>> appDependencies = new HashMap<String, List<String>>();
 
+  @Inject
+  @Any
+  private Instance<Component> components;
+
   /**
    * Return a component of the correct implementation using Weld.
    * 
@@ -48,7 +55,7 @@
    * @return an instance of clz
    */
   protected <U extends Component> U getComponent(Class<U> clz) {
-    return (U) WeldUtils.getInstanceFromStaticBeanManager(clz);
+    return (U) components.select(clz).get();
   }
 
   public Module getModule() {