openmq
openmq copied to clipboard
MQ-JMSRA pooled connection validation broken: ManagedConnectionFactory does not implement ValidatingManagedConnectionFactory
The class com.sun.messaging.jms.ra.ManagedConnectionFactory
does not implement the interface javax.resource.spi.ValidatingManagedConnectionFactory
. This prevents Application-Servers like i.e. Glassfish/Payara 4/5 to validate pooled JMS connections and has a variety of negative effects in case of broken connections.
// code excerpt from com.sun.enterprise.resource.allocator.AbstractConnectorAllocator
...
public Set getInvalidConnections(Set connectionSet)
throws ResourceException {
if (mcf instanceof ValidatingManagedConnectionFactory) {
return ((ValidatingManagedConnectionFactory) this.mcf).
getInvalidConnections(connectionSet);
}
return null;
}
...