From: Scott M S. <st...@us...> - 2002-05-26 23:57:27
|
User: starksm Date: 02/05/26 16:57:26 Modified: src/main/org/jboss/deployment Tag: Branch_3_0 SARDeployer.java Log: Set the location of the descriptor DD so that system entity refs may be resolved Revision Changes Path No revision No revision 1.8.2.3 +12 -14 jboss-system/src/main/org/jboss/deployment/SARDeployer.java Index: SARDeployer.java =================================================================== RCS file: /cvsroot/jboss/jboss-system/src/main/org/jboss/deployment/SARDeployer.java,v retrieving revision 1.8.2.2 retrieving revision 1.8.2.3 diff -u -r1.8.2.2 -r1.8.2.3 --- SARDeployer.java 24 May 2002 16:26:54 -0000 1.8.2.2 +++ SARDeployer.java 26 May 2002 23:57:26 -0000 1.8.2.3 @@ -66,7 +66,7 @@ * @author <a href="mailto:Dav...@or...">David Maplesden</a> * @author <a href="mailto:d_j...@us...">David Jencks</a> * @author <a href="mailto:ja...@pl...">Jason Dillon</a> - * @version $Revision: 1.8.2.2 $ + * @version $Revision: 1.8.2.3 $ * * <p><b>20010830 marc fleury:</b> * <ul> @@ -635,26 +635,25 @@ return name == null ? OBJECT_NAME : name; } - + /** Parse the META-INF/jboss-service.xml descriptor + */ protected void parseDocument(DeploymentInfo di) throws DeploymentException { try { DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder(); - InputStream stream = null; - - // If we are in a xml only get the URL - if (di.isXML) - stream = di.localUrl.openStream(); - // Else load from the jar or directory - else - stream = di.localCl.getResourceAsStream("META-INF/jboss-service.xml"); - // Validate that the stream is not null - if (stream == null) + URL docURL = di.localUrl; + // Load jboss-service.xml from the jar or directory + if( di.isXML == false ) + docURL = di.localCl.getResource("META-INF/jboss-service.xml"); + // Validate that the descriptor was found + if( docURL == null ) throw new DeploymentException("Failed to find META-INF/jboss-service.xml"); + InputStream stream = docURL.openStream(); InputSource is = new InputSource(stream); + is.setSystemId(docURL.toString()); di.document = parser.parse(is); } catch (Exception e) @@ -662,8 +661,7 @@ throw new DeploymentException("Exception getting document", e); } } - - + // Private -------------------------------------------------------- /** |