Skip to content

Commit

Permalink
Merge pull request #645 from darkv/ApplicationDidFinishLaunchingNotif…
Browse files Browse the repository at this point in the history
…ication_patch

ensure notification trigger in servlet context
  • Loading branch information
darkv committed May 13, 2015
2 parents 6b93f90 + bf2e68a commit 573afe9
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1260,6 +1260,10 @@ public ERXApplication() {
_replaceApplicationPathReplace = "";
}
}

if (isDeployedAsServlet()) {
NSNotificationCenter.defaultCenter().postNotification(WOApplication.ApplicationDidFinishLaunchingNotification, this);
}
}

/**
Expand Down

1 comment on commit 573afe9

@renebock
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,

meanwhile I did some investigations, when the ApplicationDidFinishLaunchingNotification is triggered with the default WOAdaptor.

I turned out that it is to early to trigger the notification in the WOApplication constructor. E.g the notification will be triggered before the ERMigration.

A better place should be the init() method of the ERXServletAdaptor. I will submit a pull request "soon".

Please sign in to comment.