[JBoss JIRA] (WFCORE-4845) Allow Remote Debug Connections on Java 9+ With StandaloneCommandBuilder
by Josh Fisher (Jira)
[ https://issues.redhat.com/browse/WFCORE-4845?page=com.atlassian.jira.plug... ]
Josh Fisher updated WFCORE-4845:
--------------------------------
Description:
When using StandaloneCommandBuilder#setDebug method to set the debug VM argument it will use this format:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=$suspend,address=$debugPort
On Java 9+, this will only accept connections from the localhost, while in Java 8 this will accept connections from any host. It is possible to support remote connections on Java 9+ by configuring the argument in the Java options list instead of using setDebug as a workaround.
While debug connections from remote hosts are not especially common, there are some use cases where it may be desired. For consistency between Java versions, we should consider using the wildcard "*" host so the debug argument format is:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=$suspend,address=*:$debugPort
I believe one way this could be achieved is by modifying the DEBUG_FORMAT to:
DEBUG_FORMAT = "-agentlib:jdwp=transport=dt_socket,server=y,suspend=%s,address=%s"
then in setDebug check the environment VM and format the address accordingly.
{code:java}
public StandaloneCommandBuilder setDebug(boolean suspend, int port) {
final String address;
if (environment.getJvm().isModular()){
address = "*:" + port;
} else {
address = String.valueOf(port);
}
debugArg = String.format(DEBUG_FORMAT, (suspend ? "y" : "n"), address);
return this;
}
{code}
was:
When using StandaloneCommandBuilder#setDebug method to set the debug VM argument it will use this format:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=$suspend,address=$debugPort
On Java 9+, this will only accept connections from the localhost, while in Java 8 this will accept connections from any host. It is possible to support remote connections on Java 9+ by configuring the argument in the Java options list instead of using setDebug as a workaround.
While debug connections from remote hosts are not especially common, there are some use cases where it may be desired. For consistency between Java versions, we should consider using the wildcard "*" host so the debug argument format is:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=$suspend,address=*:$debugPort
I believe one way this could be achieved is by modifying the DEBUG_FORMAT to:
DEBUG_FORMAT = "-agentlib:jdwp=transport=dt_socket,server=y,suspend=%s,address=%s"
then in setDebug can check the environment VM and format the address accordingly.
{code:java}
public StandaloneCommandBuilder setDebug(boolean suspend, int port) {
final String address;
if (environment.getJvm().isModular()){
address = "*:" + port;
} else {
address = String.valueOf(port);
}
debugArg = String.format(DEBUG_FORMAT, (suspend ? "y" : "n"), address);
return this;
}
{code}
> Allow Remote Debug Connections on Java 9+ With StandaloneCommandBuilder
> -----------------------------------------------------------------------
>
> Key: WFCORE-4845
> URL: https://issues.redhat.com/browse/WFCORE-4845
> Project: WildFly Core
> Issue Type: Enhancement
> Components: Launcher
> Reporter: Josh Fisher
> Assignee: Jeff Mesnil
> Priority: Minor
>
> When using StandaloneCommandBuilder#setDebug method to set the debug VM argument it will use this format:
> -agentlib:jdwp=transport=dt_socket,server=y,suspend=$suspend,address=$debugPort
> On Java 9+, this will only accept connections from the localhost, while in Java 8 this will accept connections from any host. It is possible to support remote connections on Java 9+ by configuring the argument in the Java options list instead of using setDebug as a workaround.
> While debug connections from remote hosts are not especially common, there are some use cases where it may be desired. For consistency between Java versions, we should consider using the wildcard "*" host so the debug argument format is:
> -agentlib:jdwp=transport=dt_socket,server=y,suspend=$suspend,address=*:$debugPort
>
> I believe one way this could be achieved is by modifying the DEBUG_FORMAT to:
> DEBUG_FORMAT = "-agentlib:jdwp=transport=dt_socket,server=y,suspend=%s,address=%s"
> then in setDebug check the environment VM and format the address accordingly.
> {code:java}
> public StandaloneCommandBuilder setDebug(boolean suspend, int port) {
> final String address;
> if (environment.getJvm().isModular()){
> address = "*:" + port;
> } else {
> address = String.valueOf(port);
> }
> debugArg = String.format(DEBUG_FORMAT, (suspend ? "y" : "n"), address);
> return this;
> }
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 3 months
[JBoss JIRA] (WFCORE-4845) Allow Remote Debug Connections on Java 9+ With StandaloneCommandBuilder
by Josh Fisher (Jira)
[ https://issues.redhat.com/browse/WFCORE-4845?page=com.atlassian.jira.plug... ]
Josh Fisher commented on WFCORE-4845:
-------------------------------------
As a side note, it would also be possible to offer a setDebug(boolean, String) method, where the String parameter is the address argument value, to allow full control over the address argument; however, based on discussion with [~jamezp] we found it would be unlikely for it to be used and would like to avoid adding another method. With that in mind, we would only be focusing on consistency between Java 8 and Java 9+ at this time. I just wanted to document this idea in case there is interest in the future.
> Allow Remote Debug Connections on Java 9+ With StandaloneCommandBuilder
> -----------------------------------------------------------------------
>
> Key: WFCORE-4845
> URL: https://issues.redhat.com/browse/WFCORE-4845
> Project: WildFly Core
> Issue Type: Enhancement
> Components: Launcher
> Reporter: Josh Fisher
> Assignee: Jeff Mesnil
> Priority: Minor
>
> When using StandaloneCommandBuilder#setDebug method to set the debug VM argument it will use this format:
> -agentlib:jdwp=transport=dt_socket,server=y,suspend=$suspend,address=$debugPort
> On Java 9+, this will only accept connections from the localhost, while in Java 8 this will accept connections from any host. It is possible to support remote connections on Java 9+ by configuring the argument in the Java options list instead of using setDebug as a workaround.
> While debug connections from remote hosts are not especially common, there are some use cases where it may be desired. For consistency between Java versions, we should consider using the wildcard "*" host so the debug argument format is:
> -agentlib:jdwp=transport=dt_socket,server=y,suspend=$suspend,address=*:$debugPort
>
> I believe one way this could be achieved is by modifying the DEBUG_FORMAT to:
> DEBUG_FORMAT = "-agentlib:jdwp=transport=dt_socket,server=y,suspend=%s,address=%s"
> then in setDebug can check the environment VM and format the address accordingly.
> {code:java}
> public StandaloneCommandBuilder setDebug(boolean suspend, int port) {
> final String address;
> if (environment.getJvm().isModular()){
> address = "*:" + port;
> } else {
> address = String.valueOf(port);
> }
> debugArg = String.format(DEBUG_FORMAT, (suspend ? "y" : "n"), address);
> return this;
> }
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 3 months
[JBoss JIRA] (WFCORE-4845) Allow Remote Debug Connections on Java 9+ With StandaloneCommandBuilder
by Josh Fisher (Jira)
Josh Fisher created WFCORE-4845:
-----------------------------------
Summary: Allow Remote Debug Connections on Java 9+ With StandaloneCommandBuilder
Key: WFCORE-4845
URL: https://issues.redhat.com/browse/WFCORE-4845
Project: WildFly Core
Issue Type: Enhancement
Components: Launcher
Reporter: Josh Fisher
Assignee: Jeff Mesnil
When using StandaloneCommandBuilder#setDebug method to set the debug VM argument it will use this format:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=$suspend,address=$debugPort
On Java 9+, this will only accept connections from the localhost, while in Java 8 this will accept connections from any host. It is possible to support remote connections on Java 9+ by configuring the argument in the Java options list instead of using setDebug as a workaround.
While debug connections from remote hosts are not especially common, there are some use cases where it may be desired. For consistency between Java versions, we should consider using the wildcard "*" host so the debug argument format is:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=$suspend,address=*:$debugPort
I believe one way this could be achieved is by modifying the DEBUG_FORMAT to:
DEBUG_FORMAT = "-agentlib:jdwp=transport=dt_socket,server=y,suspend=%s,address=%s"
then in setDebug can check the environment VM and format the address accordingly.
{code:java}
public StandaloneCommandBuilder setDebug(boolean suspend, int port) {
final String address;
if (environment.getJvm().isModular()){
address = "*:" + port;
} else {
address = String.valueOf(port);
}
debugArg = String.format(DEBUG_FORMAT, (suspend ? "y" : "n"), address);
return this;
}
{code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 3 months
[JBoss JIRA] (ELY-1933) Look into how to prevent GitHub Pages from ignoring Javadoc files in _private directories
by Farah Juma (Jira)
Farah Juma created ELY-1933:
-------------------------------
Summary: Look into how to prevent GitHub Pages from ignoring Javadoc files in _private directories
Key: ELY-1933
URL: https://issues.redhat.com/browse/ELY-1933
Project: WildFly Elytron
Issue Type: Task
Reporter: Farah Juma
Something we should look into is making sure that the website builds do not remove Javadoc files that are in _private directories. These files were already getting removed when being built by GitHub Pages for the existing Javadoc website so this behaviour isn’t specific to the new website but we should try to fix it.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 3 months