You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by ge...@apache.org on 2009/04/18 07:43:06 UTC
svn commit: r766219 - in
/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans:
config/ spi/deployer/ spi/ee/deployer/ spi/se/deployer/
Author: gerdogdu
Date: Sat Apr 18 05:43:05 2009
New Revision: 766219
URL: http://svn.apache.org/viewvc?rev=766219&view=rev
Log:
OWB-90 Can not find beans. Change Set<String> --> Set<URL> in MetaDataDiscoveryService.getWebBeansXML
Modified:
incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java
incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/deployer/AbstractMetaDataDiscovery.java
incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/deployer/MetaDataDiscoveryService.java
incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/ee/deployer/WarMetaDataDiscoveryImpl.java
incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/se/deployer/MetaDataDiscoveryStandard.java
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java?rev=766219&r1=766218&r2=766219&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java Sat Apr 18 05:43:05 2009
@@ -13,13 +13,12 @@
*/
package org.apache.webbeans.config;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
+import java.net.URL;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
@@ -250,19 +249,21 @@
{
logger.info("Deploying configurations from XML files is started");
- Set<String> xmlLocations = scanner.getWebBeansXmlLocations();
- Iterator<String> it = xmlLocations.iterator();
+ Set<URL> xmlLocations = scanner.getWebBeansXmlLocations();
+ Iterator<URL> it = xmlLocations.iterator();
while (it.hasNext())
{
- String fileName = it.next();
- FileInputStream fis = null;
+ URL fileURL = it.next();
+ String fileName = fileURL.getFile();
+ InputStream fis = null;
try
{
- fis = new FileInputStream(fileName);
+ fis = fileURL.openStream();
+
this.xmlConfigurator.configure(fis, fileName);
}
- catch (FileNotFoundException e)
+ catch (IOException e)
{
throw new WebBeansDeploymentException(e);
}
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/deployer/AbstractMetaDataDiscovery.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/deployer/AbstractMetaDataDiscovery.java?rev=766219&r1=766218&r2=766219&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/deployer/AbstractMetaDataDiscovery.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/deployer/AbstractMetaDataDiscovery.java Sat Apr 18 05:43:05 2009
@@ -17,9 +17,8 @@
package org.apache.webbeans.spi.deployer;
-import java.io.InputStream;
+import java.net.URL;
import java.util.Collections;
-import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
@@ -31,7 +30,7 @@
public abstract class AbstractMetaDataDiscovery implements MetaDataDiscoveryService
{
/** Location of the beans.xml files. */
- private Set<String> webBeansXmlLocations = new HashSet<String>();
+ private Set<URL> webBeansXmlLocations = new HashSet<URL>();
//private Map<String, InputStream> EJB_XML_LOCATIONS = new HashMap<String, InputStream>();
@@ -88,7 +87,7 @@
/**
* @return the wEBBEANS_XML_LOCATIONS
*/
- public Set<String> getWebBeansXmlLocations()
+ public Set<URL> getWebBeansXmlLocations()
{
return Collections.unmodifiableSet(webBeansXmlLocations);
}
@@ -115,7 +114,7 @@
* add the given beans.xml path to the locations list
* @param file location path
*/
- protected void addWebBeansXmlLocation(String file)
+ protected void addWebBeansXmlLocation(URL file)
{
webBeansXmlLocations.add(file);
}
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/deployer/MetaDataDiscoveryService.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/deployer/MetaDataDiscoveryService.java?rev=766219&r1=766218&r2=766219&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/deployer/MetaDataDiscoveryService.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/deployer/MetaDataDiscoveryService.java Sat Apr 18 05:43:05 2009
@@ -16,6 +16,7 @@
*/
package org.apache.webbeans.spi.deployer;
+import java.net.URL;
import java.util.Map;
import java.util.Set;
@@ -46,7 +47,7 @@
/**
* @return the locations of the beans.xml files.
*/
- public Set<String> getWebBeansXmlLocations();
+ public Set<URL> getWebBeansXmlLocations();
/**
* Get all scanned classes and all annotations used by each very class.
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/ee/deployer/WarMetaDataDiscoveryImpl.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/ee/deployer/WarMetaDataDiscoveryImpl.java?rev=766219&r1=766218&r2=766219&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/ee/deployer/WarMetaDataDiscoveryImpl.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/ee/deployer/WarMetaDataDiscoveryImpl.java Sat Apr 18 05:43:05 2009
@@ -114,7 +114,7 @@
listURL.add(url);
- addWebBeansXmlLocation(addPath.getFile());
+ addWebBeansXmlLocation(addPath);
}
}
@@ -133,7 +133,7 @@
if (url != null)
{
- addWebBeansXmlLocation(url.getFile());
+ addWebBeansXmlLocation(url);
return WarUrlFinder.findWebInfClassesPath(this.servletContext);
}
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/se/deployer/MetaDataDiscoveryStandard.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/se/deployer/MetaDataDiscoveryStandard.java?rev=766219&r1=766218&r2=766219&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/se/deployer/MetaDataDiscoveryStandard.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/se/deployer/MetaDataDiscoveryStandard.java Sat Apr 18 05:43:05 2009
@@ -56,7 +56,7 @@
while (resources.hasMoreElements())
{
URL resource = resources.nextElement();
- addWebBeansXmlLocation(resource.getFile());
+ addWebBeansXmlLocation(resource);
}
}