Moving to Dev I found InputTransportMessageConfiguration using ConcurrentHashMap<String, String>() by default, In my opinion this is over kill we can just go with the HashMap<String, String>(),
If the map implementation also plays a role here, then we have to fix the equal method to handle this appropriately Suho On Sat, May 11, 2013 at 1:45 AM, Mohanadarshan Vivekanandalingam < [email protected]> wrote: > Hi Lasantha, > > Yes, there is a change in the hash map... but Lasantha, If u see the Test > module that we created the you can see that we have > just set the values just as shown below (same as u tried) > > InputTransportMessageConfiguration > inputTransportMessageConfiguration = new > InputTransportMessageConfiguration(); > > inputTransportMessageConfiguration.addInputMessageProperty("streamName", > "org.wso2.phone.retail.store"); > > inputTransportMessageConfiguration.addInputMessageProperty("version", > "1.2.0"); > > but on that situation it works fine without any issue... But please check > after changing the HashMap to ConcurrentMap in createTopic method whether > it works.. If it works then there is an issue... > > And there is no any commonpropery methods in > InputTransportMessageConfiguration or OutputMessageConfiguration.. > > Thanks, > Mohan > > > On Sat, May 11, 2013 at 12:58 AM, Lasantha Fernando <[email protected]>wrote: > >> Hi Mohan, Suho, >> >> When subscribing to AgentTransportType in TransportAdaptor component I >> hit a small issue. >> >> I think the 'InputTransportMessageConfiguration' class keeps its >> properties in 'ConcurrentHashMap' by default. I did not add a separate Map >> instance when creating a 'InputTransportMessageConfiguration' instance from >> EventBuilder component and used the 'addInput/CommonProperty' method. But >> when 'AgentTransportType' receives data from the other side, when creating >> a topic, it creates a 'HashMap' instance and directly adds that to >> 'InputTransportMessageConfiguration' to keep properties. >> >> So even for the same exact property parameters, you get two different >> 'InputTransportMessageConfiguration' objects since the implementations of >> the 'Map' are different. This results in event-builder subscribing to one >> event stream and the data publisher publishing to another since the key >> used in mapping 'InputTransportMessageConfiguration' to 'TransportListener' >> is the 'InputTransportMessageConfiguration' itself. >> >> Wouldn't that lead to some issues since the one who is supplying the >> 'InputTransportMessageConfiguration' can change the property map and send a >> different instance with same configuration parameters? >> >> I can, of course, manually change the property map type when creating the >> instance at EventBuilder component and send to see whether subscription >> happens properly. Didn't get to try it out that way yet. Will try it and >> update. >> >> Thanks, >> Lasantha >> >> -- >> *Lasantha Fernando* >> Software Engineer - Data Technologies Team >> WSO2 Inc. http://wso2.com >> >> email: [email protected] >> mobile: (+94) 71 5247551 >> > > > > -- > *V. Mohanadarshan* > *Software Engineer,* > *Data Technologies Team,* > *WSO2, Inc. http://wso2.com * > *lean.enterprise.middleware.* > * > * > email: [email protected] > phone:(+94) 771117673 > -- *S. Suhothayan * *Software Engineer, Member, Management Committee - Data Technologies Team, * * * *WSO2 Inc. **http://wso2.com <http://wso2.com/>* *lean . enterprise . middleware* *cell: (+94) 779 756 757 blog: **http://suhothayan.blogspot.com/* <http://suhothayan.blogspot.com/>* twitter: **http://twitter.com/suhothayan* <http://twitter.com/suhothayan>* linked-in: **http://lk.linkedin.com/in/suhothayan* * *
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
