我有一个Web应用程序,可以在其生命周期内创建/销毁多个applet。在创建新applet时,JVM会定期启动第二个实例。 applet共享各种内存结构,因此JVM重新启动会导致整个应用程序失败。
这是我唯一的线索。在控制台中,这是applet启动导致新JVM启动时所写的内容:
security: SSV validation:
running: 1.7.0_51
requested: null
range: null
javaVersionParam: null
Rule Set version: null
network: Created version ID: 1.7.0.51
network: Created version ID: 1.7.0.51
security: continue with running version
basic: AppletRelaunch due to health
network: Created version ID: 1.9
network: Created version ID: 1.8
network: Created version ID: 1.7
network: Created version ID: 1.6
network: Created version ID: 1.5
network: Created version ID: 1.4
network: Created version ID: 1.3
basic: WARNING - specified JRE version, null is invalid platform version
basic: Removed progress listener: sun.plugin.util.ProgressMonitorAdapter@92c0c8
basic: Saving session state to C:\Users\Admin\AppData\Local\Temp\session6130220480729710774
basic: Remote relaunch: LaunchJVMAppletMessage{appletID=16, conversationID=1, javaHome=C:\Program Files (x86)\Java\jre7, launchTime=132313312167, sendKill=false, [sun.plugin2.main.client.PluginMain, write_pipe_name=jpi2_pid2192_pipe22,read_pipe_name=jpi2_pid2192_pipe21]}
security: --- parseCommandLine converted :
into:
[]
security: --- parseCommandLine converted : -Xmx1g -Xms256m -Xss256k
into:
[-Xmx1g, -Xms256m, -Xss256k]
network: Created version ID: 2.0+
network: Created version ID: 1.6.0.10
basic: RemoteJVMLauncher.start(), pipe=Pipe{transport=WindowsNamedPipe: server: false; readPipe: jpi2_pid2192_pipe8, readBufferSz: 4096; writePipe: jpi2_pid2192_pipe9, writeBufferSz: 4096, initiatingSide=false} message: LaunchJVMAppletMessage{appletID=16, conversationID=1, javaHome=C:\Program Files (x86)\Java\jre7, launchTime=132313312167, sendKill=false, [sun.plugin2.main.client.PluginMain, write_pipe_name=jpi2_pid2192_pipe22,read_pipe_name=jpi2_pid2192_pipe21]}
basic: Thread[RemoteJVMLauncher-16,5,main] running...
basic: RemoteJVMLauncher.afterStart(): initializing streamers
handleLaunchJVM(): RemoteJVMLauncer.setCallBack for 16
与此相比,在正常的applet启动期间写入控制台:
security: SSV validation:
running: 1.7.0_51
requested: null
range: null
javaVersionParam: null
Rule Set version: null
network: Created version ID: 1.7.0.51
network: Created version ID: 1.7.0.51
security: continue with running version
network: Created version ID: 1.7.0.51
network: Created version ID: 1.7
network: Created version ID: 2.2.51
security: --- parseCommandLine converted :
into:
[]
直到这一行,一切都是一样的:
basic: AppletRelaunch due to health
谷歌搜索这个没什么。 “健康”是什么意思?我的直觉和重新启动的时间让我觉得它与内存消耗有关,但java.exe总是在200mb以下运行,我尝试使用java_arguments(-Xms256m -Xmx1g -Xss256k)增加内存限制无济于事。 / p>
关于可能导致重新启动的任何想法?有没有办法从HotSpot JVM获取更多信息,以找出哪些特定的“健康”检查失败?