Large Application Design Pattern help
I am facing the following challenges in my application. i would appreciate if someone can point me to any design patterns that might be relevant to this scenario.
A user logs-in to a website a session bean is created for the particular user, her particular settings and data are used to dynamically generate her web-pages which are either constructed from data in the database or from xml files in cache that would be persisted in the database.
Everything works fine but the amount of code is getting too complicated and it is hard to maintain.
For the complex data that need to be manipulated, I am using entity beans. I am also using a native XML database for few type of XML documents since these documents needs to be updated searched and modified often and for my particular design, it seemed easier and faster to have them stored in a native XML database.
I am looking for a good design to load data from a database into an XML document and to some Java Object such as an EJB.
How caching would be accomplished in such situation.
Thanks in advance

