0 Replies Latest reply on Aug 7, 2003 4:32 PM by amitdk

    Coded custom finder not cached

    amitdk Newbie

      Hello,
      I have coded a custom finder in my entity bean which overrides the custom finder generated by the Container. This is valid for EJB1.1 and works fine. However I notice that the bean created through this finder doesn't seem to get cached by the container and the finder method is called every time, leading to the execution of the finder query and bean reloading everytime. Has anyone seen this behavior?

      I've noticed this in the JBoss 3.2 and prior versions. So is there some code that can be written to prevent the container from executing the query every time in my custom finder?

      Also the reason to code the custom finder versus using the jaws.xml descriptor was due to the fact that I cannot send in a NULL parameter to the custom finder. Any workarounds or observations on this? In the case when I send in a null parameter, JBOSS throws a SQLException saying :Invalid Column Type.

      If there a workaround maybe to passing NULL values as arguments? This would resolve both problems I've noted here, since I would not need to code the finder and then the container will probably cache it versus loading it everytime.

      I'd appreciate any inputs on this -

      Thanks
      Amit