File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
visualvm/jmx/src/org/graalvm/visualvm/jmx/impl Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ public final class JmxApplication extends Application {
56
56
// since getting JVM for the first time can take a long time
57
57
// hard reference jvm from application so we are sure that it is not garbage collected
58
58
public Jvm jvm ;
59
+ JmxModel jmxModel ;
59
60
60
61
// Note: storage may be null, in this case the JmxApplication isn't persistent
61
62
// and creates a temporary storage just like any other regular Application
@@ -100,6 +101,7 @@ public void setStateImpl(int newState) {
100
101
if (newState != Stateful .STATE_AVAILABLE ) {
101
102
pid = UNKNOWN_PID ;
102
103
jvm = null ;
104
+ jmxModel = null ;
103
105
}
104
106
setState (newState );
105
107
}
Original file line number Diff line number Diff line change @@ -385,10 +385,10 @@ public void run() {
385
385
} else {
386
386
app .setStateImpl (Stateful .STATE_AVAILABLE );
387
387
388
- model = JmxModelFactory .getJmxModelFor (app );
388
+ app . jmxModel = JmxModelFactory .getJmxModelFor (app );
389
389
app .jvm = JvmFactory .getJVMFor (app );
390
390
391
- model .addPropertyChangeListener (new PropertyChangeListener () {
391
+ app . jmxModel .addPropertyChangeListener (new PropertyChangeListener () {
392
392
public void propertyChange (PropertyChangeEvent evt ) {
393
393
if (evt .getNewValue () == ConnectionState .CONNECTED ) {
394
394
app .setStateImpl (Stateful .STATE_AVAILABLE );
You can’t perform that action at this time.
0 commit comments