aspose file tools*
The moose likes Other Java Products and Servers and the fly likes JVM behaviour Upon Exception - GlassFish Server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "JVM behaviour Upon Exception - GlassFish Server" Watch "JVM behaviour Upon Exception - GlassFish Server" New topic
Author

JVM behaviour Upon Exception - GlassFish Server

Ankit V Agrawal
Greenhorn

Joined: Nov 26, 2008
Posts: 15
Hi,

Can anyone let me know how the GlassFish Server behaves upon getting an exception.

Does it by any chance starts a new thread to check the consistency of the system whenever it gets the exception ??


SCJP 5.o, SCWCD 5.o
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10262
    
168

Ankit V Agrawal wrote:

Does it by any chance starts a new thread to check the consistency of the system whenever it gets the exception ??


I haven't used GlassFish much, but I don't see a reason why a server would start a new thread when there's an exception thrown. Why do you ask? Is there something specific you are running into?


[My Blog] [JavaRanch Journal]
Ankit V Agrawal
Greenhorn

Joined: Nov 26, 2008
Posts: 15
Yes, I have two EJB modules which are basic client server and the first EJB is having a remote EJB call to the second one. I'm monitoring the thread count through jconsole. I'm calling the second EJB in a loop(this is for load testing). Now whenever I'm getting a CORBA exception during the remote call, there is an increase in the thread count by 1. Also the CPU utilization as well as the Heap size increases in case of this exception. Although this is short lived but still it is not desirable.

I can remove this exception but this was something really interesting for me to have come across the increase in the number of threads.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10262
    
168

Ankit V Agrawal wrote: Now whenever I'm getting a CORBA exception during the remote call, there is an increase in the thread count by 1.


Take a thread dump and see what that new thread (and other threads) are doing at that moment.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JVM behaviour Upon Exception - GlassFish Server