Generic-jms-ra's JmsMCFProperties.getSessionDefaultType returns incorrect value for session type
Issue
- In generic-jms API following is the mapping for different session types in
JmsConnectionFactoryinterface.
public static final int AGNOSTIC = 0;
public static final int QUEUE = 1;
public static final int TOPIC = 2;
- And they are utilized in same manner in
JmsMCFProperties.setSessionDefaultType.
public void setSessionDefaultType(String type)
throws ResourceException
{
if (type.equals(QUEUE_TYPE))
this.type = 1;
else if (type.equals(TOPIC_TYPE))
this.type = 2;
else
this.type = 0;
}
- However the
getSessionDefaultTypemethod breaks this agreement.
public String getSessionDefaultType() {
if (this.type == 0)
return "agnostic";
if (this.type == 1) {
return TOPIC_TYPE;
}
return QUEUE_TYPE;
}
This appears to be a code bug in JmsMCFProperties class. So please check and let us know the fix.
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.4.x
- 7.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
