@Override
protected ManagedConnectionFactoryDeploymentGroup parse(VFSDeploymentUnit unit, VirtualFile file, ManagedConnectionFactoryDeploymentGroup root) throws Exception
{
//TODO do we need to this every time?
Unmarshaller um = context.createUnmarshaller();
InputStream is = file.openStream();
try
{
InputSource input = new InputSource(is);
input.setSystemId(file.toURI().toString());
XMLReader reader = XMLReaderFactory.createXMLReader();
reader.setEntityResolver(new JBossEntityResolver());
SAXSource source = new SAXSource(reader, input);
JAXBElement<ManagedConnectionFactoryDeploymentGroup> elem = um.unmarshal(source, ManagedConnectionFactoryDeploymentGroup.class);
ManagedConnectionFactoryDeploymentGroup deployment = elem.getValue();
repository.addManagedConnectionFactoryDeploymentGroup(deployment);
return deployment;
}
finally