dev@glassfish.java.net

Re: How to tell if running in GF server JVM?

From: Byron Nevins <byron.nevins_at_oracle.com>
Date: Wed, 30 Jun 2010 10:57:35 -0700

one simple inelegant possibility --
Take a look at the output of "asadmin generate-jvm-report" and pick a
system property or three that the server always sets and that clients
wouldn't set.

On 6/30/2010 10:47 AM, Cheng Fang wrote:
>
> I have a GlassFish utility class (not a component or service) that may
> need to do things a little differently depends on its execution
> environment.
>
> Is there a way to tell whether a class is currently running inside GF
> server JVM, or in the client-side as a referenced library?
>
> Thanks,
> -cheng
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>

-- 
Byron Nevins  -  Oracle Corporation
Home: 650-359-1290
Cell: 650-784-4123
Sierra: 209-295-2188