[jboss-as7-dev] Domain mode server launch command

Brian Stansberry brian.stansberry at redhat.com
Fri Aug 17 17:04:43 EDT 2012


Sure, Misty, no problem.

John, see below...

On 8/16/12 2:26 AM, Misty Stanley-Jones wrote:
> Adding Tom Wells to the CC. Can you guys please keep him and his team in
> the loop as this will be very useful in the Admin & Config guide eventually.
>
> Thanks,
> Misty
>
> Misty Stanley-Jones, RHCE
> Supervisor, Engineering Content Services
> Red Hat Brisbane (GMT+10)
> ☺: misty (IRC) ✉: misty at redhat.com <mailto:misty at redhat.com>☏: +61 7
> 3514 8105
>
> On Aug 16, 2012, at 8:22 AM, Brian Stansberry
> <brian.stansberry at redhat.com <mailto:brian.stansberry at redhat.com>> wrote:
>
>> On 8/15/12 3:16 PM, Kabir Khan wrote:
>>>
>>> On 15 Aug 2012, at 17:38, John O'Hara wrote:
>>>
>>>> I have an initial attempt at pulling this together;
>>>>
>>>> https://github.com/johnaoahra80/jboss-as/commits/launchCommand
>>>>
>>
>> Great!
>>
>>>> A couple of things that I would be grateful for some guidance on is;
>>>>
>>>> 1 - I have created a PREFIX attribute for the Host Server model in the
>>
>> Please use launch-command-prefix as the attribute name. When users read
>> the resource using the CLI, that name is more self-explanatory.
>>
>>>> host controller. The xml parser populates this attribute with any
>>>> commands defined in <launch-command prefix="numactl --membind 1
>>>> --cpubind 1"/>. Is this an acceptable/standard way of modifying the
>>>> model for a host server?
>>>>
>>
>> Instead of using the write-attribute operation, the parser should modify
>> the "add" operation for the server-config and add a
>> launch-command-prefix parameter.
>>
>>> In your DescriptionProvider, since the write attribute handler
>>> validator allows null and expressions (which was my advice, whether
>>> expressions are needed is up for discussion), you would need to add
>>> root.get(ATTRIBUTES, PREFIX, EXPRESSIONS_ALLOWED).set(true);
>>> root.get(ATTRIBUTES, PREFIX, NILLABLE).set(true);
>>>
>>> In the parser, again if expressions are needed you should use
>>> parsePossibleExpression()
>>>
>>
>> We are converting most of the coding of the resources in our management
>> model to use the ResourceDefinition and AttributeDefinition interfaces.
>> I'll try tomorrow to get a patch done that converts this SERVER_CONFIG
>> resource to using those interfaces. That will make doing all of this
>> simpler.
>>

The conversion I mentioned ^^^ is now in master. So you would need to 
rebase your branch to pick it up.

In addition to the change in master, I did a commit showing how to 
integrate a new attribute into the server-config resource. This isn't in 
master; I just created a topic branch and put a commit in it for your 
reference:

https://github.com/bstansberry/jboss-as/commit/9e7b4c8ab2720833d2aa4cb18cdea1c1d82da446

The name of the branch is 
https://github.com/bstansberry/jboss-as/tree/launch-command.

The changes in that commit would replace what you did in your branch in 
ModelDescriptionConstants.java. Element.java, HostModelUtil.java, 
HostServerDescription.java, HostXml.java and LocalDescriptions.properties.

Cheers,

-- 
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat


More information about the jboss-as7-dev mailing list