CLI: Can't create a queue (Bug 727329)

Ian Springer ian.springer at redhat.com
Tue Aug 2 21:45:50 UTC 2011


I agree, it shouldn't return null. It should throw an exception stating 
that the specified resource type to be created is not a valid child type 
for the given parent resource. Quickly scanning the method, it doesn't 
look like it currently does a check for that error condition...

On 08/02/2011 05:36 PM, Ondr(ej Z(iz(ka wrote:
> I see. Makes sense. Ok, I'll try. However, still, the method should 
> fail in some way. Is the null return value a way to denote failure?
>
> Ondra
>
>
>
> Jay Shaughnessy pís(e v Út 02. 08. 2011 v 09:05 -0400:
>> I'm not sure but you may be supplying the wrong parent. If 'as.id' is
>> the id of the AS server resource that may not be right. Because a
>> 'Queue' resource's parent is, I think a 'Jboss Messaging' resource. Not
>> sure if that may be the issue...
>>
>> On 8/1/2011 6:02 PM, Ondr(ej Z(iz(ka wrote:
>> >  Hi all.
>> >
>> >  I'm trying to create a qeuue in CLI.
>> >  I created a bug first because it seems to be.
>> >  https://bugzilla.redhat.com/show_bug.cgi?id=727329
>> >  So once it exists, let's discuss it there...
>> >
>> >  Only to catch your interest, here's the JS code:
>> >
>> >
>> >  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 );
>> >
>> >
>> >  The last line returns null and does not fail.
>> >  The queue is not created.
>> >  I'd like to solve this to complete the JON 2.4.1 + EAP 5.x integ. testsuite.
>> >
>> >  Thanks,
>> >  Ondra
>> >
>> >
>> >  _______________________________________________
>> >  rhq-devel mailing list
>> >  rhq-devel at lists.fedorahosted.org  <mailto:rhq-devel at lists.fedorahosted.org>
>> >  https://fedorahosted.org/mailman/listinfo/rhq-devel
>> _______________________________________________
>> rhq-devel mailing list
>> rhq-devel at lists.fedorahosted.org  <mailto:rhq-devel at lists.fedorahosted.org>
>> https://fedorahosted.org/mailman/listinfo/rhq-devel
>
>
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/rhq-devel


-- 
Ian Springer
Principal Software Developer
JBoss Operations Network
Red Hat
ian.springer at redhat.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://fedorahosted.org/pipermail/rhq-devel/attachments/20110802/16fb3dcc/attachment.html 


More information about the rhq-devel mailing list