fredag den 23. oktober 2009

Check on which tier code is running.

A colleague of mine needed to determine (runtime) what ax-tier his code was running on.

We digged around, and he came up with the solution:

if (isRunningOnServer())
// Server
// Client

As a footnote he needed this check to make some code to refresh the AOS-code cache, when implementing quick-fixes to an environment running with multiple AOS-instances.

Ingen kommentarer:

Send en kommentar