Connector connector;
try {
connector = (Connector) JaxbJavaee.unmarshalJavaee(Connector.class, IO.read(url));
} catch (final JAXBException e) {
try {
final Connector10 connector10 = (Connector10) JaxbJavaee.unmarshalJavaee(Connector10.class, IO.read(url));
connector = Connector.newConnector(connector10);
} catch (final ParserConfigurationException | SAXException e1) {
throw new OpenEJBException("Cannot parse the ra.xml file: " + url.toExternalForm(), e);
} catch (final JAXBException e1) {
throw new OpenEJBException("Cannot unmarshall the ra.xml file: " + url.toExternalForm(), e);