This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 9947
    
161

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: 9947
    
161

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
 
Similar Threads
Trying to run portals in action JSF 2.0 example in liferay on glassfish
logging lifecyle events of servlet
eroor when exportReportToPdfFile
JPA not working with EJB3
apache in "org.apache.jsp"