-
1. Re: How to programatically enable/disable contextxts and more ?
rhusar Mar 20, 2013 8:25 AM (in response to simplex-software)1 of 1 people found this helpfulIn a domain, look at where are you trying to call the operation: on a profile. This makes no sense, profile is like a template which is applied to hosts.
You need to call the operations on the runtime. IIRC the path is /host=master/server=server-one/subsystem=modcluster
-
2. Re: How to programatically enable/disable contextxts and more ?
simplex-software Mar 20, 2013 9:59 AM (in response to rhusar)Thanks Radovan for you reply. Yes, that's right. My domain consists in a domai controller running on a separate host without any servers on it. Hence, /host=master/server doesn't exist. Instead, I get the following:
[domain@10.20.71.107:9999 /] /host=ftse2/server=b/subsystem=modcluster:read-operation-names
{
"outcome" => "success",
"result" => [
"list-proxies",
"read-attribute",
"read-children-names",
"read-children-resources",
"read-children-types",
"read-operation-description",
"read-operation-names",
"read-proxies-configuration",
"read-proxies-info",
"read-resource",
"read-resource-description",
"refresh",
"reset"
]
}
So, still no enable/disable operation.
And since there were several questions in my post (I appologize for that), do you have an idea about a Java API for MCMP or something like that ?
Many thanks in advance,
Nicolas
-
3. Re: How to programatically enable/disable contextxts and more ?
jfclere Mar 26, 2013 8:40 AM (in response to simplex-software)1 of 1 people found this helpfulyopu can use a small HTTP client that makes resquest like the links of the manager (See http://docs.jboss.org/mod_cluster/1.2.0/html/native.config.html#SetHandlermod_cluster-manager).
-
4. Re: How to programatically enable/disable contextxts and more ?
simplex-software Mar 27, 2013 4:55 AM (in response to jfclere)Hi JF,
Many thanks for the info. After having had a look at this web-app, I think that, while it gives the oportunity to perform a couple of basic things, it doesn't allow one to really deal with all the mod_cluster subtilities, like draining sessions, etc. So, I would be rather interested in using the class org.jboss.modcluster.ModClusterService. I guess you're the good person to talk about as you're the author :-). But I lack of clear and practical samples of how to instantiate it and use it. Would you have anything which could help me ?
Also, connecting my jconsole to the domain controller, I don't see the associated MBean. This is probably because the domain controller runs on a separate hosts on which there are no servers. So, in order to have access to this MBean my understanding is that I need to connect to one of the managed hosts. Is that correct ? My Apche HTTPD server runs on a separate server as well and, besides the mod_cluster plugin, there is no JBoss installation on this server.
Many thanks in advance for your help,
Nicolas DUMINIL
-
5. Re: How to programatically enable/disable contextxts and more ?
jfclere Apr 3, 2013 5:38 AM (in response to simplex-software)In fact you can't do that with mbeans :-(
With the jboss-cli you should be able to script all the commands available for mod_cluster.
-
6. Re: How to programatically enable/disable contextxts and more ?
simplex-software Apr 3, 2013 6:55 AM (in response to jfclere)Thanks again for your reply. But is there any particular reason that I cannot use MBeans ? After all, this is what MBeans arre for. Otherwise why exposing functionality through MBean interfaces if they cannoy be used ?
Many thanks in advance,
Nicolas
-
7. Re: How to programatically enable/disable contextxts and more ?
jfclere Apr 3, 2013 8:06 AM (in response to simplex-software)The MBeans you would need are not (yet) existing.
-
8. Re: How to programatically enable/disable contextxts and more ?
kclair-rei May 13, 2013 7:16 PM (in response to rhusar)I'm still confused about how to do this from the CLI. (I'm using EAP 6.0.1). I tried from what I think is the runtime.
On the domain controller:
[domain@localhost:9999 subsystem=modcluster] pwd
/host=uhqtsia01/server=boomerang-1/subsystem=modcluster
[domain@localhost:9999 subsystem=modcluster] :read-operation-names
{
"outcome" => "success",
"result" => [
"list-proxies",
"read-attribute",
"read-children-names",
"read-children-resources",
"read-children-types",
"read-operation-description",
"read-operation-names",
"read-proxies-configuration",
"read-proxies-info",
"read-resource",
"read-resource-description",
"refresh",
"reset"
]
}
[domain@localhost:9999 subsystem=modcluster]
On the application server:
[domain@localhost:9999 subsystem=modcluster] pwd
/host=uhqtsia01/server=boomerang-1/subsystem=modcluster
[domain@localhost:9999 subsystem=modcluster] :read-operation-names
{
"outcome" => "success",
"result" => [
"list-proxies",
"read-attribute",
"read-children-names",
"read-children-resources",
"read-children-types",
"read-operation-description",
"read-operation-names",
"read-proxies-configuration",
"read-proxies-info",
"read-resource",
"read-resource-description",
"refresh",
"reset"
]
}
[domain@localhost:9999 subsystem=modcluster]
-
9. Re: How to programatically enable/disable contextxts and more ?
jfclere May 14, 2013 4:15 AM (in response to kclair-rei)Hm I would also expect to see more proxy command on the host level. I think you should open a JIRA.
-
10. Re: How to programatically enable/disable contextxts and more ?
rhusar May 14, 2013 11:47 AM (in response to jfclere)