*/
@SuppressWarnings("unchecked")
public void buildSessions() {
ClassLoader projectLoader = new BaseEntityClassLoader(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);
}
Map sessions = sessionManager.getSessions();
String orSessionKey = xrService.name + "-" + DBWS_OR_SESSION_NAME_SUFFIX;
if (sessions.containsKey(orSessionKey)) {
xrService.orSession = (Session)sessions.get(orSessionKey);
}
else {