Bug 727329

Summary: CLI: Queue creation doesn't work and doesn't fail.
Product: [Other] RHQ Project Reporter: Ondřej Žižka <ozizka>
Component: CLIAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED DUPLICATE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0.1CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-10 15:50:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ondřej Žižka 2011-08-01 20:17:12 UTC
STR: 

1) Install EAP 5.1.x, inventorize
2) Run this script:

    var appTypeName = "Queue";
    var appType = ResourceTypeManager.getResourceTypeByNameAndPlugin( appTypeName, "JBossAS5" );
    Assert.assertNotNull( appType, "  Could not find application type: " + appTypeName);
    
    var deployConfig = new Configuration();
    deployConfig.put( new PropertySimple("jndi-name", "cliTestQueue"));

    var as = ... ; // Find this in UI's URL
    ResourceFactoryManager.createResource( as.id, appType.id, "cliTestQueue-res",   null, deployConfig );

3) The last line returns null and does not fail.
   The queue is not created.

Comment 1 Ondřej Žižka 2011-08-01 22:17:50 UTC
var as = { id: 10125 };

Comment 2 Ondřej Žižka 2011-08-09 14:40:00 UTC
Related to bug 729304.

Comment 3 Ondřej Žižka 2011-08-09 14:46:08 UTC
I've tried to create the Queue under JBoss Messaging resource. Doesn't work either.

Is the following script correct?


    var appTypeName = "JBoss Messaging";
    var appType = ResourceTypeManager.getResourceTypeByNameAndPlugin( appTypeName, "JBossAS5" );
    Assert.assertNotNull( appType, "  Could not find application type: " + appTypeName);
    
    criteria = new ResourceCriteria();
    criteria.addFilterResourceTypeName("JBoss Messaging");
    criteria.addFilterInventoryStatus(InventoryStatus.COMMITTED);
    
    var resList = ResourceManager.findResourcesByCriteria(criteria);
    if( resList.size() == 0 )
        Assert.fail("No COMMITTED 'JBoss Messaging' service found.");
    var jbm = resList.get(0);
    println("  Found " + jbm.getResourceType() + ".");



    // Queue type.
    var appTypeName = "Queue";
    var appType = ResourceTypeManager.getResourceTypeByNameAndPlugin( appTypeName, "JBossAS5" ); // JBossAS 4.x differs.
    Assert.assertNotNull( appType, "  Could not find application type: " + appTypeName);
    
    var deployConfig = new Configuration();
    deployConfig.put( new PropertySimple("jndi-name", "cliTestQueue"));

    // Create a queue _in it_ (not in AS).
    ResourceFactoryManager.createResource( jbm.id, appType.id,   "cliTestQueue-res",   null, deployConfig );

Comment 4 Ondřej Žižka 2011-08-10 15:50:56 UTC
1)  It was missing required arg "name".
However, the operation was not scheduled and the CLI function did not show any error. Also the log was not showing any warning or such.

2) The property to be set is "JNDIName", unlike for other resources where it's "jndi-name" which I assumed to be the same.

Conclusion: This bug reduces to another one - Bug 729304.
Sorry for the rouse.

*** This bug has been marked as a duplicate of bug 729304 ***