Skip to content

Commit

Permalink
Entity class enhancement time sequence issue #5
Browse files Browse the repository at this point in the history
  • Loading branch information
greenlaw110 committed Oct 25, 2018
1 parent 02b23bf commit 59a08a8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# act-storage CHANGE LOG

0.13.5
* Entity class enhancement time sequence issue #5

0.13.4 - 19/Jun/2018
* update act to 1.8.8-RC10
* update act-ebean to 1.7.2
Expand Down
1 change: 0 additions & 1 deletion src/main/java/act/storage/StorageServiceManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ public List<String> managedFields(Class<?> c) {
public void addDbHooker(DbHooker dbHooker) {
if (!this.dbHookers.contains(dbHooker)) {
this.dbHookers.add(dbHooker);
dbHooker.hookLifecycleInterceptors();
logger.debug("DbHooker[%s] hooked", dbHooker.getClass());
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/act/storage/db/DbProbe.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,22 @@ public void run() {
Class<DbHooker> hookerClass = $.classForName(dbHookerClass(), app.classLoader());
final DbHooker hooker = app.getInstance(hookerClass);
final StorageServiceManager ssm = StorageServiceManager.instance();
ssm.addDbHooker(hooker);
if (null != ssm) {
app.jobManager().on(SysEventId.DB_SVC_LOADED, new Runnable() {
@Override
public void run() {
ssm.addDbHooker(hooker);
hooker.hookLifecycleInterceptors();
}
});
} else {
app.eventBus().bind(StorageServiceManagerInitialized.class, new ActEventListenerBase<StorageServiceManagerInitialized>(getClass().getName() + ":hook-to-ssm") {
@Override
public void on(StorageServiceManagerInitialized event) throws Exception {
final StorageServiceManager ssm = event.source();
public void on(StorageServiceManagerInitialized event) {
app.jobManager().on(SysEventId.DB_SVC_LOADED, new Runnable() {
@Override
public void run() {
ssm.addDbHooker(hooker);
hooker.hookLifecycleInterceptors();
}
});
}
Expand Down

0 comments on commit 59a08a8

Please sign in to comment.