I'm new in the world of java and I have a question to try to understand my observations.
A few years ago, I wrote a Transaction Monitor for Unix based on XATMI specifications. This is working fine. Recently we wanted to access the services deployed in the legacy system from an application server. So, I developed a JCA connector. This connector is now very stable and quite fast :-)
Last month we went to a benchmark center to stress our new architecture. We had some performance issues in the java part but nothing very hard to solve. We used the jProfiler tool to profile the application.
Looking into the JCA connector statistics, I found something strange I didn't understand: jProfile shows where the application spends time and it's possible to drill down to see the cause. Here is a small fragment of jProfile report:
|-1,6% - 22.111ms - 4.902.679 inv. - javax.resource.cci.MappedRecord.put
| |- 1,0% - 13.833 ms - 4.902.679 inv. - eu.tsdjca.TSDRecord.put
| | |- 0,4% - 5.530 ms - 4.902.679 inv. - java.util.Map.put
My JCA connector uses a MappedRecord to pass argument to the execute method. This MappedRecord (http://java.sun.com/javaee/5/docs/api/javax/resource/cci/MappedRecord.html) is just an interface. The implementation of the interface is TSDRecord which does inly a "HashMap.put()":
public class TSDRecord implements MappedRecord
public Object put(Object key, Object value)
return hash.put((String) key, (String) value);
So my question is: "Why is it so much time wasted in "javax.resource.cci.MappedRecord.put" and in "eu.tsdjca.TSDRecord.put". Those methods do nothing !! All the work is done in HashMap.put() which is quite fast...
Thanks for your replies.