private EJBClientDescriptorMetaData parse(final File file, final XMLMapper mapper) throws DeploymentUnitProcessingException { final FileInputStream fis; try { fis = new FileInputStream(file); } catch (FileNotFoundException e) { throw EeLogger.ROOT_LOGGER.failedToProcessEJBClientDescriptor(e); } try { return parse(fis, file, mapper); } finally { safeClose(fis); } }
private EJBClientDescriptorMetaData parse(final InputStream source, final File file, final XMLMapper mapper) throws DeploymentUnitProcessingException { try { final XMLInputFactory inputFactory = INPUT_FACTORY; setIfSupported(inputFactory, XMLInputFactory.IS_VALIDATING, Boolean.FALSE); setIfSupported(inputFactory, XMLInputFactory.SUPPORT_DTD, Boolean.FALSE); final XMLStreamReader streamReader = inputFactory.createXMLStreamReader(source); try { final EJBClientDescriptorMetaData result = new EJBClientDescriptorMetaData(); mapper.parseDocument(result, streamReader); return result; } finally { safeClose(streamReader); } } catch (XMLStreamException e) { throw EeLogger.ROOT_LOGGER.xmlErrorParsingEJBClientDescriptor(e, file.getAbsolutePath()); } }
private EJBClientDescriptorMetaData parse(final File file, final XMLMapper mapper) throws DeploymentUnitProcessingException { final FileInputStream fis; try { fis = new FileInputStream(file); } catch (FileNotFoundException e) { throw EeLogger.ROOT_LOGGER.failedToProcessEJBClientDescriptor(e); } try { return parse(fis, file, mapper); } finally { safeClose(fis); } }
private EJBClientDescriptorMetaData parse(final File file, final DeploymentUnit deploymentUnit, final ModuleLoader moduleLoader) throws DeploymentUnitProcessingException { final FileInputStream fis; try { fis = new FileInputStream(file); } catch (FileNotFoundException e) { throw EeMessages.MESSAGES.failedToProcessEJBClientDescriptor(e); } try { return parse(fis, file, deploymentUnit, moduleLoader); } finally { safeClose(fis); } }
private EJBClientDescriptorMetaData parse(final File file, final XMLMapper mapper) throws DeploymentUnitProcessingException { final FileInputStream fis; try { fis = new FileInputStream(file); } catch (FileNotFoundException e) { throw EeLogger.ROOT_LOGGER.failedToProcessEJBClientDescriptor(e); } try { return parse(fis, file, mapper); } finally { safeClose(fis); } }
private EJBClientDescriptorMetaData parse(final InputStream source, final File file, final DeploymentUnit deploymentUnit, final ModuleLoader moduleLoader) throws DeploymentUnitProcessingException { try { final XMLInputFactory inputFactory = INPUT_FACTORY; setIfSupported(inputFactory, XMLInputFactory.IS_VALIDATING, Boolean.FALSE); setIfSupported(inputFactory, XMLInputFactory.SUPPORT_DTD, Boolean.FALSE); final XMLStreamReader streamReader = inputFactory.createXMLStreamReader(source); try { final EJBClientDescriptorMetaData result = new EJBClientDescriptorMetaData(); mapper.parseDocument(result, streamReader); return result; } finally { safeClose(streamReader); } } catch (XMLStreamException e) { throw EeMessages.MESSAGES.xmlErrorParsingEJBClientDescriptor(e, file.getAbsolutePath()); } }
private EJBClientDescriptorMetaData parse(final InputStream source, final File file, final XMLMapper mapper) throws DeploymentUnitProcessingException { try { final XMLInputFactory inputFactory = INPUT_FACTORY; setIfSupported(inputFactory, XMLInputFactory.IS_VALIDATING, Boolean.FALSE); setIfSupported(inputFactory, XMLInputFactory.SUPPORT_DTD, Boolean.FALSE); final XMLStreamReader streamReader = inputFactory.createXMLStreamReader(source); try { final EJBClientDescriptorMetaData result = new EJBClientDescriptorMetaData(); mapper.parseDocument(result, streamReader); return result; } finally { safeClose(streamReader); } } catch (XMLStreamException e) { throw EeLogger.ROOT_LOGGER.xmlErrorParsingEJBClientDescriptor(e, file.getAbsolutePath()); } }
private EJBClientDescriptorMetaData parse(final InputStream source, final File file, final XMLMapper mapper) throws DeploymentUnitProcessingException { try { final XMLInputFactory inputFactory = INPUT_FACTORY; setIfSupported(inputFactory, XMLInputFactory.IS_VALIDATING, Boolean.FALSE); setIfSupported(inputFactory, XMLInputFactory.SUPPORT_DTD, Boolean.FALSE); final XMLStreamReader streamReader = inputFactory.createXMLStreamReader(source); try { final EJBClientDescriptorMetaData result = new EJBClientDescriptorMetaData(); mapper.parseDocument(result, streamReader); return result; } finally { safeClose(streamReader); } } catch (XMLStreamException e) { throw EeLogger.ROOT_LOGGER.xmlErrorParsingEJBClientDescriptor(e, file.getAbsolutePath()); } }