0 Replies Latest reply on Sep 14, 2006 8:13 AM by juergen.zimmermann

    Refresh POJOs in a JSP

    juergen.zimmermann

      I'm using Struts and JBoss/EJB3. The Struts Action invokes an EJB3 Session Bean and gets a collection of objects, e.g. objects of class Customer.

      Later the retrieved objects are displayed in a JSP (and the EJB3 entity manager is gone). If I want to display also the orders of each customer I have a problem with lazy loading.

      OK, one solution is to use a fetch join inside the EJB code so that each customer's orders are loaded in advance.

      However, for flexibility (not performance) reasons I'm looking for a solution regarding my JSPs. How can I reload inside a JSP the referenced objects that were not loaded in the cache, yet? Any hint is appreciated!