public static InfinispanConfiguration newInfinispanConfiguration(InputStream config,
InputStream schema, ConfigurationBeanVisitor cbv) throws IOException {
try {
JAXBContext jc = JAXBContext.newInstance(InfinispanConfiguration.class);
Unmarshaller u = jc.createUnmarshaller();
NamespaceFilter nf = new NamespaceFilter();
XMLReader reader = XMLReaderFactory.createXMLReader();
nf.setParent(reader);
if (schema != null) {
SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
u.setSchema(factory.newSchema(new StreamSource(schema)));
u.setEventHandler(new ValidationEventHandler() {