Cargo

System properties does not set in standalone configuration

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Not A Bug
  • Affects Version/s: 0.2-maven2
  • Fix Version/s: None
  • Component/s: JBoss
  • Labels:
    None
  • Environment:
    Maven 2.0.4, JDK 1.5.0_06
  • Complexity:
    Intermediate
  • Number of attachments :
    0

Description

I need to set jboss.bind.address property on start of a standalone configuration. The folloging config does not work:

<container>
......
<systemProperties>
<jboss.bind.address>127.0.0.1</jboss.bind.address>
</systemProperties>
</container>

Activity

Hide
Vincent Massol added a comment -

The only thing that <systemProperties> does is to set the system property in the JVM, i.e. the equivalent of -Djboss.bind.address=127.0.0.1.

I don't believe there's any bug with system property support in Cargo. If setting the jboss.bind.property in this manner is correct and it's nor working it probably has to do with the jboss configuration but not with system property support I believe.

I need your help here as I have no idea what jboss.bind.address does nor how to use it.

Show
Vincent Massol added a comment - The only thing that <systemProperties> does is to set the system property in the JVM, i.e. the equivalent of -Djboss.bind.address=127.0.0.1. I don't believe there's any bug with system property support in Cargo. If setting the jboss.bind.property in this manner is correct and it's nor working it probably has to do with the jboss configuration but not with system property support I believe. I need your help here as I have no idea what jboss.bind.address does nor how to use it.
Hide
Alexey Kharlamov added a comment -

Several parameters of JBoss container can be adjusted by setting java system properties.
For example, jboss.bind.address can be used to specify which host's interface to use to listen for incoming requests.

So to start up jboss on local loopback only you can use following command:

./run.sh -Djboss.bind.address=127.0.0.1

The -D<> parameters is passed by JVM directly. So on jboss load procedure the property value is used to override
default parameters.

This technique is used for in several places in jboss and by some JEE application (Sync4j for example). So
in general case there is a need a way to set system property on jboss startup. However, in standalone
configuration

Show
Alexey Kharlamov added a comment - Several parameters of JBoss container can be adjusted by setting java system properties. For example, jboss.bind.address can be used to specify which host's interface to use to listen for incoming requests. So to start up jboss on local loopback only you can use following command: ./run.sh -Djboss.bind.address=127.0.0.1 The -D<> parameters is passed by JVM directly. So on jboss load procedure the property value is used to override default parameters. This technique is used for in several places in jboss and by some JEE application (Sync4j for example). So in general case there is a need a way to set system property on jboss startup. However, in standalone configuration
Hide
Alexey Kharlamov added a comment -

this does not work.

Show
Alexey Kharlamov added a comment - this does not work.
Hide
Neill Alexander added a comment -

I had a similar issue, trying to run JBoss with support for debugging via 'mvn cargo:start'.

At first I used:

<systemProperties>
<JAVA_OPTS>-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005</JAVA_OPTS>
</systemProperties>

This didn't work. After some experimentation I discovered that the following works:

<configuration>
<properties>
<cargo.jvmargs>-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005</cargo.jvmargs>
</properties>
</configuration>

Maybe this would also resolve the problem reported above for jboss.bind.address?

Show
Neill Alexander added a comment - I had a similar issue, trying to run JBoss with support for debugging via 'mvn cargo:start'. At first I used: <systemProperties> <JAVA_OPTS>-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005</JAVA_OPTS> </systemProperties> This didn't work. After some experimentation I discovered that the following works: <configuration> <properties> <cargo.jvmargs>-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005</cargo.jvmargs> </properties> </configuration> Maybe this would also resolve the problem reported above for jboss.bind.address?
Hide
Savas Ali Tokmen added a comment -

As reported, please use cargo.jvmargs instead.

As of version 1.0.1-beta-1, you can even put multiline JVM arguments in your pom file, rendering the XML much more readable.

Show
Savas Ali Tokmen added a comment - As reported, please use cargo.jvmargs instead. As of version 1.0.1-beta-1, you can even put multiline JVM arguments in your pom file, rendering the XML much more readable.

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: