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

Kabir Khan kabir.khan at jboss.com
Wed Aug 15 16:16:29 EDT 2012


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
> 
> 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 
> 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?
> 
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()

> 2 - I have imported 
> org.jboss.as.host.controller.HostControllerLogger.ROOT_LOGGER into 
> ModelCombiner.java so that I can log an INFO message if a launch command 
> prefix has been defined. Is there a better place to log the message?

> 
> 3 - I have created a new info message in ModelCombiner.java, 
> serverLaunchCommandPrefix, with id = 11990. This is an arbitrary id, are 
> there any standards for assigning id's to messages?

The message id should be sequential from the previous one

> 
> John
> 
> On 08/14/2012 07:14 PM, Brian Stansberry wrote:
>> Then how about this:
>> 
>> <launch-command prefix="numactl --membind 1 --cpubind 1"/>
>> 
>> If we ever find a use case for a suffix, we just add the attribute.
>> 
>> On 8/14/12 12:28 PM, John O'Hara wrote:
>>> I think the launch-command-prefix is probably more suitable, as
>>> ModelCombiner already does a good job at defining which java command to run.
>>> 
>>> atm I can not think of a use case for a launch-command-suffix element
>>> 
>>> re [1] - I noticed this up after I sent the email
>>> 
>>> On 08/14/2012 06:03 PM, Brian Stansberry wrote:
>>>> That's along the lines of what I was thinking for the "different user
>>>> account" case.
>>>> 
>>>> Something to think about is whether "java" should be in the
>>>> launch-command[1] value (with a default value of just "java".) If not
>>>> it's really a launch-command-prefix, and then is there a use case for
>>>> launch-command-suffix?
>>>> 
>>>> I think using a separate child element for this instead of an attribute
>>>> is better.
>>>> 
>>>> Another question is whether it makes sense to allow this to be
>>>> configured at the server-group level, with servers by default inheriting
>>>> that config. My vote is "no." KISS. If there is demand for doing it at
>>>> the server-group level, we'll here about it and can add it later.
>>>> 
>>>> As for validation, I doubt we can do much there. I think this would be
>>>> an advanced feature where users are going to have to be careful and test
>>>> things.
>>>> 
>>>> [1] Note our schema uses lower case names with "-" as a separator, not
>>>> camel case. So "launch-command" not "launchCommand".
>>>> 
>>>> On 8/14/12 11:49 AM, John O'Hara wrote:
>>> 
>> 
> 
> 
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev




More information about the jboss-as7-dev mailing list