Modular Web-based system and session management 2004-08-16 - By Yagiz Erkan
Back Hi all,
I'm working on a large but modularized Web-based J2EE project. We split the whole system into subprojects and we develop them one by one. We don't have time to do an up-front global design however there are some things that we know, including cross-module session access, and my question is going to be about this last point.
Let's say we're going to have 6 modules when the system is completely operational. There is going to be some kind of integration between them. For instance, if the user uses a phone number in module 2, she may decide to access module 1 and have the phone no available. Or, she may be using module 3, she may want to hit the "hold" button to store the session information, then she may start something new from scratch and when she finishes the latter work, she may go back to the former by hitting "restore" button, bringing back all the old data (I was thinking without database access. I think that if the context data is large, it's worth going to the database in order not to clutter the session object.).
I'm thinking about creating contexts for each module and store them in the session. The contexts may be empty most of the time. Let's say the phone number for module 1 isn't the same as the phone number for the module 2 because in the session I'll have an object of type Module1Context and another one of type Module2Context. Inter-modular communication means copying some information from one module context to another module context. Holding and restoring data means replicating the context state (Memento pattern probably?!?) for later replacement.
Please let me know what you think about it! Have you had to deal with something similar in the past? I'd greatly appreciate any comments!
Thanks,
- Yagiz -
=========================================================================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help".
|
|