Constants and annotation
<p>This may be a silly question, due to missing some understanding of java but I have this code:</p>

<pre><code>@Stateless
@WebService
public class MLHRequesterBean implements MLHRequesterBeanRemote {

    private final static String sel = "MLHRequesterPU" + (isProduction()? " " : "-dev");

    public static boolean isProduction(){
        try {
           if (Inet4Address.getLocalHost().getHostName().equalsIgnoreCase("ironman")) {
                return true;
            }
        } catch (UnknownHostException ex) {}
        return false;
    }

    @PersistenceContext(unitName=sel)
    ...
</code></pre>

<p>Why is sel not considered a constant?  We have our test server and a production server and each one should write to a different DB.  How can I overcome this issue?  </p>

<p>This is the error:</p>

<p>C:\projects\workspace\MLHRequester\MLHRequester-ejb\src\java\mlh\MLHRequesterBean.java:33: attribute value must be constant
    @PersistenceContext(unitName=sel)
1 error</p>
