[jboss-jira] [JBoss JIRA] Commented: (JBLOGGING-52) Use of system property for proxy generation setting is too inflexible
Dan Allen (JIRA)
jira-events at lists.jboss.org
Tue Dec 21 16:03:18 EST 2010
[ https://issues.jboss.org/browse/JBLOGGING-52?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571776#comment-12571776 ]
Dan Allen commented on JBLOGGING-52:
------------------------------------
I now understand the situation better. I came into this from the side, so I wasn't aware that the use of tooling was the intended design. We can put that tooling in place within the Seam modules to avoid these intermittent failures.
As for the application use of JBoss Logging...
I have to agree with Pete that there will be some users that would prefer to leverage the dynamic generation in earlier phases of the project (and not just because they are using an IDE). Having to use a system property is *very* unfriendly for developers (trust me, they are going to complain loudly about it). We can encourage them to do the right thing, but we have to have that nice safety net to fallback on.
We have options like Seam Config that developers can use to set values of fields for app-wide configuration concerns. We'd like to be able to leverage that.
> Use of system property for proxy generation setting is too inflexible
> ---------------------------------------------------------------------
>
> Key: JBLOGGING-52
> URL: https://issues.jboss.org/browse/JBLOGGING-52
> Project: JBoss Logging
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: jboss-logging-spi
> Affects Versions: 3.0.0.Beta4-jboss-logging
> Reporter: Dan Allen
> Assignee: Dan Allen
> Fix For: 3.0.0.Beta5-jboss-logging
>
>
> JBoss Logging uses a system property to configure whether or not proxies are generated for type-safe loggers. This approach is very inflexible.
> The main issue is that the value of this system property is being cached too aggressively. In CDI extensions, we are forced to use a static code block to set the property so it is assigned early enough that JBoss Logging caches the correct value. However, with multiple extensions loading in a non-deterministic order, we end up having to put this static block in multiple places. [1]
> We need a better way to apply this setting. Perhaps a static method on a configuration API to assign the value before any logging takes place.
> [1] https://github.com/seam/solder/blob/master/impl/src/main/java/org/jboss/seam/solder/log/LoggerExtension.java
> https://github.com/seam/servlet/blob/master/impl/src/main/java/org/jboss/seam/servlet/ServletExtension.java
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list