Bug 727329 - CLI: Queue creation doesn't work and doesn't fail.
CLI: Queue creation doesn't work and doesn't fail.
Status: CLOSED DUPLICATE of bug 729304
Product: RHQ Project
Classification: Other
Component: CLI (Show other bugs)
3.0.1
Unspecified Unspecified
medium Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-01 16:17 EDT by Ondřej Žižka
Modified: 2011-10-04 15:30 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-08-10 11:50:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ondřej Žižka 2011-08-01 16:17:12 EDT
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 18:17:50 EDT
var as = { id: 10125 };
Comment 2 Ondřej Žižka 2011-08-09 10:40:00 EDT
Related to bug 729304.
Comment 3 Ondřej Žižka 2011-08-09 10:46:08 EDT
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 11:50:56 EDT
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 ***

Note You need to log in before you can comment on or make changes to this bug.