On Sep 13, 2007, at 6:37 PM, David Blevins wrote:
Our build seems to lock up in
[INFO] Building OpenEJB :: Server :: EJBd
....
Running
org.apache.openejb.SomeoneBrokeSurefireAndThisIsADirtyHackForItTest
....
INFO - Loaded Module: /Users/dblevins/work/openejb3/itests/
openejb-itests-beans/target/openejb-itests-beans-3.0.0-SNAPSHOT.jar
INFO - Configuring app: /Users/dblevins/work/openejb3/container/
openejb-core/target/openejb-core-3.0.0-SNAPSHOT.jar
INFO - Loaded Module: /Users/dblevins/work/openejb3/container/
openejb-core/target/openejb-core-3.0.0-SNAPSHOT.jar
We definitely need to fix it before release.
I'll try and dig into it (probably my fault :), but if someone
could help pinpoint the exact version this started in that would be
super.
This seems to be the problematic change. Going to hang it up for the
night. If someone feels like poking around here it appears to be.
Nothing jumps out to me initially.
Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/
org/apache/openejb/config/ConfigurationFactory.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/
openejb-core/src/main/java/org/apache/openejb/config/
ConfigurationFactory.java?rev=575130&r1=575129&r2=575130&view=di\
ff
========================================================================
======
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/
apache/openejb/config/ConfigurationFactory.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/
apache/openejb/config/ConfigurationFactory.java Wed Sep 12 16:53:12 2007
@@ -513,6 +513,7 @@
}
info.service = provider.getService();
+ info.types.addAll(provider.getTypes());
info.description = provider.getDescription();
info.displayName = provider.getDisplayName();
info.className = provider.getClassName();
@@ -630,14 +631,14 @@
OpenEjbConfiguration runningConfig = getRunningConfig();
for (ResourceInfo resourceInfo :
runningConfig.facilities.resources) {
- if (isResourceType(resourceInfo.service, type)) {
+ if (resourceInfo.types.contains(type)) {
resourceIds.add(resourceInfo.id);
}
}
if (sys != null) {
for (ResourceInfo resourceInfo :
sys.facilities.resources) {
- if (isResourceType(resourceInfo.service, type)) {
+ if (resourceInfo.types.contains(type)) {
resourceIds.add(resourceInfo.id);
}
}
@@ -646,23 +647,13 @@
// the above sys instance
if (openejb != null) {
for (Resource resource : openejb.getResource()) {
- if (isResourceType(resource.getType(), type)) {
+ if (resource.getType() != null &&
resource.getType().equals(type)) {
resourceIds.add(resource.getId());
}
}
}
}
return resourceIds;
- }
-
- private static boolean isResourceType(String serviceTypes,
String type) {
- if (type == null) return true;
- if (serviceTypes == null) return false;
-
- for (String serviceType : serviceTypes.split(" *, *")) {
- if (serviceType.equals(type)) return true;
- }
- return false;
}
protected List<String> getContainerIds() {