Java EE getting information about what environment the application is currently running
<p>You can run a Java EE application in a test environment, a development environment or a production one.</p>

<p>How can I use Java code or XML to get hold of that information?</p>

<pre><code>if ( ApplicationContext.inDevelopment() { // do this }
</code></pre>

<p>Obviously the above is not correct. But you get the point. How can I do this?</p>
