Dynamic Proxy and OutOfMemoryError


Performance and scalability: Dynamic Proxy and OutOfMemoryError

  1. Dynamic Proxy and OutOfMemoryError (1 messages)

    I ran into this problem before when working with Proxied objects. I am integrating iBatis into my framework and using Dynamic Proxies to allow a developer to pass in a DAO interface and the Dynamic Proxy will retrieve the correct iBatis SQL Map and run it according to the DAO interface method. Some of these DAO methods take parameters that are lists with 100,000s of records. When I run my batch process using Dynamic Proxies, I get OutOfMemoryError in WebLogic. When I remove the Dynamic Proxy and create a simple implementation for my DAO that I use instead of Proxying it, I get no error and my process runs fine. Any thoughts? Does sending huge amounts of data through a Proxy or doing quite a bit of activity inside a Proxied object cause OutOfMemoryErrors? Thanks, -jay blanton
  2. When you are tunneling calls through the DP please limit the amount of processing being done there. Any way Reflections are little heavy when compared to direct method calls.