You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Christian Schneider (JIRA)" <ji...@apache.org> on 2007/12/19 23:33:28 UTC
[jira] Created: (CAMEL-272) Rework of File Component to Remove
Tangles and simplify code
Rework of File Component to Remove Tangles and simplify code
------------------------------------------------------------
Key: CAMEL-272
URL: https://issues.apache.org/activemq/browse/CAMEL-272
Project: Apache Camel
Issue Type: Improvement
Components: camel-core
Reporter: Christian Schneider
Fix For: 1.3.0
Attachments: new no tangles.png, old.png, patch.txt
After my first smaller rework in issue camel-262 I now completely reworked the file component to remove any cyclic references and clean up the code.
The first thing I did was separating the FileComponent from the other classes in package file by moving them to a new package .impl. This way I was able to remove the cycle between the strategy package and the file package.
The second step was to move all config data from FileEndPoint to a new class FileEndPointConfig. This way I was able to remove the cycle between FileEndPoint, FileProducer and FileConsumer.
Next I removed FileMessage and FileExchange and instead relied on the default objects. The file is simply stored in DefaultMessage.body. There was even a comment in the code asking if FileExchange was necessary before. So I hope this is ok?
I had to adapt the tests to the new structure but only changed the tests where it was absolutely necessary. All tests run fine.
What do you think?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-272) Rework of File Component to Remove
Tangles and simplify code
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-272:
------------------------------
Fix Version/s: 1.4.0
(was: 1.3.0)
> Rework of File Component to Remove Tangles and simplify code
> ------------------------------------------------------------
>
> Key: CAMEL-272
> URL: https://issues.apache.org/activemq/browse/CAMEL-272
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Christian Schneider
> Assignee: Hadrian Zbarcea
> Fix For: 1.4.0
>
> Attachments: file-test.zip, file.zip, new no tangles.png, old.png, patch.txt, patchfile.txt
>
>
> After my first smaller rework in issue camel-262 I now completely reworked the file component to remove any cyclic references and clean up the code.
> The first thing I did was separating the FileComponent from the other classes in package file by moving them to a new package .impl. This way I was able to remove the cycle between the strategy package and the file package.
> The second step was to move all config data from FileEndPoint to a new class FileEndPointConfig. This way I was able to remove the cycle between FileEndPoint, FileProducer and FileConsumer.
> Next I removed FileMessage and FileExchange and instead relied on the default objects. The file is simply stored in DefaultMessage.body. There was even a comment in the code asking if FileExchange was necessary before. So I hope this is ok?
> I had to adapt the tests to the new structure but only changed the tests where it was absolutely necessary. All tests run fine.
> What do you think?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (CAMEL-272) Rework of File Component to Remove
Tangles and simplify code
Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hadrian Zbarcea closed CAMEL-272.
---------------------------------
> Rework of File Component to Remove Tangles and simplify code
> ------------------------------------------------------------
>
> Key: CAMEL-272
> URL: https://issues.apache.org/activemq/browse/CAMEL-272
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Christian Schneider
> Assignee: Hadrian Zbarcea
> Fix For: 1.4.0
>
> Attachments: file-test.zip, file.zip, new no tangles.png, old.png, patch.txt, patchfile.txt
>
>
> After my first smaller rework in issue camel-262 I now completely reworked the file component to remove any cyclic references and clean up the code.
> The first thing I did was separating the FileComponent from the other classes in package file by moving them to a new package .impl. This way I was able to remove the cycle between the strategy package and the file package.
> The second step was to move all config data from FileEndPoint to a new class FileEndPointConfig. This way I was able to remove the cycle between FileEndPoint, FileProducer and FileConsumer.
> Next I removed FileMessage and FileExchange and instead relied on the default objects. The file is simply stored in DefaultMessage.body. There was even a comment in the code asking if FileExchange was necessary before. So I hope this is ok?
> I had to adapt the tests to the new structure but only changed the tests where it was absolutely necessary. All tests run fine.
> What do you think?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CAMEL-272) Rework of File Component to Remove
Tangles and simplify code
Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hadrian Zbarcea resolved CAMEL-272.
-----------------------------------
Resolution: Fixed
I ended up not using the patch. I removed the tangle by loading the factory dynamically. The factory is now pluggable via a strategy.factory.class property.
Christian, thanks for spotting this!
> Rework of File Component to Remove Tangles and simplify code
> ------------------------------------------------------------
>
> Key: CAMEL-272
> URL: https://issues.apache.org/activemq/browse/CAMEL-272
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Christian Schneider
> Assignee: Hadrian Zbarcea
> Fix For: 1.4.0
>
> Attachments: file-test.zip, file.zip, new no tangles.png, old.png, patch.txt, patchfile.txt
>
>
> After my first smaller rework in issue camel-262 I now completely reworked the file component to remove any cyclic references and clean up the code.
> The first thing I did was separating the FileComponent from the other classes in package file by moving them to a new package .impl. This way I was able to remove the cycle between the strategy package and the file package.
> The second step was to move all config data from FileEndPoint to a new class FileEndPointConfig. This way I was able to remove the cycle between FileEndPoint, FileProducer and FileConsumer.
> Next I removed FileMessage and FileExchange and instead relied on the default objects. The file is simply stored in DefaultMessage.body. There was even a comment in the code asking if FileExchange was necessary before. So I hope this is ok?
> I had to adapt the tests to the new structure but only changed the tests where it was absolutely necessary. All tests run fine.
> What do you think?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-272) Rework of File Component to Remove
Tangles and simplify code
Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42977#action_42977 ]
Hadrian Zbarcea commented on CAMEL-272:
---------------------------------------
Fixed per Mr Hawk-Eye's request. Thanks! :)
> Rework of File Component to Remove Tangles and simplify code
> ------------------------------------------------------------
>
> Key: CAMEL-272
> URL: https://issues.apache.org/activemq/browse/CAMEL-272
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Christian Schneider
> Assignee: Hadrian Zbarcea
> Fix For: 1.4.0
>
> Attachments: file-test.zip, file.zip, new no tangles.png, old.png, patch.txt, patchfile.txt
>
>
> After my first smaller rework in issue camel-262 I now completely reworked the file component to remove any cyclic references and clean up the code.
> The first thing I did was separating the FileComponent from the other classes in package file by moving them to a new package .impl. This way I was able to remove the cycle between the strategy package and the file package.
> The second step was to move all config data from FileEndPoint to a new class FileEndPointConfig. This way I was able to remove the cycle between FileEndPoint, FileProducer and FileConsumer.
> Next I removed FileMessage and FileExchange and instead relied on the default objects. The file is simply stored in DefaultMessage.body. There was even a comment in the code asking if FileExchange was necessary before. So I hope this is ok?
> I had to adapt the tests to the new structure but only changed the tests where it was absolutely necessary. All tests run fine.
> What do you think?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CAMEL-272) Rework of File Component to Remove
Tangles and simplify code
Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hadrian Zbarcea reassigned CAMEL-272:
-------------------------------------
Assignee: Hadrian Zbarcea (was: Hadrian Zbarcea)
> Rework of File Component to Remove Tangles and simplify code
> ------------------------------------------------------------
>
> Key: CAMEL-272
> URL: https://issues.apache.org/activemq/browse/CAMEL-272
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Christian Schneider
> Assignee: Hadrian Zbarcea
> Fix For: 1.4.0
>
> Attachments: file-test.zip, file.zip, new no tangles.png, old.png, patch.txt, patchfile.txt
>
>
> After my first smaller rework in issue camel-262 I now completely reworked the file component to remove any cyclic references and clean up the code.
> The first thing I did was separating the FileComponent from the other classes in package file by moving them to a new package .impl. This way I was able to remove the cycle between the strategy package and the file package.
> The second step was to move all config data from FileEndPoint to a new class FileEndPointConfig. This way I was able to remove the cycle between FileEndPoint, FileProducer and FileConsumer.
> Next I removed FileMessage and FileExchange and instead relied on the default objects. The file is simply stored in DefaultMessage.body. There was even a comment in the code asking if FileExchange was necessary before. So I hope this is ok?
> I had to adapt the tests to the new structure but only changed the tests where it was absolutely necessary. All tests run fine.
> What do you think?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-272) Rework of File Component to Remove
Tangles and simplify code
Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41156#action_41156 ]
Hadrian Zbarcea commented on CAMEL-272:
---------------------------------------
Christian, is the FileEndpointConfig class missing from the patch?
> Rework of File Component to Remove Tangles and simplify code
> ------------------------------------------------------------
>
> Key: CAMEL-272
> URL: https://issues.apache.org/activemq/browse/CAMEL-272
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Christian Schneider
> Assignee: Hadrian Zbarcea
> Fix For: 1.3.0
>
> Attachments: new no tangles.png, old.png, patch.txt
>
>
> After my first smaller rework in issue camel-262 I now completely reworked the file component to remove any cyclic references and clean up the code.
> The first thing I did was separating the FileComponent from the other classes in package file by moving them to a new package .impl. This way I was able to remove the cycle between the strategy package and the file package.
> The second step was to move all config data from FileEndPoint to a new class FileEndPointConfig. This way I was able to remove the cycle between FileEndPoint, FileProducer and FileConsumer.
> Next I removed FileMessage and FileExchange and instead relied on the default objects. The file is simply stored in DefaultMessage.body. There was even a comment in the code asking if FileExchange was necessary before. So I hope this is ok?
> I had to adapt the tests to the new structure but only changed the tests where it was absolutely necessary. All tests run fine.
> What do you think?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CAMEL-272) Rework of File Component to Remove
Tangles and simplify code
Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hadrian Zbarcea reassigned CAMEL-272:
-------------------------------------
Assignee: Hadrian Zbarcea
> Rework of File Component to Remove Tangles and simplify code
> ------------------------------------------------------------
>
> Key: CAMEL-272
> URL: https://issues.apache.org/activemq/browse/CAMEL-272
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Christian Schneider
> Assignee: Hadrian Zbarcea
> Fix For: 1.3.0
>
> Attachments: new no tangles.png, old.png, patch.txt
>
>
> After my first smaller rework in issue camel-262 I now completely reworked the file component to remove any cyclic references and clean up the code.
> The first thing I did was separating the FileComponent from the other classes in package file by moving them to a new package .impl. This way I was able to remove the cycle between the strategy package and the file package.
> The second step was to move all config data from FileEndPoint to a new class FileEndPointConfig. This way I was able to remove the cycle between FileEndPoint, FileProducer and FileConsumer.
> Next I removed FileMessage and FileExchange and instead relied on the default objects. The file is simply stored in DefaultMessage.body. There was even a comment in the code asking if FileExchange was necessary before. So I hope this is ok?
> I had to adapt the tests to the new structure but only changed the tests where it was absolutely necessary. All tests run fine.
> What do you think?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-272) Rework of File Component to Remove
Tangles and simplify code
Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Schneider updated CAMEL-272:
--------------------------------------
Attachment: patch.txt
new no tangles.png
old.png
> Rework of File Component to Remove Tangles and simplify code
> ------------------------------------------------------------
>
> Key: CAMEL-272
> URL: https://issues.apache.org/activemq/browse/CAMEL-272
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Christian Schneider
> Fix For: 1.3.0
>
> Attachments: new no tangles.png, old.png, patch.txt
>
>
> After my first smaller rework in issue camel-262 I now completely reworked the file component to remove any cyclic references and clean up the code.
> The first thing I did was separating the FileComponent from the other classes in package file by moving them to a new package .impl. This way I was able to remove the cycle between the strategy package and the file package.
> The second step was to move all config data from FileEndPoint to a new class FileEndPointConfig. This way I was able to remove the cycle between FileEndPoint, FileProducer and FileConsumer.
> Next I removed FileMessage and FileExchange and instead relied on the default objects. The file is simply stored in DefaultMessage.body. There was even a comment in the code asking if FileExchange was necessary before. So I hope this is ok?
> I had to adapt the tests to the new structure but only changed the tests where it was absolutely necessary. All tests run fine.
> What do you think?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-272) Rework of File Component to Remove
Tangles and simplify code
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42961#action_42961 ]
Claus Ibsen commented on CAMEL-272:
-----------------------------------
Hadrian. Shouldn't we reuse the helper methods on ObjectHelper to load class, create a new instance and invoke methods. It already has the try .. catch handling etc.
ObjectHelper.loadClass
ObjectHelper.newInstance
ObjectHelper.invokeMethod
> Rework of File Component to Remove Tangles and simplify code
> ------------------------------------------------------------
>
> Key: CAMEL-272
> URL: https://issues.apache.org/activemq/browse/CAMEL-272
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Christian Schneider
> Assignee: Hadrian Zbarcea
> Fix For: 1.4.0
>
> Attachments: file-test.zip, file.zip, new no tangles.png, old.png, patch.txt, patchfile.txt
>
>
> After my first smaller rework in issue camel-262 I now completely reworked the file component to remove any cyclic references and clean up the code.
> The first thing I did was separating the FileComponent from the other classes in package file by moving them to a new package .impl. This way I was able to remove the cycle between the strategy package and the file package.
> The second step was to move all config data from FileEndPoint to a new class FileEndPointConfig. This way I was able to remove the cycle between FileEndPoint, FileProducer and FileConsumer.
> Next I removed FileMessage and FileExchange and instead relied on the default objects. The file is simply stored in DefaultMessage.body. There was even a comment in the code asking if FileExchange was necessary before. So I hope this is ok?
> I had to adapt the tests to the new structure but only changed the tests where it was absolutely necessary. All tests run fine.
> What do you think?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-272) Rework of File Component to Remove
Tangles and simplify code
Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Schneider updated CAMEL-272:
--------------------------------------
Attachment: file-test.zip
file.zip
patchfile.txt
Hi Hadrian,
sorry that I reply so late. I was on a conference last week and had a bad flue afterwards.
I have created the patchfile like described in the wiki. But I am not so sure it is correct. I have created a new directory impl and the patch looks not correct there. So I have also attached complete copies of the source files in components/file as well as the corresponding tests.
I have also updated my checkout before making the patch and copies so I hope there are no conflicts.
Best regards
Christian
> Rework of File Component to Remove Tangles and simplify code
> ------------------------------------------------------------
>
> Key: CAMEL-272
> URL: https://issues.apache.org/activemq/browse/CAMEL-272
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Christian Schneider
> Assignee: Hadrian Zbarcea
> Fix For: 1.3.0
>
> Attachments: file-test.zip, file.zip, new no tangles.png, old.png, patch.txt, patchfile.txt
>
>
> After my first smaller rework in issue camel-262 I now completely reworked the file component to remove any cyclic references and clean up the code.
> The first thing I did was separating the FileComponent from the other classes in package file by moving them to a new package .impl. This way I was able to remove the cycle between the strategy package and the file package.
> The second step was to move all config data from FileEndPoint to a new class FileEndPointConfig. This way I was able to remove the cycle between FileEndPoint, FileProducer and FileConsumer.
> Next I removed FileMessage and FileExchange and instead relied on the default objects. The file is simply stored in DefaultMessage.body. There was even a comment in the code asking if FileExchange was necessary before. So I hope this is ok?
> I had to adapt the tests to the new structure but only changed the tests where it was absolutely necessary. All tests run fine.
> What do you think?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.