public static ApplicationClient readApplicationClient(URL url) throws OpenEJBException {
ApplicationClient applicationClient;
try {
applicationClient = (ApplicationClient) JaxbJavaee.unmarshal(ApplicationClient.class, url.openStream());
} catch (SAXException e) {
throw new OpenEJBException("Cannot parse the application-client.xml file: "+ url.toExternalForm(), e);
} catch (JAXBException e) {
throw new OpenEJBException("Cannot unmarshall the application-client.xml file: "+ url.toExternalForm(), e);
} catch (IOException e) {
throw new OpenEJBException("Cannot read the application-client.xml file: "+ url.toExternalForm(), e);
} catch (Exception e) {
throw new OpenEJBException("Encountered unknown error parsing the application-client.xml file: "+ url.toExternalForm(), e);
}
return applicationClient;
}