Design Question - Backing Beans, Business Beans

Hello All, I am creating a web app with only POJO's. Now before I get too far into the design wanted to confirm with you if I'm doing the right thing.

The layers integrate as follows:

Web Tier (JSF, JSP pages + Backing beans) --> Business object Managers (BOMs) --> Business Objects.

So the BOMs act as the middlemen for receiving data from the backing beans & creating/updating/deleting+retrieving/storing Business objects (Bobs).

The obvious question that comes up is where do I hold the reference to the Business Objects (Bobs), once they have been created, as follows:

1) Store a reference to the Bobs in the Backing beans which are mainly defined to be in session scope in my case and are Managed via JSF.

Problem is that my backing beans are 'page oriented'.

Example: Login page has a Login backing bean which receives the uid/pwd & a reference to the Form JSF component (for updating with faces messages). If upon successful login, I put the reference to the "User" Bob back here, then later when I want to check how many books this user has taken out from the library, I have to go through the Login backing bean to access the User Bob --> obviously not very appetizing.

2) Store a reference to the Bobs in the session scope via JSF External Context as if this were a web app from the past century --> not very cool.

3) ?

As I'm new to app building / jsf, not too clear on where to store my model info. Your inputs are much appreciated.

Thanks, Bhishma

[1558 byte] By [Bhishmaa] at [2007-11-27 9:58:27]
# 1
I'd suggest configuring your business object beans via JSF. You might consider using a separate config file.If that is distasteful to you, you might want to look into using the Spring framework.
RaymondDeCampoa at 2007-7-13 0:29:07 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...