In a nonmanaged environment where the DefaultConnectionManager is used
the application can set the LogWriter property on the class to define where
trace messages are sent. It is important to note however that in a nonmanaged
environment, if the ConnectionFactory is serialized for storage the
LogWriter must be set after deserialization in order for it to be used,
as it is not restored automatically after deserialization. This process is
shown in the following example:
ECIManagedConnectionFactory MCF = new ECIManagedConnectionFactory();
MCF.setLogWriter(myLogWriter);
ECIConnectionFactory cf = MCF.createConnectionFactory();
objOutStream.write(cf);
ECIConnectionFactory cf2 = (ECIConnectionFactory) objInStream.read();
DefaultConnectionManager.setLogWriter(myLogWriter);