<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Maybe someone more familiar with JCA will chime in, but as far as
JBoss Logging I don't believe there are any listeners or callbacks.
If you're going to use JBoss Logging you might as well just use a
Logger rather than the ManagedConnection.getLogWriter(). You'd have
more control over the configuration that way.<br>
<br>
On 12/06/2011 02:09 AM, Buerenheide, Christian wrote:
<blockquote
cite="mid:80FE736AF39C384FA5479B4683D1D4B829EEB0D8F8@DEEXVS51.wincor-nixdorf.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 11 (filtered
medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:#606420;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="Section1">
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">Hi all,<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">we implemented a
resource adapter which makes use of
the PrintWriter instance injected to<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">the managed
connection factory for error
logging/tracing purposes. By searching for a way to<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">enable/disable
tracing during runtime we found out
that the JCA container of jboss-as-7.1.0.CR1 <o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">just injects a
System.out printer during deployment
time. If I this isn't right, please correct me. <o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">The JCA (1.5) spec
says the following:<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">"An application
server manages the association
of a log writer with a<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">ManagedConnectionFactory.
When a
ManagedConnectionFactory instance is<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">created, the log
writer is initially null and logging
is disabled. Associating a log<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">writer with a
ManagedConnectionFactory instance
enables logging and tracing<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">for the
ManagedConnectionFactory instance."<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">This is exactly the
behaviour that we would like to
have :-)<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">In our opinion it
would be a better idea to write to
a specific JBoss logger rather than to System.out.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">I checked out the
sources from github and locally
tested with a PrintWriter wrapper subclass which <o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">prints out to a
org.jboss.logging.Logger instance if
trace is enabled for that particular logger.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">It would be also
nice if we could get notified about log
level changes so that we could reset<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">the
ManagedConnection.logWriter back to null if
tracing gets disabled. If so, the log writer could be <o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">null checked within
the RA implementation so that the
trace code (e.g. message formatting) doesn’t <o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">need to be executed
if trace is disabled…<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">Is there a kind of
callback mechanism implemented in
jboss logging?<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">What's your opinion
about a suitable solution? Do you
have any proposals?<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">Best regards<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">Christian<o:p></o:p></span></font></p>
</div>
<blockquote><b>WINCOR NIXDORF International GmbH</b><br>
Sitz der Gesellschaft: Paderborn<br>
Registergericht Paderborn HRB 3507<br>
Geschäftsführer: Eckard Heidloff (Vorsitzender), Stefan
Auerbach, Dr. Jürgen Wunram<br>
Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller<br>
Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 -
WEEE-Reg.-Nr. DE44477193<br>
<br>
Diese E-Mail enthält vertrauliche Informationen.<br>
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
irrtümlich erhalten haben,<br>
informieren Sie bitte sofort den Absender und vernichten Sie
diese E-Mail.<br>
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser
E-Mail ist nicht gestattet.<br>
<br>
This e-mail may contain confidential information.<br>
If you are not the intended recipient (or have received this
e-mail in error)<br>
please notify the sender immediately and destroy this e-mail.<br>
Any unauthorised copying, disclosure or distribution of the
material in this e-mail is strictly forbidden.</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
jboss-as7-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
James R. Perkins
JBoss by Red Hat</pre>
</body>
</html>