File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ public static void shutdownDB(boolean repopulate){
224
224
225
225
try {
226
226
//WE GET THE CONNECTION BEFORE SETTING THE SEMAPHORE
227
- db = DbHelper . open ( BBConfiguration . getAPPCODE (), "admin" , "admin" );
227
+ db = getConnection ( )
8000
;
228
228
229
229
synchronized (DbHelper .class ) {
230
230
if (!dbFreeze .get ()){
@@ -295,7 +295,7 @@ public static OGraphDatabase reconnectAsAuthenticatedUser (){
295
295
public static void close (OGraphDatabase db ) {
296
296
Logger .debug ("closing connection" );
297
297
if (db !=null && !db .isClosed ()){
298
- HooksManager .unregisteredAll (db );
298
+ // HooksManager.unregisteredAll(db);
299
299
db .close ();
300
300
}else Logger .debug ("connection already close or null" );
301
301
}
@@ -507,8 +507,8 @@ public void onMessage(String m) {
507
507
Logger .info ("...setting up internal user credential..." );
508
508
updateDefaultUsers ();
509
509
Logger .info ("...registering hooks..." );
510
- HooksManager .registerAll (db );
511
510
evolveDB (db );
511
+ HooksManager .registerAll (db );
512
512
}catch (Exception ioe ){
513
513
Logger .error ("*** Error importing the db: " , ioe );
514
514
throw new UnableToImportDbException (ioe );
Original file line number Diff line number Diff line change 18
18
19
19
20
20
import java .util .Iterator ;
21
+ import java .util .List ;
21
22
import java .util .Set ;
22
23
24
+ import org .apache .commons .collections .IteratorUtils ;
25
+
23
26
import play .Logger ;
24
27
25
28
import com .orientechnologies .orient .core .db .graph .OGraphDatabase ;
26
29
import com .orientechnologies .orient .core .hook .ORecordHook ;
27
30
import com .orientechnologies .orient .core .hook .ORecordHook .HOOK_POSITION ;
28
31
29
- public class HooksManager {
32
+ public class HooksManager {
30
33
public static void registerAll (OGraphDatabase db ){
31
34
Logger .trace ("Method Start" );
32
35
Logger .debug ("Registering hooks..." );
@@ -53,18 +56,19 @@ public static void registerAll(OGraphDatabase db){
53
56
public static void unregisteredAll (OGraphDatabase db ){
54
57
55
58
Logger .trace ("Method Start" );
56
- /*
59
+
57
60
Logger .debug ("unregistering hooks..." );
58
61
Set <ORecordHook > hooks = db .getHooks ();
59
- Iterator<ORecordHook> it =hooks.iterator();
62
+ List hs = IteratorUtils .toList (hooks .iterator ());
63
+ Iterator <ORecordHook > it =hs .iterator ();
60
64
while (it .hasNext ()){
61
65
ORecordHook h = it .next ();
62
66
if (h instanceof BaasBoxHook ) {
63
67
Logger .debug ("Removing " + ((BaasBoxHook ) h ).getHookName () + " hook" );
64
68
db .unregisterHook (h );
65
69
}
66
70
}
67
- */
71
+
68
72
Logger .trace ("Method End" );
69
73
70
74
}
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ object ApplicationBuild extends Build {
13
13
javaCore,filters,
14
14
" commons-io" % " commons-io" % " 2.4" ,
15
15
" commons-lang" % " commons-lang" % " 2.6" ,
16
+ " commons-collections" % " commons-collections" % " 3.2" ,
16
17
" xalan" % " xalan" % " 2.7.1" ,
17
18
" org.imgscalr" % " imgscalr-lib" % " 4.2" ,
18
19
" org.apache.commons" % " commons-email" % " 1.3.1" ,
You can’t perform that action at this time.
0 commit comments