/** * INTERNAL: * This method instantiates the parser and builds the document based on the * schema. If the document is loaded without errors, then the configs are * converted to sessions and stored on the session manager and true is * returned to indicate success. */ public boolean load(SessionManager sessionManager, ClassLoader loader) { Document document = loadDocument(loader); if(getExceptionStore().isEmpty()){ if (document.getDocumentElement().getTagName().equals("sessions")) { return buildSessionConfigs(sessionManager,loader,document,getProject()); } }else{ //upon this time, we knew this could be either toplink sessions.xml or invalid eclipse session.xml. if(document.getDocumentElement().getTagName().equals("toplink-sessions")){ return buildSessionConfigs(sessionManager,loader,document,new XMLSessionConfigToplinkProject()); }else{ // Throw the exceptions we encountered throw SessionLoaderException.finalException(getExceptionStore()); } } // 9.0.4 session.xml, return false to indicate we should load with the XMLLoader return false; }
/** * INTERNAL: * This method instantiates the parser and builds the document based on the * schema. If the document is loaded without errors, then the configs are * converted to sessions and stored on the session manager and true is * returned to indicate success. */ public boolean load(SessionManager sessionManager, ClassLoader loader) { Document document = loadDocument(loader); if(getExceptionStore().isEmpty()){ if (document.getDocumentElement().getTagName().equals("sessions")) { return buildSessionConfigs(sessionManager,loader,document,getProject()); } }else{ //upon this time, we knew this could be either toplink sessions.xml or invalid eclipse session.xml. if(document.getDocumentElement().getTagName().equals("toplink-sessions")){ return buildSessionConfigs(sessionManager,loader,document,new XMLSessionConfigToplinkProject()); }else{ // Throw the exceptions we encountered throw SessionLoaderException.finalException(getExceptionStore()); } } // 9.0.4 session.xml, return false to indicate we should load with the XMLLoader return false; }
/** * INTERNAL: * This method instantiates the parser and builds the document based on the * schema. If the document is loaded without errors, then the configs are * converted to sessions and stored on the session manager and true is * returned to indicate success. */ public boolean load(SessionManager sessionManager, ClassLoader loader) { Document document = loadDocument(loader); if(getExceptionStore().isEmpty()){ if (document.getDocumentElement().getTagName().equals("sessions")) { return buildSessionConfigs(sessionManager,loader,document,getProject()); } }else{ //upon this time, we knew this could be either toplink sessions.xml or invalid eclipse session.xml. if(document.getDocumentElement().getTagName().equals("toplink-sessions")){ return buildSessionConfigs(sessionManager,loader,document,new XMLSessionConfigToplinkProject()); }else{ // Throw the exceptions we encountered throw SessionLoaderException.finalException(getExceptionStore()); } } // 9.0.4 session.xml, return false to indicate we should load with the XMLLoader return false; }
}else{ throw SessionLoaderException.finalException(getExceptionStore());
}else{ throw SessionLoaderException.finalException(getExceptionStore());
}else{ throw SessionLoaderException.finalException(getExceptionStore());