Chris,

See my reply to your comment.

Dan
-----Original Message-----
From: Christopher Schultz <[email protected]> 
Sent: Wednesday, August 13, 2025 2:21 PM
To: [email protected]
Subject: Re: [EXTERNAL EMAIL] RE: How to access a REST service

Dan,

At the risk of extending an already-lengthy conversation...

On 8/12/25 1:31 PM, Daniel Schwartz wrote:
> -----Original Message-----
> From: Christopher Schultz <[email protected]>
> Sent: Tuesday, August 12, 2025 11:19 AM
> To: [email protected]
> Subject: Re: [EXTERNAL EMAIL] RE: How to access a REST service
> 
> Daniel,
> 
> On 8/11/25 9:38 PM, Daniel Schwartz wrote:
>> Chris,
>>
>> Again, see my replies marked DSG.
>>
>> Dan
>>
>> -----Original Message-----
>> From: Christopher Schultz <[email protected]>
>> Sent: Monday, August 11, 2025 3:21 PM
>> To: [email protected]
>> Subject: Re: [EXTERNAL EMAIL] RE: How to access a REST service
>>
>> Daniel,
>>
>> On 8/5/25 3:05 PM, Daniel Schwartz wrote:
>>> I just replied to Rob Sargent regarding this.  Did you see that reply?
>>>
>>    > Maybe I’m not using Glassfish correctly, but if I set the 
>> maximum> pool size to 1, the system almost immediately outputs an 
>> error
>>> message saying that it is unable to allocate any more connections 
>>> and crashes.
>> I'm interested in what you mean by "crashes". To me, that usually means that 
>> the process stops at the very least. Do you mean that the request fails, or 
>> something much worse?
>>
>> DGS: By "crashes" I mean that the program terminates, usually just after 
>> printing out a stack trace.
> 
> O_O
> 
> Like... the JVM completely exits and you have to re-start Tomcat? That 
> sounds ... suspicious. I don't think I've ever taken down Tomcat in 
> the
> 20+ years I've been using it. Application in an unusable state? Sure.
> But exiting the JVM usually requires a JVM bug or tcnative crash.
> 
> DGS: I'm a Java programmer.  This is normal behavior.  If an exception is 
> thrown and there is no provision for catching it, the JRE outputs a stack 
> trace and terminates the program.  However, this has never happened in my 
> program.  The program itself doesn't crash, only Glassfish does when it can't 
> create any more connections.

Application servers don't work that way. A failed request stops the request, 
not the application. If the JVM quits when you run out of connections, this is 
a very unusual configuration you are running under.

DGS: I think we miscommunicated.  Someone was suggesting that my problem was 
that my Java program was throwing exceptions before it released the database 
connections, but this can't be possible, because if an exception was being 
thrown then either (1) the exception is caught and an error message is printed 
out, and the program keeps running, or (2) the error is not caught and the JVM 
outputs a stack trace and terminates.  Neither of these ever happened, 
indicating that no exceptions are being thrown.  The only time the program 
quits is when Glassfish can't make any further connections.  In this case it is 
Glassfish that quits, not the JVM.  

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to