[Red Hat JIRA] (WFLY-14160) Logging documentation needs attention and updates
by James Perkins (Jira)
James Perkins created WFLY-14160:
------------------------------------
Summary: Logging documentation needs attention and updates
Key: WFLY-14160
URL: https://issues.redhat.com/browse/WFLY-14160
Project: WildFly
Issue Type: Task
Components: Documentation, Logging
Reporter: James Perkins
Assignee: James Perkins
While working on an RFE that required some documentation I noticed there are several broken links in the logging documentation. While it would be simple to just fix the links I feel the logging documentation needs an overhaul and should be updated in general. For this reason I've created this issue as critical.
h2. Links
Several links that referred to inner-documentation links were broken long ago in the conversion to asciidoc. These need to be fixed. An example is the implicit dependencies link needs to be:
{code}
link:Developer_Guide.html#which-are-the-implicit-module-dependencies[implicit]
{code}
h2. Logging API's
The logging API's should have some information on how they work. Possibly which implementation is used and if the user wants to use their own implementation which module dependencies need to be excluded.
In some cases too, log4j2 is an example, there could special permissions required if a security manager is enabled.
For log4j2 these are the required permissions:
{code}
// The getClassLoader permissions is required for the org.apache.logging.log4j.util.ProviderUtil.
new RuntimePermission("getClassLoader"),
// The FilePermissions is also for the org.apache.logging.log4j.util.ProviderUtil as it needs to read the JAR
// for the service loader.
new FilePermission("<<ALL FILES>>", "read"),
// Required for the EnvironmentPropertySource System.getenv().
new RuntimePermission("getenv.*"),
// Required for the SystemPropertiesPropertySource System.getProperties().
new PropertyPermission("*", "read,write"),
{code}
h2. How To's
The How To section likely doesn't make much sense. This same documentation could be achieved in each logging API section.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 5 months
[Red Hat JIRA] (WFLY-14132) jboss-ejb3.xml is ignored for exploded deployments
by Brian Stansberry (Jira)
[ https://issues.redhat.com/browse/WFLY-14132?page=com.atlassian.jira.plugi... ]
Brian Stansberry commented on WFLY-14132:
-----------------------------------------
[~cfang] I think [~jgmeligmeyling] is correct. The DeploymentUnit.getName() method returns the official 'runtime-name' for the deployment. For a top level deployment that attribute can be set by the user via the management API when the deployment is added and its value should be used when making decisions like this. That runtime name must include the relevant file extension. (For a subdeployment we internally set the DeploymentUnit name, and there it will be the name of the VirtualFile representing the subdeployment root, which must have the extension. This means DeploymentUnit.getName() works for subdeployments too.)
The EjbJarParsingDeploymentUnitProcessor.isWar method should also use DeploymentUnit.getName().
> jboss-ejb3.xml is ignored for exploded deployments
> --------------------------------------------------
>
> Key: WFLY-14132
> URL: https://issues.redhat.com/browse/WFLY-14132
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 14.0.1.Final, JBoss AS7 7.1.1.Final, 21.0.1.Final
> Reporter: Jan-Willem Gmelig Meyling
> Assignee: Cheng Fang
> Priority: Major
> Labels: ejb-jar.xml, jboss-ejb3.xml
>
> {{EjbJarParsingDeploymentUnitProcessor}} distinguishes between a WAR and JAR deployment based on the file extension of the name of the deployment root. For exploded deployments however, this deployment root may be a folder without any file extension. As a result the logic fails to detect either a JAR or WAR file and the {{ejb-jar.xml}} and {{jboss-ejb3.xml}} files are ignored. A better way could be to determine the extension from the name of {{DeploymentUnit}} instead.
> Code from: [https://github.com/wildfly/wildfly/blob/master/ejb3/src/main/java/org/jbo...]
> {code:java}
> private static VirtualFile getDescriptor(final VirtualFile deploymentRoot, final String descriptorName) {
> // Locate the descriptor
> final VirtualFile descriptor;
> // EJB 3.1 FR 20.4 Enterprise Beans Packaged in a .war
> if (isWar(deploymentRoot)) {
> // it's a .war file, so look for the ejb-jar.xml in WEB-INF
> descriptor = deploymentRoot.getChild(WEB_INF + "/" + descriptorName);
> } else if (deploymentRoot.getName().toLowerCase(Locale.ENGLISH).endsWith(JAR_FILE_EXTENSION)) {
> descriptor = deploymentRoot.getChild(META_INF + "/" + descriptorName);
> } else {
> // neither a .jar nor a .war. Return
> return null;
> }
> if (descriptor == null || !descriptor.exists()) {
> // no descriptor found, nothing to do!
> return null;
> }
> return descriptor;
> }
> {code}
>
> I encountered this issue on WildFly 14.0.1.Final, but the code is also present in the current master and goes back to versions as early as 7.1.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 5 months