[jira] Resolved: (SM-937) Poller polls subdirectory even though recursive is set to false
[ https://issues.apache.org/activemq/browse/SM-937?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gert Vanthienen resolved SM-937. Resolution: Fixed Fix Version/s: 3.2 3.1.2 Thanks to Rabi Mishra for providing this patch! http://svn.apache.org/viewvc?view=rev&revision=556821 http://svn.apache.org/viewvc?view=rev&revision=556822 > Poller polls subdirectory even though recursive is set to false > > > Key: SM-937 > URL: https://issues.apache.org/activemq/browse/SM-937 > Project: ServiceMix > Issue Type: Bug > Components: servicemix-ftp >Affects Versions: 3.1 >Reporter: Markus Rado >Priority: Minor > Fix For: 3.1.2, 3.2 > > Attachments: patch-ftppoller.txt > > > Poller polls subdirectory even though recursive is set to false because in > the first call to pollFileOrDirectory processDir is set to true. Either the > first call should use the value of property recursive or the processDir flag > should be checked before starting to process the files in the directory. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Inopportune stop on ServiceMix
Hi, In on of our environment we have an inopportune stop of our Apache serviceMix. Does anyone had encountered this problem and resolved it? We Thanks Richard BARRE +336.71.13.17.36 This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
[jira] Resolved: (SM-1004) File poller deletes files, even if errors occur while processing
[ https://issues.apache.org/activemq/browse/SM-1004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gert Vanthienen resolved SM-1004. - Resolution: Fixed Fix Version/s: 3.2 3.1.2 Thanks to Rabi Mishra for the initial patch and help in resolving this issue! http://svn.apache.org/viewvc?view=rev&revision=556580 http://svn.apache.org/viewvc?view=rev&revision=556595 > File poller deletes files, even if errors occur while processing > > > Key: SM-1004 > URL: https://issues.apache.org/activemq/browse/SM-1004 > Project: ServiceMix > Issue Type: Bug > Components: servicemix-file >Affects Versions: 3.1.1 >Reporter: Gert Vanthienen > Fix For: 3.1.2, 3.2 > > > Other poller components (e.g. FTP poller) leave the message where it is in > case of error/fault, so it can be retried afterwards (e.g. services > unavailable, XML message content not yet complete, ...). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
RE: [jira] Created: (SM-1004) File poller deletes files, even iferrorsoccur while processing
Yes you are right Gret.. We need to throw the exception based on the sendsync results... Regards, Rabi Mishra, http://rabisblog.blogspot.com/ c++; /* this makes c bigger but returns the old value */ -Original Message- From: Gert Vanthienen [mailto:[EMAIL PROTECTED] Sent: Monday, July 16, 2007 2:58 PM To: servicemix-dev@geronimo.apache.org Subject: Re: [jira] Created: (SM-1004) File poller deletes files, even iferrorsoccur while processing Rabi, Shouldn't we add something like if (exchange.getStatus() == ExchangeStatus.ERROR) { Exception e = exchange.getError(); if (e == null) { e = new JBIException("Unkown error"); } throw e; } in the processFile() method as well, to make sure that an exception is thrown for every MessageExchange that ends in error? Gert [EMAIL PROTECTED] wrote: > Yes, > > It is the lock handling... > > 1. Every polling therad creates lock with the file uri and then > processes the file.. > 2. Lock is released once the file is processed and deleted. (Managed by > unlock flag) > 3. If there is any exception in processing the file the lock is not > released. > > I have just changed it in similar lines with FtpPoller. > > > > Regards, > Rabi Mishra, > http://rabisblog.blogspot.com/ > c++; /* this makes c bigger but returns the old value */ > -Original Message- > From: Gert Vanthienen [mailto:[EMAIL PROTECTED] > Sent: Monday, July 16, 2007 2:05 PM > To: servicemix-dev@geronimo.apache.org > Subject: Re: [jira] Created: (SM-1004) File poller deletes files, even > iferrors occur while processing > > Rabi, > > > Thank you for helping out with this! A lot of this patch seems to be > formatting changes, but it already saves me the time/effort to figure > things out. You mainly changed the lock handling, right? > > Can you explain what you have changed? Just curious to know how things > work... > > > Gert > > [EMAIL PROTECTED] wrote: >> Gret, >> >> Are you working on this patch? I had fixed it sometime back and >> attaching the patch.. >> >> -Original Message- >> From: Gert Vanthienen (JIRA) [mailto:[EMAIL PROTECTED] >> Sent: Monday, July 16, 2007 1:17 PM >> To: servicemix-dev@geronimo.apache.org >> Subject: [jira] Created: (SM-1004) File poller deletes files, even if >> errors occur while processing >> >> File poller deletes files, even if errors occur while processing >> >> >> Key: SM-1004 >> URL: > https://issues.apache.org/activemq/browse/SM-1004 >> Project: ServiceMix >> Issue Type: Bug >> Components: servicemix-file >> Affects Versions: 3.1.1 >> Reporter: Gert Vanthienen >> >> >> Other poller components (e.g. FTP poller) leave the message where it > is >> in case of error/fault, so it can be retried afterwards (e.g. services >> unavailable, XML message content not yet complete, ...). >> >> -- >> This message is automatically generated by JIRA. >> - >> You can reply to this email to add a comment to the issue online. >> >> >> >> >> The information contained in this electronic message and any > attachments to this message are intended for the exclusive use of the > addressee(s) and may contain proprietary, confidential or privileged > information. If you are not the intended recipient, you should not > disseminate, distribute or copy this e-mail. Please notify the sender > immediately and destroy all copies of this message and any attachments. >> WARNING: Computer viruses can be transmitted via email. The recipient > should check this email and any attachments for the presence of viruses. > The company accepts no liability for any damage caused by any virus > transmitted by this email. >> >> www.wipro.com >> >> >> > >> Index: > E:/Rabi/work/workspace/servicemix/deployables/bindingcomponents/servicem > ix-file/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java >> === >> --- > E:/Rabi/work/workspace/servicemix/deployables/bindingcomponents/servicem > ix-file/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java > (revision 555678) >> +++ > E:/Rabi/work/workspace/servicemix/deployables/bindingcomponents/servicem > ix-file/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java > (working copy) >> @@ -41,217 +41,229 @@ >> import java.util.concurrent.locks.Lock; >> >> /** >> - * A polling endpoint which looks for a file or files in a directory >> - * and sends the files into the JBI bus as messages, deleting the > files >> - * by default when they are processed. >> - * >> + * A polling endpoint which looks for a file or files in a directory > and sends >> + * the files into the JBI bus as messages, deleting the files by > default when >> + *
Re: [jira] Created: (SM-1004) File poller deletes files, even iferrorsoccur while processing
Rabi, Shouldn't we add something like if (exchange.getStatus() == ExchangeStatus.ERROR) { Exception e = exchange.getError(); if (e == null) { e = new JBIException("Unkown error"); } throw e; } in the processFile() method as well, to make sure that an exception is thrown for every MessageExchange that ends in error? Gert [EMAIL PROTECTED] wrote: Yes, It is the lock handling... 1. Every polling therad creates lock with the file uri and then processes the file.. 2. Lock is released once the file is processed and deleted. (Managed by unlock flag) 3. If there is any exception in processing the file the lock is not released. I have just changed it in similar lines with FtpPoller. Regards, Rabi Mishra, http://rabisblog.blogspot.com/ c++; /* this makes c bigger but returns the old value */ -Original Message- From: Gert Vanthienen [mailto:[EMAIL PROTECTED] Sent: Monday, July 16, 2007 2:05 PM To: servicemix-dev@geronimo.apache.org Subject: Re: [jira] Created: (SM-1004) File poller deletes files, even iferrors occur while processing Rabi, Thank you for helping out with this! A lot of this patch seems to be formatting changes, but it already saves me the time/effort to figure things out. You mainly changed the lock handling, right? Can you explain what you have changed? Just curious to know how things work... Gert [EMAIL PROTECTED] wrote: Gret, Are you working on this patch? I had fixed it sometime back and attaching the patch.. -Original Message- From: Gert Vanthienen (JIRA) [mailto:[EMAIL PROTECTED] Sent: Monday, July 16, 2007 1:17 PM To: servicemix-dev@geronimo.apache.org Subject: [jira] Created: (SM-1004) File poller deletes files, even if errors occur while processing File poller deletes files, even if errors occur while processing Key: SM-1004 URL: https://issues.apache.org/activemq/browse/SM-1004 Project: ServiceMix Issue Type: Bug Components: servicemix-file Affects Versions: 3.1.1 Reporter: Gert Vanthienen Other poller components (e.g. FTP poller) leave the message where it is in case of error/fault, so it can be retried afterwards (e.g. services unavailable, XML message content not yet complete, ...). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com Index: E:/Rabi/work/workspace/servicemix/deployables/bindingcomponents/servicem ix-file/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java === --- E:/Rabi/work/workspace/servicemix/deployables/bindingcomponents/servicem ix-file/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java (revision 555678) +++ E:/Rabi/work/workspace/servicemix/deployables/bindingcomponents/servicem ix-file/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java (working copy) @@ -41,217 +41,229 @@ import java.util.concurrent.locks.Lock; /** - * A polling endpoint which looks for a file or files in a directory - * and sends the files into the JBI bus as messages, deleting the files - * by default when they are processed. - * + * A polling endpoint which looks for a file or files in a directory and sends + * the files into the JBI bus as messages, deleting the files by default when + * they are processed. + * * @org.apache.xbean.XBean element="poller" - * + * * @version $Revision$ */ -public class FilePollerEndpoint extends PollingEndpoint implements FileEndpointType { +public class FilePollerEndpoint extends PollingEndpoint implements + FileEndpointType { -private File file; -private FileFilter filter; -private boolean deleteFile = true; -private boolean recursive = true; -private boolean autoCreateDirectory = true; -private FileMarshaler marshaler = new DefaultFileMarshaler(); -private LockManager lockManager; + private File file; -public FilePollerEndpoint() { -} + private FileFilter filter; -public F
RE: [jira] Created: (SM-1004) File poller deletes files, even iferrors occur while processing
Yes, It is the lock handling... 1. Every polling therad creates lock with the file uri and then processes the file.. 2. Lock is released once the file is processed and deleted. (Managed by unlock flag) 3. If there is any exception in processing the file the lock is not released. I have just changed it in similar lines with FtpPoller. Regards, Rabi Mishra, http://rabisblog.blogspot.com/ c++; /* this makes c bigger but returns the old value */ -Original Message- From: Gert Vanthienen [mailto:[EMAIL PROTECTED] Sent: Monday, July 16, 2007 2:05 PM To: servicemix-dev@geronimo.apache.org Subject: Re: [jira] Created: (SM-1004) File poller deletes files, even iferrors occur while processing Rabi, Thank you for helping out with this! A lot of this patch seems to be formatting changes, but it already saves me the time/effort to figure things out. You mainly changed the lock handling, right? Can you explain what you have changed? Just curious to know how things work... Gert [EMAIL PROTECTED] wrote: > Gret, > > Are you working on this patch? I had fixed it sometime back and > attaching the patch.. > > -Original Message- > From: Gert Vanthienen (JIRA) [mailto:[EMAIL PROTECTED] > Sent: Monday, July 16, 2007 1:17 PM > To: servicemix-dev@geronimo.apache.org > Subject: [jira] Created: (SM-1004) File poller deletes files, even if > errors occur while processing > > File poller deletes files, even if errors occur while processing > > > Key: SM-1004 > URL: https://issues.apache.org/activemq/browse/SM-1004 > Project: ServiceMix > Issue Type: Bug > Components: servicemix-file > Affects Versions: 3.1.1 > Reporter: Gert Vanthienen > > > Other poller components (e.g. FTP poller) leave the message where it is > in case of error/fault, so it can be retried afterwards (e.g. services > unavailable, XML message content not yet complete, ...). > > -- > This message is automatically generated by JIRA. > - > You can reply to this email to add a comment to the issue online. > > > > > The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. > > WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. > > www.wipro.com > > > > > Index: E:/Rabi/work/workspace/servicemix/deployables/bindingcomponents/servicem ix-file/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java > === > --- E:/Rabi/work/workspace/servicemix/deployables/bindingcomponents/servicem ix-file/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java (revision 555678) > +++ E:/Rabi/work/workspace/servicemix/deployables/bindingcomponents/servicem ix-file/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java (working copy) > @@ -41,217 +41,229 @@ > import java.util.concurrent.locks.Lock; > > /** > - * A polling endpoint which looks for a file or files in a directory > - * and sends the files into the JBI bus as messages, deleting the files > - * by default when they are processed. > - * > + * A polling endpoint which looks for a file or files in a directory and sends > + * the files into the JBI bus as messages, deleting the files by default when > + * they are processed. > + * > * @org.apache.xbean.XBean element="poller" > - * > + * > * @version $Revision$ > */ > -public class FilePollerEndpoint extends PollingEndpoint implements FileEndpointType { > +public class FilePollerEndpoint extends PollingEndpoint implements > + FileEndpointType { > > -private File file; > -private FileFilter filter; > -private boolean deleteFile = true; > -private boolean recursive = true; > -private boolean autoCreateDirectory = true; > -private FileMarshaler marshaler = new DefaultFileMarshaler(); > -private LockManager lockManager; > + private File file; > > -public FilePollerEndpoint() { > -} > + private FileFilter filter; > > -public FilePollerEndpoint(ServiceUnit serviceUnit, QName service, String endpoint) { > -super(serviceUnit, service, endpoint); > -} > + private boolean deleteFile = true; > > -public FilePollerEndpoint(DefaultComponent component, ServiceEndpoint endpoint) { > -super(component, endpo
Re: [jira] Created: (SM-1004) File poller deletes files, even iferrors occur while processing
Rabi, Thank you for helping out with this! A lot of this patch seems to be formatting changes, but it already saves me the time/effort to figure things out. You mainly changed the lock handling, right? Can you explain what you have changed? Just curious to know how things work... Gert [EMAIL PROTECTED] wrote: Gret, Are you working on this patch? I had fixed it sometime back and attaching the patch.. -Original Message- From: Gert Vanthienen (JIRA) [mailto:[EMAIL PROTECTED] Sent: Monday, July 16, 2007 1:17 PM To: servicemix-dev@geronimo.apache.org Subject: [jira] Created: (SM-1004) File poller deletes files, even if errors occur while processing File poller deletes files, even if errors occur while processing Key: SM-1004 URL: https://issues.apache.org/activemq/browse/SM-1004 Project: ServiceMix Issue Type: Bug Components: servicemix-file Affects Versions: 3.1.1 Reporter: Gert Vanthienen Other poller components (e.g. FTP poller) leave the message where it is in case of error/fault, so it can be retried afterwards (e.g. services unavailable, XML message content not yet complete, ...). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com Index: E:/Rabi/work/workspace/servicemix/deployables/bindingcomponents/servicemix-file/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java === --- E:/Rabi/work/workspace/servicemix/deployables/bindingcomponents/servicemix-file/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java (revision 555678) +++ E:/Rabi/work/workspace/servicemix/deployables/bindingcomponents/servicemix-file/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java (working copy) @@ -41,217 +41,229 @@ import java.util.concurrent.locks.Lock; /** - * A polling endpoint which looks for a file or files in a directory - * and sends the files into the JBI bus as messages, deleting the files - * by default when they are processed. - * + * A polling endpoint which looks for a file or files in a directory and sends + * the files into the JBI bus as messages, deleting the files by default when + * they are processed. + * * @org.apache.xbean.XBean element="poller" - * + * * @version $Revision$ */ -public class FilePollerEndpoint extends PollingEndpoint implements FileEndpointType { +public class FilePollerEndpoint extends PollingEndpoint implements + FileEndpointType { -private File file; -private FileFilter filter; -private boolean deleteFile = true; -private boolean recursive = true; -private boolean autoCreateDirectory = true; -private FileMarshaler marshaler = new DefaultFileMarshaler(); -private LockManager lockManager; + private File file; -public FilePollerEndpoint() { -} + private FileFilter filter; -public FilePollerEndpoint(ServiceUnit serviceUnit, QName service, String endpoint) { -super(serviceUnit, service, endpoint); -} + private boolean deleteFile = true; -public FilePollerEndpoint(DefaultComponent component, ServiceEndpoint endpoint) { -super(component, endpoint); -} + private boolean recursive = true; -public void poll() throws Exception { -pollFileOrDirectory(file); -} + private boolean autoCreateDirectory = true; -public void validate() throws DeploymentException { -super.validate(); -if (file == null) { -throw new DeploymentException("You must specify a file property"); -} -if (isAutoCreateDirectory() && !file.exists()) { -file.mkdirs(); -} -if (lockManager == null) { -lockManager = createLockManager(); -} -} - -protected LockManager createLockManager() { -return new SimpleLockManager(); -} + private FileMarshaler marshaler = new DefaultFileMarshaler(); + private LockManager lockManager; -// Properties -//
RE: [jira] Created: (SM-1004) File poller deletes files, even if errors occur while processing
Gret, Are you working on this patch? I had fixed it sometime back and attaching the patch.. -Original Message- From: Gert Vanthienen (JIRA) [mailto:[EMAIL PROTECTED] Sent: Monday, July 16, 2007 1:17 PM To: servicemix-dev@geronimo.apache.org Subject: [jira] Created: (SM-1004) File poller deletes files, even if errors occur while processing File poller deletes files, even if errors occur while processing Key: SM-1004 URL: https://issues.apache.org/activemq/browse/SM-1004 Project: ServiceMix Issue Type: Bug Components: servicemix-file Affects Versions: 3.1.1 Reporter: Gert Vanthienen Other poller components (e.g. FTP poller) leave the message where it is in case of error/fault, so it can be retried afterwards (e.g. services unavailable, XML message content not yet complete, ...). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.comIndex: E:/Rabi/work/workspace/servicemix/deployables/bindingcomponents/servicemix-file/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java === --- E:/Rabi/work/workspace/servicemix/deployables/bindingcomponents/servicemix-file/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java (revision 555678) +++ E:/Rabi/work/workspace/servicemix/deployables/bindingcomponents/servicemix-file/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java (working copy) @@ -41,217 +41,229 @@ import java.util.concurrent.locks.Lock; /** - * A polling endpoint which looks for a file or files in a directory - * and sends the files into the JBI bus as messages, deleting the files - * by default when they are processed. - * + * A polling endpoint which looks for a file or files in a directory and sends + * the files into the JBI bus as messages, deleting the files by default when + * they are processed. + * * @org.apache.xbean.XBean element="poller" - * + * * @version $Revision$ */ -public class FilePollerEndpoint extends PollingEndpoint implements FileEndpointType { +public class FilePollerEndpoint extends PollingEndpoint implements + FileEndpointType { -private File file; -private FileFilter filter; -private boolean deleteFile = true; -private boolean recursive = true; -private boolean autoCreateDirectory = true; -private FileMarshaler marshaler = new DefaultFileMarshaler(); -private LockManager lockManager; + private File file; -public FilePollerEndpoint() { -} + private FileFilter filter; -public FilePollerEndpoint(ServiceUnit serviceUnit, QName service, String endpoint) { -super(serviceUnit, service, endpoint); -} + private boolean deleteFile = true; -public FilePollerEndpoint(DefaultComponent component, ServiceEndpoint endpoint) { -super(component, endpoint); -} + private boolean recursive = true; -public void poll() throws Exception { -pollFileOrDirectory(file); -} + private boolean autoCreateDirectory = true; -public void validate() throws DeploymentException { -super.validate(); -if (file == null) { -throw new DeploymentException("You must specify a file property"); -} -if (isAutoCreateDirectory() && !file.exists()) { -file.mkdirs(); -} -if (lockManager == null) { -lockManager = createLockManager(); -} -} - -protected LockManager createLockManager() { -return new SimpleLockManager(); -} + private FileMarshaler marshaler = new DefaultFileMarshaler(); + private LockManager lockManager; -// Properties -//- -public File getFile() { -return file; -} + public FilePollerEndpoint() { + } -/** - * Sets the file to poll, which can be a directory or a file. - * - * @param file - */ -public void setFile(File file) { -this.file = file; -} + public FilePollerEndpoint(ServiceUnit ser
[jira] Created: (SM-1004) File poller deletes files, even if errors occur while processing
File poller deletes files, even if errors occur while processing Key: SM-1004 URL: https://issues.apache.org/activemq/browse/SM-1004 Project: ServiceMix Issue Type: Bug Components: servicemix-file Affects Versions: 3.1.1 Reporter: Gert Vanthienen Other poller components (e.g. FTP poller) leave the message where it is in case of error/fault, so it can be retried afterwards (e.g. services unavailable, XML message content not yet complete, ...). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.