1

We have IBM Websphere 7.0 scheduled to run as windows service on Windows 7 / 2008 R2.

When this service is stopped, the java.exe process associated with this is not stopping. Hence it's a manual task to kill the process in Task manager.

Does anyone know how to make the java.exe also stop after the Websphere is stopped?

Thanks

Karthik

KK99
  • 1,971
  • 7
  • 31
  • 64

3 Answers3

0

Check the server's logs. Is the server really stopped? Do you see a log line saying that the server is stopped?

If not, then it means that something is preventing your server instance from stopping. I have seen it happening before when JavaEE code used to spawn long-running threads without closing them.

You can configure WebSphere to start with debugging support, and then connect to it via, say, Eclipse. Using Eclipse, you can look at the active threads on the server, including each thread's stack; that might help you track the problem down.

If the server's logs show that the server is stopped... well... that's what PMR's are for, I guess.

Isaac
  • 16,458
  • 5
  • 57
  • 81
0

Take a thread dump of the Java process and see what it's doing. Perhaps it's waiting for some resource etc:

jps
jstack <pid>
maximdim
  • 8,041
  • 3
  • 33
  • 48
  • How can i execute this? where can i find the jps and jstack? – KK99 Mar 30 '12 at 13:58
  • Both jps and jstack are part of JDK. If you have JDK installed they should be in 'bin' directory – maximdim Mar 30 '12 at 13:59
  • thanks. i don't have the JDK installed. Cannot go ahead and install this on server by myself – KK99 Mar 30 '12 at 14:04
  • It must be installed as part of WebSphere. Just try to search on your server. – maximdim Mar 30 '12 at 14:15
  • 1
    jps and jstack are Sun/Oracle Java only. WebSphere Application Server only ships/supports IBM Java on Windows, so this answer won't work. – Brett Kail Mar 30 '12 at 20:02
  • On Unix systems you would do a "kill -3 " to get a thread dump. IIRC, there is a tool for Windows to send that signal to the process, but I don't recall the name of that tool. – Andreas Veithen Mar 31 '12 at 08:24
  • I had the same problem as that of yours but I increased the heap size in eclipse.ini so that the JVM gets more memory and after that java.exe gets killed automatically as soon as the server stops. – arvind_cool Apr 24 '12 at 04:49
0

Karthik,

Try switching on WASService Tracing (see pages 55 onwards in the following link) http://blogs.hbr.org/schwartz/2012/03/the-magic-of-doing-one-thing-a.html