Hi did you try to create proxy on Serializable and Logger in your producer to ensure you can recreate your logger is serialized? otherwise the logger is not serializable so it fails that's normal.
Side note: in a lot of projects produced loggers are replaced by static loggers cause of it. *Romain Manni-Bucau* *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2013/9/20 hwaastad <[email protected]> > Hi, > I've got a question, maybe more relatred to slf4j, but maybe someone has a > clue on what's happening: > I have a TomEE cluster: > openejb.session-context = http > tomee.session-context.wrapper = http > and tomcat has the tcp cluster configured. > > > I want to produce loggers in my project, so I made a producer: > > @Produces > public Logger getLogger(final InjectionPoint injectionPoint) { > return > LoggerFactory.getLogger(injectionPoint.getMember().getDeclaringClass()); > } > > so in any of my cdi beans (viewaccessscoped impl Serializable) I do: > @Inject > private transient Logger LOG; > > However, in the logs I see: > java.io.NotSerializableException: cannot serialize Logger, Name:null, > WebBeans Type:PRODUCERMETHOD, API > Types:[org.slf4j.Logger,java.lang.Object], > Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default] > > No issues running on standalone TomEE. > > TomEE 1.6.0-PLUS-SNAPSHOT > > best regards > hw > > > > > -- > View this message in context: > http://openejb.979440.n4.nabble.com/Logger-producer-in-tomEE-cluster-tp4665176.html > Sent from the OpenEJB User mailing list archive at Nabble.com. >
