[JBoss JIRA] Created: (JBAS-3997) getManagedConnection retries
by Adrian Brock (JIRA)
getManagedConnection retries
----------------------------
Key: JBAS-3997
URL: http://jira.jboss.com/jira/browse/JBAS-3997
Project: JBoss Application Server
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: JCA service
Reporter: Adrian Brock
Assigned To: Weston Price
We should add the ability to retry getManagedConnection()
when there is a resource exception from the pool.
This will allow the ConnectionManagers to be more tolerant of transient failures.
I'd suggest two new attributes on the connection manager, with the suggested defaults:
<allocate-retry>1</allocate-retry>
<allocate-retry-wait-millis>5000</allocate-retry-wait-millis>
I also think the connection manager needs a "shutdown" boolean (maintained by start/stop)
i.e. so don't wait 5 seconds if we get a resource exception caused by the CM/Pool getting
undeployed, e.g. at JBoss shutdown.
This would turn into the following *untested* code in BaseConnectionManager2:
protected ConnectionListener getManagedConnection(Transaction transaction, Subject subject, ConnectionRequestInfo cri)
throws ResourceException
{
ResourceException failure = null;
if (shutdown.get())
throw new ResourceException("The connection manager is shutdown " + jndiName);
// First attempt
try
{
return poolingStrategy.getConnection(transaction, subject, cri);
}
catch (ResourceException e)
{
failure = e;
// Retry?
for (int i = 0; i < allocationRetries; ++i)
{
if (shutdown.get())
throw new ResourceException("The connection manager is shutdown " + jndiName);
try
{
if (allocationWait != 0)
wait(allocationWait);
return poolingStrategy.getConnection(transaction, subject, cri);
}
catch (ResourceException e1)
{
failure = e1;
}
catch (InterruptedException e1)
{
JBossResourceException.rethrowAsResourceException("getManagedConnection retry wait was interrupted " + jndiName, e1);
}
}
}
// If we get here all retries failed, throw the lastest failure
throw failure;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 1 month
[JBoss JIRA] Created: (EJBTHREE-1070) dlqhandler fails on redelivery for messages missing the JMS property "JMSXDeliveryCount"
by Danilo Guerra (JIRA)
dlqhandler fails on redelivery for messages missing the JMS property "JMSXDeliveryCount"
-----------------------------------------------------------------------------------------
Key: EJBTHREE-1070
URL: http://jira.jboss.com/jira/browse/EJBTHREE-1070
Project: EJB 3.0
Issue Type: Bug
Affects Versions: AS 4.2.1.GA
Reporter: Danilo Guerra
GenericDLQHandler fails when handling redelivery of messages missing the property "JMSXDeliveryCount" when using non JbossMQ providers.
excerpt from the class: org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler
protected boolean handleDelivery(Message msg)
{
.....
try
{
if (msg.propertyExists(PROPERTY_DELIVERY_COUNT))
count = msg.getIntProperty(PROPERTY_DELIVERY_COUNT) - 1;
}
catch (JMSException ignored)
{
count = incrementResentCounter(id);
}
...
}
This code fails because the property PROPERTY_DELIVERY_COUNT is checked and the exception is never thrown. As a result the resent counter is not incremented and the message will not be sent to the DLQ.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 1 month
[JBoss JIRA] Created: (JBMESSAGING-1132) Use blocking mode for callbacks with Remoting http transport
by Ron Sigal (JIRA)
Use blocking mode for callbacks with Remoting http transport
------------------------------------------------------------
Key: JBMESSAGING-1132
URL: http://jira.jboss.com/jira/browse/JBMESSAGING-1132
Project: JBoss Messaging
Issue Type: Task
Reporter: Ron Sigal
Assigned To: Tim Fox
Fix For: 2.0.0 Alpha
In response to JBREM-641 "re-implement the callback polling for http transport to reduce latency", an alternative way of handling callbacks was introduced in Remoting. In particular, instead of the client periodically polling for callbacks, in "blocking" mode, the request to download callbacks blocks on the server until either (1) a callback is available, or (2) the timeout period has expired. The advantage is reduced latency in retrieving callbacks. In fact, some JBM http transport stress tests which fail in "nonblocking" mode now pass in "blocking" mode.
1. The default mode is "nonblocking", so it is necessary to explicitly configure "blocking" mode. One way to do so is to add the appropriate parameter to the metadata map when installing the callback listener. E.g., add the following line to org.jboss.jms.client.remoting.JMSRemotingConnection.createCallbackMetadata():
if (reportPollingStatistics != null)
{
metadata.put(CallbackPoller.REPORT_STATISTICS, reportPollingStatistics);
}
metadata.put(ServerInvoker.BLOCKING_MODE, ServerInvoker.BLOCKING); // <<=== add this line
metadata.put(ServerInvoker.BLOCKING_TIMEOUT, "7777"); // optional: default is 5000 milliseconds
2. The line
<attribute name="callbackPollPeriod" isParam="true">102</attribute>
may be removed from remoting-http-service.xml, since it's no longer relevant.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 2 months