I'm not sure what you're asking. So I'll just blather on. :-)
There's really 2 things:
1) The host.xml <server> element. That tells a HostController the
information it needs to launch a server. That info needs to be stored in
the model as part of the host's configuration, and is stored under
host=x,server-config=y. That suggests the XML element should be named
<server-config>. I didn't change it mostly because it's less intuitive
for people only concerned with XML.
2) The host=x,server=y resource, which represents an actual running
server. What I proposed was moving some operations related to
starting/stopping/restarting a server from host=x,server-config=y to
host=x,server=y. Those ops are only loosely related to "server-config".
Combining host=x,server-config=y and host=x,server=y would be pretty
messy. (And would add a fair bit of implementation complexity.) Under
host=x,server-config=y there can be server-specific overrides of stuff
stored elsewhere in domain.xml and host.xml (paths, interfaces, system
properties). We'd have to give those overrides different names in the
tree to distinguish them from the merged values on the running server.
For example, in domain.xml, we might have some domain-wide defaults:
<system-properties>
<system-property name="foo" value="foo"/>
<system-property name="bar" value="bar"/>
</system-properties>
In host xml there might be
<server name="x"...>
<system-properties>
<!-- Override the domain value -->
<system-property name="bar" value="xyz"/>
</system-properties>
</server>
That override needs to be accessible and changeable via the management
API, at the host controller level.
But if you did this from the cli:
/host=local/server=x:read-attribute(name="system-properties")
you'd want to get all properties that exist in the running server, i.e.
{
"outcome"=>"success",
"result"=>[
{"foo"=>"foo"},
{"bar=>"xyz"}
],
"compensating-operation"=>undefined
}
On 3/18/11 3:20 PM, Heiko Braun wrote:
well, in that case it makes sense.
does it mean the current 'server' element will go?
On Mar 18, 2011, at 9:13 PM, Brian Stansberry wrote:
> On 3/18/11 3:12 PM, Heiko Braun wrote:
>>
>> On Mar 18, 2011, at 4:10 PM, Brian Stansberry wrote:
>>
>>> What I mean is, for all other resources, read-resource-description will
>>> return fixed content. For host=x,server=y it will vary depending on
>>> whether the server is actually started. If not running, it will just
>>> provide the operation to start the server and a "status"
attribute,
>>> which will tell you it's stopped. Once you start the server, then
>>> read-resource-description will provide that, plus ops to stop and
>>> restart the server, plus all the normal attributes and operations
>>> exposed by the root resource of a server.
>>
>>
>> can there be more then one server instance per server-config?
>>
>
> No.
>
> --
> Brian Stansberry
> Principal Software Engineer
> JBoss by Red Hat
--
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat