You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2003/11/16 03:09:36 UTC
cvs commit: incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/deployment DeploymentHelper.java
djencks 2003/11/15 18:09:36
Modified: modules/core/src/java/org/apache/geronimo/connector/deployment
ConnectorDeploymentPlanner.java
modules/core/src/test/org/apache/geronimo/naming/java
ContextBuilderTest.java
modules/kernel/src/java/org/apache/geronimo/kernel/deployment
DeploymentHelper.java
Log:
Actually determine if the component DD is actually present
Revision Changes Path
1.4 +1 -2 incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/deployment/ConnectorDeploymentPlanner.java
Index: ConnectorDeploymentPlanner.java
===================================================================
RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/deployment/ConnectorDeploymentPlanner.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ConnectorDeploymentPlanner.java 15 Nov 2003 07:37:37 -0000 1.3
+++ ConnectorDeploymentPlanner.java 16 Nov 2003 02:09:36 -0000 1.4
@@ -148,7 +148,6 @@
URL graURL = dHelper.locateGeronimoDD();
// Is the specific URL deployable?
if (null == raURL) {
- log.info("Looking at and rejecting url " + url);
return false;
}
URI baseURI = URI.create(url.toString()).normalize();
1.8 +2 -1 incubator-geronimo/modules/core/src/test/org/apache/geronimo/naming/java/ContextBuilderTest.java
Index: ContextBuilderTest.java
===================================================================
RCS file: /home/cvs/incubator-geronimo/modules/core/src/test/org/apache/geronimo/naming/java/ContextBuilderTest.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ContextBuilderTest.java 13 Nov 2003 04:30:56 -0000 1.7
+++ ContextBuilderTest.java 16 Nov 2003 02:09:36 -0000 1.8
@@ -84,6 +84,7 @@
private static final String objectName2 = "geronimo.test:name=test2";
private ApplicationClient client;
+
private Context compCtx;
private JMXKernel kernel;
private ReferenceFactory referenceFactory;
1.2 +20 -8 incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/deployment/DeploymentHelper.java
Index: DeploymentHelper.java
===================================================================
RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/deployment/DeploymentHelper.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DeploymentHelper.java 15 Nov 2003 07:37:37 -0000 1.1
+++ DeploymentHelper.java 16 Nov 2003 02:09:36 -0000 1.2
@@ -59,12 +59,8 @@
import java.net.URL;
import java.net.MalformedURLException;
import java.util.List;
-import java.util.Enumeration;
-import java.util.jar.JarFile;
-import java.util.jar.JarEntry;
import java.io.IOException;
-import java.io.File;
-import java.io.FileFilter;
+import java.io.InputStream;
import javax.management.ObjectName;
@@ -82,8 +78,8 @@
public class DeploymentHelper {
protected final URL url;
protected final URLType urlType;
- protected final URL j2eeURL;
- protected final URL geronimoURL;
+ protected URL j2eeURL;
+ protected URL geronimoURL;
private final String objectNameTypeName;
/**
@@ -116,6 +112,22 @@
} catch (MalformedURLException e1) {
throw new DeploymentException("Should never occur", e1);
}
+ InputStream is = null;
+ try {
+ is = j2eeURL.openStream();
+ } catch (IOException e) {
+ //not there, not for us.
+ j2eeURL = null;
+ geronimoURL = null;
+ } finally {
+ if (is != null) {
+ try {
+ is.close();
+ } catch (IOException e) { //ignore
+ }
+ }
+ }
+
}
/**
* Locates the URL referencing the ra.xml deployment descriptor.