Bug 1378723

Summary: [GSS](6.4.z) generic-jms-ra's JmsMCFProperties.getSessionDefaultType returns incorrect value for session type
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: varsha <vkamble>
Component: JMSAssignee: Tom Ross <tom.ross>
Status: CLOSED CURRENTRELEASE QA Contact: Peter Mackay <pmackay>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4.10CC: bmaxwell, jmesnil, jtruhlar, pmackay, ppalaga, tom.ross
Target Milestone: CR1   
Target Release: EAP 6.4.12   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1379571 1379572 (view as bug list) Environment:
Last Closed: 2017-01-17 13:10:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1379572, 1375585, 1379571, 1380885    

Description varsha 2016-09-23 08:16:44 UTC
Description of problem: generic-jms-ra's JmsMCFProperties.getSessionDefaultType returns incorrect value for session type 

Actual code:

  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;
  }

  public String getSessionDefaultType() {
    if (this.type == 0)
      return "agnostic";
    if (this.type == 1) {
      return TOPIC_TYPE;
    }
    return QUEUE_TYPE;
  }




Expected code:

  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;
  }

  public String getSessionDefaultType() {
    if (this.type == 0)
      return "agnostic";
    if (this.type == 1) {
      return QUEUE_TYPE;
    }
    return TOPIC_TYPE;
  }

Comment 4 Peter Mackay 2016-11-22 16:14:32 UTC
Verified with EAP 6.4.12.CP.CR1

Comment 5 Petr Penicka 2017-01-17 13:10:00 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.