* @return The metadata
* @exception Exception Thrown if an error occurs
*/
public ConnectorMetaData getStandardMetaData(File root) throws Exception
{
ConnectorMetaData result = null;
UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
MutableSchemaResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();
resolver.mapLocationToClass("connector_1_6.xsd", JCA16MetaData.class);
resolver.mapLocationToClass("connector_1_5.xsd", JCA15MetaData.class);
resolver.mapLocationToClass("connector_1_5.dtd", JCA15DTDMetaData.class);
resolver.mapLocationToClass("connector_1_6.dtd", JCA16DTDMetaData.class);
resolver.mapLocationToClass("connector_1_0.dtd", JCA10DTDMetaData.class);
resolver.mapLocationToClass("connector", JCA16DefaultNSMetaData.class);
File metadataFile = new File(root, "/META-INF/ra.xml");
if (metadataFile.exists())
{
String url = metadataFile.getAbsolutePath();
try
{
long start = System.currentTimeMillis();
result = (ConnectorMetaData) unmarshaller.unmarshal(url, resolver);
log.debug("Total parse for " + url + " took " + (System.currentTimeMillis() - start) + "ms");
if (trace)
{
log.trace("successful parse " + result.getVersion() + " rar package " + result);
}
}
catch (Exception e)
{