"jhalliday" wrote : OK, so I can do it by injection but I need to retain the
compile time dependency anyhow in order to have the correct default. Ah well, I guess I
just have to live with an extra .jar in by compile time classpath for now.
|
No you don't. You can provide the default in the config, e.g.
| <property
name="bindAddress">${jboss.bind.address:127.0.0.1}</property>
|
But for the bindAddress, the default is redundant. A long time ago we
fixed it such that the system property was always set during the bootstrap.
See the horrible hack at the top org.jboss.Main ;-)
| Getopt getopt = new Getopt(programName, args, sopts, lopts);
| int code;
| String arg;
|
| HERE !!!
|
| props.setProperty(ServerConfig.SERVER_BIND_ADDRESS, "127.0.0.1");
| System.setProperty(ServerConfig.SERVER_BIND_ADDRESS, "127.0.0.1");
| while ((code = getopt.getopt()) != -1)
| {
| ...
| case 'b':
| arg = getopt.getOptarg();
| props.put(ServerConfig.SERVER_BIND_ADDRESS, arg);
| System.setProperty(ServerConfig.SERVER_BIND_ADDRESS, arg);
| ...
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4152377#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...