Hi All,
I am working on multi-tenant e-commerce stores. When I log out from the
e-commerce application I get random errors and it seems tenant delegator is
not used by the request.
Further digging into the code, I found that in doBasicLogout() method of
LoginWorker class, default delegator is used instead of tenant delegator and
due to this tenant related data such as store, theme is not found and errors
are thrown.
Code snippet from LoginWorkder.java (line number 616 )
if (delegatorName != null) {
// if there is a tenantId in the delegatorName remove it now so
that tenant selection doesn't last beyond logout
if (delegatorName.indexOf('#') > 0) {
delegatorName = delegatorName.substring(0,
delegatorName.indexOf('#'));
}
session.setAttribute("delegatorName", delegatorName);
delegator = DelegatorFactory.getDelegator(delegatorName);
LocalDispatcher dispatcher =
ContextFilter.makeWebappDispatcher(session.getServletContext(), delegator);
setWebContextObjects(request, response, delegator, dispatcher);
}
What is the best way to use logout function is multi-tenant e-commerce
applications?
--
Thanks & Regards
Ganesh Bawne
Enterprise Software Developer
Viithiisys Pvt. Ltd.
http://www.viithiisys.com