Tuesday Jul 17, 2012

Tip #18 Debug Mode in GlassFish

GlassFish -- both client (asadmin) and server look for an environmental variable.  If it is set to true then you get more detailed verbose information at runtime.  This is not related to the reporting level in the loggers.

AS_DEBUG=true

The environmental variable has to exist AND it has to be set to a String that Boolean.parseString() will see as "true". 

Examples:

Asadmin will dump out much more information.  E.g. if you have it set and run "asadmin start-domain" you will see how that command actually verifies that the domain has started.

Flashlight's job is to instrument classes.  It does this by creating new source code with ASM, compiling it and then replacing the existing class bytes with the new ones.  If AS_DEBUG is true -- it will save the new .class files to disk in an obvious location:

<install-root>/flashlight-generated

There are several Server-side commands that look at AS_DEBUG.  Which ones and what they do is left as an exercise for the reader!

About

ByronNevins

Search

Archives
« July 2012 »
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    
       
Today