Author |
Message
|
chaitanyauk |
Posted: Thu Nov 02, 2017 9:41 pm Post subject: Dataflowengine not releasing file lock after write |
|
|
Apprentice
Joined: 16 Apr 2017 Posts: 30
|
Hi Experts,
I am using java compute node to write to a file using log4j(One provided by the Log4j, not the IBM provided Log4j).
I am using Rollingappender to write the file. For the fresh deployment of the flow the rollng appender is working fine.But the for the subsequent write it is appending to the same file even after it is crossing maxFileSize.
The problem I see is that the DataFlowEngine is locking the file even after the write by log4j.
So is there any way to make dataflowengine to release the file after the write?
I am using IIBv10.
 |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Nov 03, 2017 6:21 am Post subject: Re: Dataflowengine not releasing file lock after write |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
chaitanyauk wrote: |
Hi Experts,
I am using java compute node to write to a file using log4j(One provided by the Log4j, not the IBM provided Log4j).
I am using Rollingappender to write the file. For the fresh deployment of the flow the rollng appender is working fine.But the for the subsequent write it is appending to the same file even after it is crossing maxFileSize.
The problem I see is that the DataFlowEngine is locking the file even after the write by log4j.
So is there any way to make dataflowengine to release the file after the write?
I am using IIBv10.
 |
Best practice says use java.util.logging and not log4j
You can have custom formatting classes to make the output more log4j like...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
chaitanyauk |
Posted: Mon Nov 06, 2017 9:37 pm Post subject: |
|
|
Apprentice
Joined: 16 Apr 2017 Posts: 30
|
Thanks for the reply.
But I need to implement RollingAppender.
Do you have any idea on IIB's this behavior?
Is there any way to release this file lock? |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Nov 07, 2017 5:47 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
chaitanyauk wrote: |
Thanks for the reply.
But I need to implement RollingAppender.
Do you have any idea on IIB's this behavior?
Is there any way to release this file lock? |
I doubt very much so. Don't forget that some of that logging output gets cached an thus written in a delayed manner. I would not try to bounce the broker to release the file lock. Bouncing the eg (now Integration Server) should be enough. On the other hand you say you need to implement RollingAppender -- wrong you WANT to implement RollingAppender, but you can do that in java.util.logging by specifying the number of files to write to. I believe the lowest is always the latest unless there are some concurrency issues while logging...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
chaitanyauk |
Posted: Wed Nov 08, 2017 3:34 am Post subject: |
|
|
Apprentice
Joined: 16 Apr 2017 Posts: 30
|
Thanks for the suggestion.
Will look into some other approach. |
|
Back to top |
|
 |
|