You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Nelson, Chris" <ch...@hrblock.com> on 2008/08/10 19:14:53 UTC

JMS Conduit Pooled Session Recycling

I  believe the doClose method of JMSOutputStream should have the pooled
session recycle call within a finally block. As it is now, if the
handleResponse call fails due to a timeout an IOException will be thrown
by handleResponse. If that happens the recycle call will not happen. We
had a large number of timeouts that occurred during a load test. This
eventually killed our JMS server due to the number of consumers created.

The change below seems to have fixed our issue, but please let me know
if this is incorrect.

        protected void doClose() throws IOException {            
            try {
                isOneWay = outMessage.getExchange().isOneWay();
                commitOutputMessage();
                if (!isOneWay) {
                    handleResponse();
                }                
            } catch (JMSException jmsex) {
                getLogger().log(Level.WARNING, "JMS connect failed with
JMSException : ", jmsex);            
                throw new IOException(jmsex.toString());
            } finally {
            	base.sessionFactory.recycle(pooledSession);
            }
        }

Thanks,
Chris


Re: JMS Conduit Pooled Session Recycling

Posted by Ulhas Bhole <ul...@iona.com>.
This is fixed now.
http://svn.eu.apache.org/viewvc?view=rev&revision=684687
http://svn.eu.apache.org/viewvc?view=rev&revision=684688

Regards,

Ulhas Bhole

Ulhas Bhole wrote:
> Hi Chris,
>
> I will take care of it now.
>
> Regards,
>
> Ulhas Bhole
>
> Nelson, Chris wrote:
>> I  believe the doClose method of JMSOutputStream should have the pooled
>> session recycle call within a finally block. As it is now, if the
>> handleResponse call fails due to a timeout an IOException will be thrown
>> by handleResponse. If that happens the recycle call will not happen. We
>> had a large number of timeouts that occurred during a load test. This
>> eventually killed our JMS server due to the number of consumers created.
>>
>> The change below seems to have fixed our issue, but please let me know
>> if this is incorrect.
>>
>>         protected void doClose() throws IOException {            
>>             try {
>>                 isOneWay = outMessage.getExchange().isOneWay();
>>                 commitOutputMessage();
>>                 if (!isOneWay) {
>>                     handleResponse();
>>                 }                            } catch (JMSException 
>> jmsex) {
>>                 getLogger().log(Level.WARNING, "JMS connect failed with
>> JMSException : ", jmsex);                            throw new 
>> IOException(jmsex.toString());
>>             } finally {
>>                 base.sessionFactory.recycle(pooledSession);
>>             }
>>         }
>>
>> Thanks,
>> Chris
>>
>>
>>   
>
> ----------------------------
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

Re: JMS Conduit Pooled Session Recycling

Posted by Ulhas Bhole <ul...@iona.com>.
Hi Chris,

I will take care of it now.

Regards,

Ulhas Bhole

Nelson, Chris wrote:
> I  believe the doClose method of JMSOutputStream should have the pooled
> session recycle call within a finally block. As it is now, if the
> handleResponse call fails due to a timeout an IOException will be thrown
> by handleResponse. If that happens the recycle call will not happen. We
> had a large number of timeouts that occurred during a load test. This
> eventually killed our JMS server due to the number of consumers created.
>
> The change below seems to have fixed our issue, but please let me know
> if this is incorrect.
>
>         protected void doClose() throws IOException {            
>             try {
>                 isOneWay = outMessage.getExchange().isOneWay();
>                 commitOutputMessage();
>                 if (!isOneWay) {
>                     handleResponse();
>                 }                
>             } catch (JMSException jmsex) {
>                 getLogger().log(Level.WARNING, "JMS connect failed with
> JMSException : ", jmsex);            
>                 throw new IOException(jmsex.toString());
>             } finally {
>             	base.sessionFactory.recycle(pooledSession);
>             }
>         }
>
> Thanks,
> Chris
>
>
>   

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

Re: JMS Conduit Pooled Session Recycling

Posted by Glen Mazza <gl...@gmail.com>.
Chris, please enter a JIRA report for this so it doesn't slip through the
cracks:
http://issues.apache.org/jira/browse/CXF

Thanks,
Glen

-- 
View this message in context: http://www.nabble.com/JMS-Conduit-Pooled-Session-Recycling-tp18915060p18919457.html
Sent from the cxf-user mailing list archive at Nabble.com.