Bug 727329 - CLI: Queue creation doesn't work and doesn't fail.
Summary: CLI: Queue creation doesn't work and doesn't fail.
Keywords:
Status: CLOSED DUPLICATE of bug 729304
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI
Version: 3.0.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-01 20:17 UTC by Ondřej Žižka
Modified: 2011-10-04 19:30 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-08-10 15:50:56 UTC
Embargoed:


Attachments (Terms of Use)

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 ***


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