Commit 50945bce authored by kpandey's avatar kpandey

Make a change in getCacheName method

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@176485 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ba4313b3
...@@ -581,17 +581,37 @@ public class UserActivityService { ...@@ -581,17 +581,37 @@ public class UserActivityService {
* *
*/ */
private String getCacheName() { // private String getCacheName() {
// HttpSession session = request.getSession();
// Object siteObj = session.getAttribute("CURRENT_SITE");
// if (siteObj != null && siteObj instanceof SiteMaster) {
// SiteMaster site = (SiteMaster) siteObj;
// String cacheName = "CACHE_" + site.getSiteCode();
// System.out.println("Setting siteCode[" + site.getSiteCode() + "] siteTranDB[" + site.getTranDB() + "]");
// System.out.println("getCacheName [" + cacheName + "]");
// return cacheName;
// } else {
// System.out.println("\n getCacheName DEFAULT[" + CacheManager.SYSTEM_CACHE_NAME + "]");
// return CacheManager.SYSTEM_CACHE_NAME;
// }
// }
private String getCacheName()
{
HttpSession session = request.getSession(); HttpSession session = request.getSession();
Object siteObj = session.getAttribute("CURRENT_SITE"); //Object siteObj = session.getAttribute("CURRENT_SITE");
if (siteObj != null && siteObj instanceof SiteMaster) { //if( siteObj != null && siteObj instanceof SiteMaster )
SiteMaster site = (SiteMaster) siteObj; if(siteCode!= null)
String cacheName = "CACHE_" + site.getSiteCode(); {
System.out.println("Setting siteCode[" + site.getSiteCode() + "] siteTranDB[" + site.getTranDB() + "]"); //SiteMaster site = (SiteMaster) siteObj;
System.out.println("getCacheName [" + cacheName + "]"); String cacheName = "CACHE_" + siteCode;
System.out.println("Setting siteCode[" + siteCode + "]");
System.out.println("getCacheName ["+cacheName+"]");
return cacheName; return cacheName;
} else { }
System.out.println("\n getCacheName DEFAULT[" + CacheManager.SYSTEM_CACHE_NAME + "]"); else
{
System.out.println("\n getCacheName DEFAULT["+CacheManager.SYSTEM_CACHE_NAME+"]");
return CacheManager.SYSTEM_CACHE_NAME; return CacheManager.SYSTEM_CACHE_NAME;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment