Object State Memento
The standard JXInsight trace extensions capture contextual information for each traced execution. This includes
target,
arguments,
result and
exception. The contextual information can be inspected via navigation of the object field state graph recorded within the associated memento object held within the timeline model. The level of detail recorded is similar to that found in standard Java code debuggers but without the associated overhead of running the JVM in debug mode continuously.
To display a memento for a selected row in the traces table simply click on the table view's drop down menu
(top right hand corner of view) and select the "Open Memento" menu item. A tree view of the object field state graph for the contextual objects mentioned above will be displayed in a dialog window.
HTTP Request [1040]
The tree view below shows the argument field state graph for the servlet request intercepted via the
JXInsight ServletFilter trace extension. Note that
Class metadata is recorded within the memento allowing for object reference classification. Within the memento model it is possible to interrogate the value of session attributes.
JNDI Lookup [1044]
The memento below shows the object field state graph of the returned object (
result) from the JNDI
lookup call. The
hashCode attributed listed for every object reference is the one returned via a call to
System.identityhashCode(). This attribute value aids in manually comparing the equality of object references.
Create EntityManager
[1047]
The memento recorded for the traced
createEntityManager() call shows the use
(instance field reference) of a Hibernate
SessionFactoryImpl instance within the
EntityManagerFactoryImpl object. Note the recording of dynamic state information such as "open=true" within the returned
EntityManager instance.
Select Hotel
[1049]
JBoss container related information can also be inspected offline. Here the tree view shows the AOP
(Aspect Oriented Programming) runtime and meta state information for the
HotelBooking object reference post the invocation of
selectHotel(). Note the returned value is a string value used in determining the next appropriate view state transition.
Selected Hotel
[1053]
Inspecting the returned state of the
Hotel entity to be rendered on the request web page is extremely easy within the memento tree view.

Merge Hotel[1055]
By comparing the
hashCode value of the argument and result contextual objects it can be seen that the object returned via the
merge() call is a new instance of the
Hotel entity but with the same data field values. Note the system identity
hashCode of the
Hotel argument equals the
hashCode of the returned object in the previous step.
System Properties
The following system properties control the amount of contextual information collected and the depth of the object field state graph.
# the contextual information added to the trace memento
jxinsight.server.profiler.timeline.trace.memento.args.include=true|false (default false)
jxinsight.server.profiler.timeline.trace.memento.exception.include=true|false (default true)
jxinsight.server.profiler.timeline.trace.memento.result.include=true|false (default false)
jxinsight.server.profiler.timeline.trace.memento.target.include=true|false (default false)
# the maximum depth of the object graph
jxinsight.server.cmdb.ext.reflect.maxdepth=8
# the number of array elements recorded
jxinsight.server.cmdb.ext.reflect.field.array.maxlength=132
# should fields with null values be recorded
jxinsight.server.cmdb.ext.reflect.field.nulls.include=false
# should arrays with null elements be recorded
jxinsight.server.cmdb.ext.reflect.field.array.nulls.include=false
# should the internal fields of the java.lang.String class be introspected
jxinsight.server.cmdb.ext.reflect.field.string.fields.include=false
# filter the field state inspection by package and classname
jxinsight.server.cmdb.ext.reflect.field.types.excludes=<classname-prefix-1,classname-prefix-2,...>
jxinsight.server.cmdb.ext.reflect.field.types.includes=<classname-prefix-1,classname-prefix-2,...>
# truncate the length of strings added to the memento
jxinsight.server.cmdb.ext.reflect.field.string.maxlength=512
# limit the generation of memento models in the timeline to those traces exceeding a clocktime (microseconds).
jxinsight.server.profiler.timeline.trace.memento.filter.clocktime=0
# filter the generation of memento models in the timeline based on matching trace string
# both properties take a comma separated string value consisting of trace identifiers prefixes to be excluded or included.
# to limit the generation of memento models to ejb traces specify -Djxinsight.server.profiler.timeline.trace.memento.filter.identifiers.excludes=${ejbobject,${ejbhome
jxinsight.server.profiler.timeline.trace.memento.filter.identifiers.includes=
jxinsight.server.profiler.timeline.trace.memento.filter.identifiers.excludes=
William
Louth, JXInsight's Product Architect