In a nonmanaged environment where the default connection manager is used, the application can set the LogWriter property on the class to define where trace messages are sent.
If the connection factory is serialized for storage in a nonmanaged environment, for the
LogWriterto be used, it must be set after deserialization because 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);