Is the Java statement a global implementation option or can it be partially applied?

I want to enable approval when testing the application server, but deploying AS nodes from other teams and my solution may conflict with them ...

A quick web search shows that the statement for Jboss can be included as a global option:

therefore, the setting will be valid for all deployments.

Can a statement be partially included? Based on a class loader (applicable for deployment on application servers) or package / class name templates? Or something else?

My question is not about JBoss, but generally for the JVM ...

+4
source share
2 answers

From the doc :

To enable statements in different details, use -enableassertions, or -ea, switch. To disable statements in different details, use the -disableassertions or -da, switch options. You specify granularity with the arguments that you provide to the switch:

Please note that the page contains examples by directly following the above quote.

I do not think you can make these changes to the loader class (as you ask above). Note, however, that you programmatically set the default approval status for the class loader. Note that this will help you in this situation.

+2
source

All Articles