Am Mittwoch, 11. Juli 2012 19:01:07 UTC+2 schrieb Lukas Eder:

> I think you should not re-export any 
> > dependencies except if the dependency is necessary to use jOOQ (for 
> example 
> > when you need a type from a dependency to talk to jOOQ's API). 
>
> What about javax.persistence and javax.validation? jOOQ-generated 
> classes could be loaded with a different ClassLoader by OSGi. If those 
> classes are annotated with javax.persistence.Column et al., will 
> jOOQ's internals still see the same javax.persistence.Column 
> annotation? I guess, the fact that Column is referenced from jOOQ's 
> Javadoc shouldn't be an issue, though? 
>

JavaDoc is irrelevant but javax.persistence could cause trouble when the 
type could come from two classloaders.

In this case, I think it's more safe (= breaks less likely) to reexport it.
 

> > Out of curiosity: Why do you want to keep log4j in your code? 
>
> I personally prefer that logging framework, and I think it is one of 
> the most widely used ones: 
>
> - 2029 hits for http://stackoverflow.com/questions/tagged/log4j 
> - 364 hits for http://stackoverflow.com/questions/tagged/slf4j 
> - 298 hits for http://stackoverflow.com/questions/tagged/logback 
>

I switched to logback two years ago and never looked back :-) logback is 
developed by the same guy and the API is much, much better (especially when 
you need to write appenders or complex configuration helpers).

Also the appenders are more powerful to begin with, so you don't need to 
write your own that often.

But I'm not happy with having such (optional) dependencies. If there 
> is any way of removing them, all the better. Reflection would be one 
> way. But as we've seen with OSGi, that will cause issues - apart from 
> being much slower, if every logger.isTraceEnabled() call has to be run 
> through reflection. 
>

In that case, why don't you simply delete JooqLogger and use slf4j? It does 
exactly that: Figure out which logging framework is on the classpath and 
create a specialized logging factory for it.

On top of that, you can get rid of isXxxEnabled() because slf4j handles 
this, too.

Regards, 

A. Digulla 

Reply via email to