I am sure that this has a very simple explanation, however I am still very much in the learning phase with CXF.
I have built a simple web service using the tooling in Eclipse (Dynamic web project / Glassfish 3 / CXF 2.4). The service receives a String and writes it to a database. I have noticed that after running for some time the application runs out of heap space. Using a profiling tool I found that for each invocation of the service an implementation object was created on the heap. These remained until the JVM ran out of heap space. From a posting on Stack Overflow ( http://stackoverflow.com/questions/8427329/possible-memory-leak-cxf-2-4-2-glassfish-3) it was suggested that a service implementation should essentially be a Singleton and only one instance should ever be created which is clearly not the case in my situation. I have started to think that it may have something to do with the way I have configured CXF although I have not been able to find any information that relates to the issue that I am experiencing. There is obviously a hole in my understanding or the code that I have written - any advice or guidance would be very much appreciated. Marcus
