assertEquals( 1, context.getDefaultEntityListeners().size() );
assertEquals( OtherLogListener.class.getName(), context.getDefaultEntityListeners().get(0) );
}
private XMLContext buildContext(String ormfile) throws SAXException, DocumentException, IOException {
XMLHelper xmlHelper = new XMLHelper();
ClassLoader cl = Thread.currentThread().getContextClassLoader();
InputStream is = cl.getResourceAsStream( ormfile );
assertNotNull( "ORM.xml not found: " + ormfile, is );
XMLContext context = new XMLContext();
List errors = new ArrayList();
SAXReader saxReader = xmlHelper.createSAXReader( "XML InputStream", errors, EJB3DTDEntityResolver.INSTANCE );
//saxReader.setValidation( false );
try {
saxReader.setFeature( "http://apache.org/xml/features/validation/schema", true );
}
catch (SAXNotSupportedException e) {