In a nonmanaged environment, when a ConnectionFactory object is serialized the reference to the LogWriter used for tracing is lost.
If you want trace to be written to a LogWriter you can use the setLogWriter method which can call on the DefaultConnectionManager object. This method ensures that the LogWriter is used on any Connection created from a ConnectionFactory, regardless of whether or not it was previously serialized and de-serialized. An example of this, writing trace to the standard error stream, is shown:
DefaultConnectionManager.setLogWriter(new java.io.PrintWriter(System.err));
Connection Conn = (Connection)cxf.getConnection();
The trace level within the ConnectionFactory is maintained throughout the serialization process and is unaffected by the LogWriter in the DefaultConnectionManager.