-
1. Re: System properties substitution in subsystems
ctomc Jul 17, 2012 11:05 AM (in response to magos)Hi and welcome to forums.
best way to check which attributes support expressions and which dont is to connect with cli to server.
and run command
:read-resource-description(recursive=true)
on resource(subsystem) you would like check.
for instance for datasources you could run
/subsystem=datasources:read-resource-description(recursive=true)
or just for datasources:
/subsystem=datasources/data-source=ExampleD:read-resource-description
and you would get something like this:
"attributes" => {
"connection-url" => {
"type" => STRING,
"description" => "The JDBC driver connection URL",
"expressions-allowed" => true,
"nillable" => false,
"min-length" => 1L,
"max-length" => 2147483647L,
"access-type" => "read-write",
"storage" => "configuration",
"restart-required" => "no-services"
},
"driver-class" => {
"type" => STRING,
"description" => "The fully qualified name of the JDBC driver class",
"expressions-allowed" => true,
"nillable" => true,
"min-length" => 1L,
"max-length" => 2147483647L,
"access-type" => "read-write",
"storage" => "configuration",
"restart-required" => "no-services"
},
"datasource-class" => {
...
...
and expression-allowed = true tells you that attribute supports expressions.
so what you are trying to do with datasources should work.
keep in mind that propertes are related to server (host controler) and not to domain controller (unless they are global)
so every server should define them speratly if you are doing this with -P
better way would be to define system properties in configuration and that can be shared between all servers in domain.
--
tomaz
-
2. Re: System properties substitution in subsystems
magos Jul 18, 2012 2:21 AM (in response to ctomc)thanks its works for datasources now but not for security subsystem due to expressions-allowed = false. Can i use System Properties in cli to write the configuration?
-
3. Re: System properties substitution in subsystems
ctomc Jul 18, 2012 5:59 AM (in response to magos)Hey,
what exactly are you trying to do with security configuration that does not work?
is it similar to this https://issues.jboss.org/browse/AS7-5177
or is something else?
--
tomaz
-
4. Re: System properties substitution in subsystems
magos Jul 18, 2012 7:36 AM (in response to ctomc)I try to create a login-modules with cli
the command lookslike this
/profile=full-ha/subsystem=security/security-domain=myLDAPDomain/authentication=classic/:add(login-modules=[{"code"=>"org.jboss.security.auth.spi.LdapExtLoginModule","flag"=>"required",\
"module-options"=>[("java.naming.factory.initial"=>"com.sun.jndi.ldap.LdapCtxFactory"),\
("java.naming.provider.url"=>"${ldap.url}"),\
("java.naming.security.authentication"=>"simple"),\
...
See the ${ldap.url}, that is specified in a property file. But since the securtiy subsystem doesn't allow expressions it won't work. So my idea was to use system parameters when i build the config file with cli. But none of the parameter get resolved it is just writing "${ldap.url}" instead.
In production the admin just wants to run a script that sets up a new jboss depending on a property file for different environments.
Why not allowing expressions in all subsystems that would make things allot easier!
-
5. Re: System properties substitution in subsystems
ctomc Jul 18, 2012 7:40 AM (in response to magos)1 of 1 people found this helpfulHi,
not allowing expressions for all attributes in all subsystems has historical reasons and we are trying to fix that.
You can follow AS7-4788 which tracks work that is beeing done in this area. We hope it will be completed for 7.2
Your problem is exacly the same as one described in AS7-5177 i have assigned it to myself and will fix it shortly.
--
tomaz
-
6. Re: System properties substitution in subsystems
magos Jul 18, 2012 8:12 AM (in response to ctomc)Thanks! Will these changes be part of EAP6.0.1 as well. If so I'll just wait for the next release.