You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "surya (JIRA)" <ji...@apache.org> on 2011/08/06 03:43:28 UTC

[jira] [Created] (CAMEL-4311) Camel Bindy Parser One to Many KvP Unmarshall Issue

Camel Bindy Parser One to Many KvP Unmarshall Issue
---------------------------------------------------

                 Key: CAMEL-4311
                 URL: https://issues.apache.org/jira/browse/CAMEL-4311
             Project: Camel
          Issue Type: Bug
          Components: camel-bindy
    Affects Versions: 2.8.0, 2.7.3, 2.7.2, 2.7.0
         Environment: Windows, Linux 
            Reporter: surya
            Priority: Minor
             Fix For: 2.9.0


Bindy KvP unmarshall issue. 

While unmarshalling FIX messages, camel-bindy causing inconsistencies if the incoming fix messages are defined to map using 'OneToMany' annotations.

In a given route for eg:

 BindyKeyValuePairDataFormat kvpBindyDataFormat = new BindyKeyValuePairDataFormat("org.apache.camel.dataformat.bindy.model.fix.complex.onetomany");
        public void configure() {
            from(URI_DIRECT_START).unmarshal(kvpBindyDataFormat).to(URI_MOCK_RESULT);
        }

kvpBindyDataFormat is single instance for multiple threads and with in 'BindyKeyValuePairFactory' class instance varialbe  below is shared across multiple threads causing data inconsistencies.

private Map<String, List<Object>> lists = new HashMap<String, List<Object>>(); 

Values from previous thread/messages are retained in the current thread causing issues.

For eg in the test case: public class BindyComplexOneToManyKeyValuePairUnMarshallTest extends CommonBindyTest 

if we send another message  with no repeating groups are sent.

String message2 = "8=FIX 4.19=2034=135=049=INVMGR56=BRKR" + "1=BE.CHM.00111=CHM0001-0158=this is a camel - bindy test" 
        				  + "10=220";

The output message has repeating group data from message processed in earlier thread are pouplated causing data inconsistencies.

Please suggest the fix considering multi-threading scenario. I am willing to volunteer for the fix.

Regards,
Surya



 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4311) Camel Bindy Parser One to Many KvP Unmarshall Issue

Posted by "surya (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

surya updated CAMEL-4311:
-------------------------

    Attachment: BindyKeyValuePairFactory_patch_4311.txt
                BindyKeyValuePairDataFormat_patch_4311.txt
                BindyComplexOneToManyKeyValuePairUnMarshallTest_patch_4311.txt

patch files for 4133.

> Camel Bindy Parser One to Many KvP Unmarshall Issue
> ---------------------------------------------------
>
>                 Key: CAMEL-4311
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4311
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-bindy
>    Affects Versions: 2.7.0, 2.7.2, 2.7.3, 2.8.0
>         Environment: Windows, Linux 
>            Reporter: surya
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: BindyComplexOneToManyKeyValuePairUnMarshallTest_patch_4311.txt, BindyKeyValuePairDataFormat_patch_4311.txt, BindyKeyValuePairFactory_patch_4311.txt
>
>
> Bindy KvP unmarshall issue. 
> While unmarshalling FIX messages, camel-bindy causing inconsistencies if the incoming fix messages are defined to map using 'OneToMany' annotations.
> In a given route for eg:
>  BindyKeyValuePairDataFormat kvpBindyDataFormat = new BindyKeyValuePairDataFormat("org.apache.camel.dataformat.bindy.model.fix.complex.onetomany");
>         public void configure() {
>             from(URI_DIRECT_START).unmarshal(kvpBindyDataFormat).to(URI_MOCK_RESULT);
>         }
> kvpBindyDataFormat is single instance for multiple threads and with in 'BindyKeyValuePairFactory' class instance varialbe  below is shared across multiple threads causing data inconsistencies.
> private Map<String, List<Object>> lists = new HashMap<String, List<Object>>(); 
> Values from previous thread/messages are retained in the current thread causing issues.
> For eg in the test case: public class BindyComplexOneToManyKeyValuePairUnMarshallTest extends CommonBindyTest 
> if we send another message  with no repeating groups are sent.
> String message2 = "8=FIX 4.19=2034=135=049=INVMGR56=BRKR" + "1=BE.CHM.00111=CHM0001-0158=this is a camel - bindy test" 
>         				  + "10=220";
> The output message has repeating group data from message processed in earlier thread are pouplated causing data inconsistencies.
> Please suggest the fix considering multi-threading scenario. I am willing to volunteer for the fix.
> Regards,
> Surya
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4311) Camel Bindy Parser One to Many KvP Unmarshall Issue

Posted by "surya (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

surya updated CAMEL-4311:
-------------------------

    Attachment:     (was: BindyKeyValuePairFactory_patch_4311.txt)

> Camel Bindy Parser One to Many KvP Unmarshall Issue
> ---------------------------------------------------
>
>                 Key: CAMEL-4311
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4311
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-bindy
>    Affects Versions: 2.7.0, 2.7.2, 2.7.3, 2.8.0
>         Environment: Windows, Linux 
>            Reporter: surya
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: BindyComplexOneToManyKeyValuePairUnMarshallTest_patch_4311.txt, BindyKeyValuePairDataFormat_patch_4311.txt, BindyKeyValuePairFactory_patch_4311.txt
>
>
> Bindy KvP unmarshall issue. 
> While unmarshalling FIX messages, camel-bindy causing inconsistencies if the incoming fix messages are defined to map using 'OneToMany' annotations.
> In a given route for eg:
>  BindyKeyValuePairDataFormat kvpBindyDataFormat = new BindyKeyValuePairDataFormat("org.apache.camel.dataformat.bindy.model.fix.complex.onetomany");
>         public void configure() {
>             from(URI_DIRECT_START).unmarshal(kvpBindyDataFormat).to(URI_MOCK_RESULT);
>         }
> kvpBindyDataFormat is single instance for multiple threads and with in 'BindyKeyValuePairFactory' class instance varialbe  below is shared across multiple threads causing data inconsistencies.
> private Map<String, List<Object>> lists = new HashMap<String, List<Object>>(); 
> Values from previous thread/messages are retained in the current thread causing issues.
> For eg in the test case: public class BindyComplexOneToManyKeyValuePairUnMarshallTest extends CommonBindyTest 
> if we send another message  with no repeating groups are sent.
> String message2 = "8=FIX 4.19=2034=135=049=INVMGR56=BRKR" + "1=BE.CHM.00111=CHM0001-0158=this is a camel - bindy test" 
>         				  + "10=220";
> The output message has repeating group data from message processed in earlier thread are pouplated causing data inconsistencies.
> Please suggest the fix considering multi-threading scenario. I am willing to volunteer for the fix.
> Regards,
> Surya
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4311) Camel Bindy Parser One to Many KvP Unmarshall Issue

Posted by "surya (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080450#comment-13080450 ] 

surya commented on CAMEL-4311:
------------------------------

changed few files to handle instance variable causing issues while parsing messages in multi threaded situation.

Changed instance variable to local.

added new method     
public void bind(List<String> data, Map<String, Object> model, int line, Map<String, List<Object>> lists) throws Exception {

Map<String, List<Object>> lists was instance variable root cause of bug.

patches for two java classes and 1 test case. Existing test case updated, sending multiple messages would cause test case to fail without the fix.

Please review and let me know if anything else need to be updated.

Regards,
Surya


> Camel Bindy Parser One to Many KvP Unmarshall Issue
> ---------------------------------------------------
>
>                 Key: CAMEL-4311
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4311
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-bindy
>    Affects Versions: 2.7.0, 2.7.2, 2.7.3, 2.8.0
>         Environment: Windows, Linux 
>            Reporter: surya
>            Priority: Minor
>             Fix For: 2.9.0
>
>
> Bindy KvP unmarshall issue. 
> While unmarshalling FIX messages, camel-bindy causing inconsistencies if the incoming fix messages are defined to map using 'OneToMany' annotations.
> In a given route for eg:
>  BindyKeyValuePairDataFormat kvpBindyDataFormat = new BindyKeyValuePairDataFormat("org.apache.camel.dataformat.bindy.model.fix.complex.onetomany");
>         public void configure() {
>             from(URI_DIRECT_START).unmarshal(kvpBindyDataFormat).to(URI_MOCK_RESULT);
>         }
> kvpBindyDataFormat is single instance for multiple threads and with in 'BindyKeyValuePairFactory' class instance varialbe  below is shared across multiple threads causing data inconsistencies.
> private Map<String, List<Object>> lists = new HashMap<String, List<Object>>(); 
> Values from previous thread/messages are retained in the current thread causing issues.
> For eg in the test case: public class BindyComplexOneToManyKeyValuePairUnMarshallTest extends CommonBindyTest 
> if we send another message  with no repeating groups are sent.
> String message2 = "8=FIX 4.19=2034=135=049=INVMGR56=BRKR" + "1=BE.CHM.00111=CHM0001-0158=this is a camel - bindy test" 
>         				  + "10=220";
> The output message has repeating group data from message processed in earlier thread are pouplated causing data inconsistencies.
> Please suggest the fix considering multi-threading scenario. I am willing to volunteer for the fix.
> Regards,
> Surya
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-4311) Camel Bindy Parser One to Many KvP Unmarshall Issue

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-4311.
--------------------------------

    Resolution: Fixed

Thanks for the patch. Keep 'em coming :)

> Camel Bindy Parser One to Many KvP Unmarshall Issue
> ---------------------------------------------------
>
>                 Key: CAMEL-4311
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4311
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-bindy
>    Affects Versions: 2.7.0, 2.7.2, 2.7.3, 2.8.0
>         Environment: Windows, Linux 
>            Reporter: surya
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: BindyComplexOneToManyKeyValuePairUnMarshallTest_patch_4311.txt, BindyKeyValuePairDataFormat_patch_4311.txt, BindyKeyValuePairFactory_patch_4311.txt
>
>
> Bindy KvP unmarshall issue. 
> While unmarshalling FIX messages, camel-bindy causing inconsistencies if the incoming fix messages are defined to map using 'OneToMany' annotations.
> In a given route for eg:
>  BindyKeyValuePairDataFormat kvpBindyDataFormat = new BindyKeyValuePairDataFormat("org.apache.camel.dataformat.bindy.model.fix.complex.onetomany");
>         public void configure() {
>             from(URI_DIRECT_START).unmarshal(kvpBindyDataFormat).to(URI_MOCK_RESULT);
>         }
> kvpBindyDataFormat is single instance for multiple threads and with in 'BindyKeyValuePairFactory' class instance varialbe  below is shared across multiple threads causing data inconsistencies.
> private Map<String, List<Object>> lists = new HashMap<String, List<Object>>(); 
> Values from previous thread/messages are retained in the current thread causing issues.
> For eg in the test case: public class BindyComplexOneToManyKeyValuePairUnMarshallTest extends CommonBindyTest 
> if we send another message  with no repeating groups are sent.
> String message2 = "8=FIX 4.19=2034=135=049=INVMGR56=BRKR" + "1=BE.CHM.00111=CHM0001-0158=this is a camel - bindy test" 
>         				  + "10=220";
> The output message has repeating group data from message processed in earlier thread are pouplated causing data inconsistencies.
> Please suggest the fix considering multi-threading scenario. I am willing to volunteer for the fix.
> Regards,
> Surya
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4311) Camel Bindy Parser One to Many KvP Unmarshall Issue

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-4311:
-------------------------------

                Labels:   (was: patch)
    Remaining Estimate:     (was: 168h)
     Original Estimate:     (was: 168h)

You are welcome to try to fix this and work on a patch.

> Camel Bindy Parser One to Many KvP Unmarshall Issue
> ---------------------------------------------------
>
>                 Key: CAMEL-4311
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4311
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-bindy
>    Affects Versions: 2.7.0, 2.7.2, 2.7.3, 2.8.0
>         Environment: Windows, Linux 
>            Reporter: surya
>            Priority: Minor
>             Fix For: 2.9.0
>
>
> Bindy KvP unmarshall issue. 
> While unmarshalling FIX messages, camel-bindy causing inconsistencies if the incoming fix messages are defined to map using 'OneToMany' annotations.
> In a given route for eg:
>  BindyKeyValuePairDataFormat kvpBindyDataFormat = new BindyKeyValuePairDataFormat("org.apache.camel.dataformat.bindy.model.fix.complex.onetomany");
>         public void configure() {
>             from(URI_DIRECT_START).unmarshal(kvpBindyDataFormat).to(URI_MOCK_RESULT);
>         }
> kvpBindyDataFormat is single instance for multiple threads and with in 'BindyKeyValuePairFactory' class instance varialbe  below is shared across multiple threads causing data inconsistencies.
> private Map<String, List<Object>> lists = new HashMap<String, List<Object>>(); 
> Values from previous thread/messages are retained in the current thread causing issues.
> For eg in the test case: public class BindyComplexOneToManyKeyValuePairUnMarshallTest extends CommonBindyTest 
> if we send another message  with no repeating groups are sent.
> String message2 = "8=FIX 4.19=2034=135=049=INVMGR56=BRKR" + "1=BE.CHM.00111=CHM0001-0158=this is a camel - bindy test" 
>         				  + "10=220";
> The output message has repeating group data from message processed in earlier thread are pouplated causing data inconsistencies.
> Please suggest the fix considering multi-threading scenario. I am willing to volunteer for the fix.
> Regards,
> Surya
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CAMEL-4311) Camel Bindy Parser One to Many KvP Unmarshall Issue

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-4311:
----------------------------------

    Assignee: Claus Ibsen

> Camel Bindy Parser One to Many KvP Unmarshall Issue
> ---------------------------------------------------
>
>                 Key: CAMEL-4311
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4311
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-bindy
>    Affects Versions: 2.7.0, 2.7.2, 2.7.3, 2.8.0
>         Environment: Windows, Linux 
>            Reporter: surya
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: BindyComplexOneToManyKeyValuePairUnMarshallTest_patch_4311.txt, BindyKeyValuePairDataFormat_patch_4311.txt, BindyKeyValuePairFactory_patch_4311.txt
>
>
> Bindy KvP unmarshall issue. 
> While unmarshalling FIX messages, camel-bindy causing inconsistencies if the incoming fix messages are defined to map using 'OneToMany' annotations.
> In a given route for eg:
>  BindyKeyValuePairDataFormat kvpBindyDataFormat = new BindyKeyValuePairDataFormat("org.apache.camel.dataformat.bindy.model.fix.complex.onetomany");
>         public void configure() {
>             from(URI_DIRECT_START).unmarshal(kvpBindyDataFormat).to(URI_MOCK_RESULT);
>         }
> kvpBindyDataFormat is single instance for multiple threads and with in 'BindyKeyValuePairFactory' class instance varialbe  below is shared across multiple threads causing data inconsistencies.
> private Map<String, List<Object>> lists = new HashMap<String, List<Object>>(); 
> Values from previous thread/messages are retained in the current thread causing issues.
> For eg in the test case: public class BindyComplexOneToManyKeyValuePairUnMarshallTest extends CommonBindyTest 
> if we send another message  with no repeating groups are sent.
> String message2 = "8=FIX 4.19=2034=135=049=INVMGR56=BRKR" + "1=BE.CHM.00111=CHM0001-0158=this is a camel - bindy test" 
>         				  + "10=220";
> The output message has repeating group data from message processed in earlier thread are pouplated causing data inconsistencies.
> Please suggest the fix considering multi-threading scenario. I am willing to volunteer for the fix.
> Regards,
> Surya
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4311) Camel Bindy Parser One to Many KvP Unmarshall Issue

Posted by "surya (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

surya updated CAMEL-4311:
-------------------------

    Attachment: BindyKeyValuePairFactory_patch_4311.txt

update comments in patch file. 

> Camel Bindy Parser One to Many KvP Unmarshall Issue
> ---------------------------------------------------
>
>                 Key: CAMEL-4311
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4311
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-bindy
>    Affects Versions: 2.7.0, 2.7.2, 2.7.3, 2.8.0
>         Environment: Windows, Linux 
>            Reporter: surya
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: BindyComplexOneToManyKeyValuePairUnMarshallTest_patch_4311.txt, BindyKeyValuePairDataFormat_patch_4311.txt, BindyKeyValuePairFactory_patch_4311.txt, BindyKeyValuePairFactory_patch_4311.txt
>
>
> Bindy KvP unmarshall issue. 
> While unmarshalling FIX messages, camel-bindy causing inconsistencies if the incoming fix messages are defined to map using 'OneToMany' annotations.
> In a given route for eg:
>  BindyKeyValuePairDataFormat kvpBindyDataFormat = new BindyKeyValuePairDataFormat("org.apache.camel.dataformat.bindy.model.fix.complex.onetomany");
>         public void configure() {
>             from(URI_DIRECT_START).unmarshal(kvpBindyDataFormat).to(URI_MOCK_RESULT);
>         }
> kvpBindyDataFormat is single instance for multiple threads and with in 'BindyKeyValuePairFactory' class instance varialbe  below is shared across multiple threads causing data inconsistencies.
> private Map<String, List<Object>> lists = new HashMap<String, List<Object>>(); 
> Values from previous thread/messages are retained in the current thread causing issues.
> For eg in the test case: public class BindyComplexOneToManyKeyValuePairUnMarshallTest extends CommonBindyTest 
> if we send another message  with no repeating groups are sent.
> String message2 = "8=FIX 4.19=2034=135=049=INVMGR56=BRKR" + "1=BE.CHM.00111=CHM0001-0158=this is a camel - bindy test" 
>         				  + "10=220";
> The output message has repeating group data from message processed in earlier thread are pouplated causing data inconsistencies.
> Please suggest the fix considering multi-threading scenario. I am willing to volunteer for the fix.
> Regards,
> Surya
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4311) Camel Bindy Parser One to Many KvP Unmarshall Issue

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-4311:
-------------------------------

    Fix Version/s: 2.8.1

> Camel Bindy Parser One to Many KvP Unmarshall Issue
> ---------------------------------------------------
>
>                 Key: CAMEL-4311
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4311
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-bindy
>    Affects Versions: 2.7.0, 2.7.2, 2.7.3, 2.8.0
>         Environment: Windows, Linux 
>            Reporter: surya
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.8.1, 2.9.0
>
>         Attachments: BindyComplexOneToManyKeyValuePairUnMarshallTest_patch_4311.txt, BindyKeyValuePairDataFormat_patch_4311.txt, BindyKeyValuePairFactory_patch_4311.txt
>
>
> Bindy KvP unmarshall issue. 
> While unmarshalling FIX messages, camel-bindy causing inconsistencies if the incoming fix messages are defined to map using 'OneToMany' annotations.
> In a given route for eg:
>  BindyKeyValuePairDataFormat kvpBindyDataFormat = new BindyKeyValuePairDataFormat("org.apache.camel.dataformat.bindy.model.fix.complex.onetomany");
>         public void configure() {
>             from(URI_DIRECT_START).unmarshal(kvpBindyDataFormat).to(URI_MOCK_RESULT);
>         }
> kvpBindyDataFormat is single instance for multiple threads and with in 'BindyKeyValuePairFactory' class instance varialbe  below is shared across multiple threads causing data inconsistencies.
> private Map<String, List<Object>> lists = new HashMap<String, List<Object>>(); 
> Values from previous thread/messages are retained in the current thread causing issues.
> For eg in the test case: public class BindyComplexOneToManyKeyValuePairUnMarshallTest extends CommonBindyTest 
> if we send another message  with no repeating groups are sent.
> String message2 = "8=FIX 4.19=2034=135=049=INVMGR56=BRKR" + "1=BE.CHM.00111=CHM0001-0158=this is a camel - bindy test" 
>         				  + "10=220";
> The output message has repeating group data from message processed in earlier thread are pouplated causing data inconsistencies.
> Please suggest the fix considering multi-threading scenario. I am willing to volunteer for the fix.
> Regards,
> Surya
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira