[sword-svn] r3874 - trunk/bindings/corba/java/src/org/crosswire/sword/orb

scribe at crosswire.org scribe at crosswire.org
Mon Jan 3 14:28:37 EST 2022


Author: scribe
Date: 2022-01-03 14:28:37 -0500 (Mon, 03 Jan 2022)
New Revision: 3874

Modified:
   trunk/bindings/corba/java/src/org/crosswire/sword/orb/SwordOrb.java
Log:
added ability to bypass checkAbuse when retrieving orb instance


Modified: trunk/bindings/corba/java/src/org/crosswire/sword/orb/SwordOrb.java
===================================================================
--- trunk/bindings/corba/java/src/org/crosswire/sword/orb/SwordOrb.java	2021-11-07 17:42:47 UTC (rev 3873)
+++ trunk/bindings/corba/java/src/org/crosswire/sword/orb/SwordOrb.java	2022-01-03 19:28:37 UTC (rev 3874)
@@ -129,7 +129,7 @@
 		// shut down external process
 		try {
 log(INFO, "calling finalize.", null);
-			getSWMgrInstance().terminate();
+			getSWMgrInstance(false).terminate();
 		}
 		catch (Exception e) {}	// we know this doesn't return property cuz we killed the orb! :)
 
@@ -148,7 +148,7 @@
 				orbs.remove(this);
 			}
 log(INFO, "calling valueUnbound. size before: " + size + "; size after: "+orbs.size(), null);
-			getSWMgrInstance().terminate();
+			getSWMgrInstance(false).terminate();
 		}
 		catch (Exception e) {}	// we know this doesn't return properly cuz we killed the orb! :)
 //		catch (Exception e) {e.printStackTrace();}	// we know this doesn't return properly cuz we killed the orb! :)
@@ -200,8 +200,11 @@
 	}
 
 	public SWMgr getSWMgrInstance() throws Exception {
+		return getSWMgrInstance(true);
+	}
+	public SWMgr getSWMgrInstance(boolean checkAbuse) throws Exception {
 		lastAccessed = System.currentTimeMillis();
-		checkAccessAbuse();
+		if (checkAbuse) checkAccessAbuse();
 		SWMgr retVal = null;
 		try {
 log(INFO, "trying to see if we have and attach to a running ORB", null);
@@ -274,8 +277,11 @@
 	}
 
 	public static SWMgr getSWMgrInstance(HttpServletRequest request) throws Exception {
+		return getSWMgrInstance(request, true);
+	}
+	public static SWMgr getSWMgrInstance(HttpServletRequest request, boolean checkAbuse) throws Exception {
 		SwordOrb orb = getSessionOrb(request);
-		SWMgr mgr = orb.getSWMgrInstance();
+		SWMgr mgr = orb.getSWMgrInstance(checkAbuse);
 		return mgr;
 	}
 



More information about the sword-cvs mailing list