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.
var as = { id: 10125 };
Related to bug 729304.
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 );
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 ***