*/
@SuppressWarnings("rawtypes")
public void buildSessions() {
XRDynamicClassLoader projectLoader = new XRDynamicClassLoader(parentClassLoader);
SessionManager sessionManager = SessionManager.getManager();
boolean found = false;
String sessionsFile = xrService.sessionsFile == null ? DBWS_SESSIONS_XML : xrService.sessionsFile;
for (String prefix : META_INF_PATHS) {
String searchPath = prefix + sessionsFile;
XRSessionConfigLoader loader = new XRSessionConfigLoader(searchPath);
loader.setShouldLogin(false);
try {
found = loader.load(sessionManager, projectLoader);
} catch (RuntimeException e) { /* ignore */
}
if (found) {
break;
}
}
if (!found) {
throw DBWSException.couldNotLocateFile(DBWS_SESSIONS_XML);
}
// make sure the OR/OX sessions were loaded successfully
Map sessions = sessionManager.getSessions();
String orSessionKey = xrService.name + DASH_STR + DBWS_OR_SESSION_NAME_SUFFIX;
if (!sessions.containsKey(orSessionKey)) {
throw DBWSException.couldNotLocateORSessionForService(xrService.name);
}
String oxSessionKey = xrService.name + DASH_STR + DBWS_OX_SESSION_NAME_SUFFIX;