<pre>Hi everybody:<br><br>I&#39;m starting using logback, and I have a strange behauvour of logback.<br><br>I&#39;m using LoggingContextSelect JNDI.<br><br>My application es an ear deployed in JBOSS, with  three WAR and a EJB<br>
session jar.<br><br>One of the servlet in a WAR uses the Sesssion EJB. In the EJB Session<br>Method I create a Thread, and start it<br><br>MandarMensajes threadException = new MandarMensajes(tipo,cuantos,cadaCuanto);<br>threadException.start();<br>
<br>In this thread the run method uses logback for logging.<br><br>Logger logger = LoggerFactory.getLogger(this);<br>logger.logDebug(&quot;Hola&quot;);<br><br>But the logger I get have a default context!!!!!!, not the context defined<br>
in the JNDI.<br><br>Only happends this when a use the thread in the Session EJB. If I use the<br>MandarMensajes thread in the servlet everything is correct. If I get a<br>logger anywhere else in the EJB Session everything is correct. If I use<br>
the run() method in the EJB Session everything is correct. Even if I get<br>the MDC objet when thread is executing, all the values I put in servlet<br>are there; but the context is default, so it never uses my<br>logback.xml!!!!.<br>
<br>I don&#39;t know if it is a logback bug, or if I&#39;m doing something wrong<br><br>I don&#39;t know if I&#39;ve explained myself correctly, sorry my english is poor<br><br>Thanks a lot</pre>