baptiste
Oct 29th, 2004, 11:59 AM
Hi all,
I'm the architect of a recently started J2EE project. We're heading towards a canonical layered architecture, with SLSBs and MDBs as facades delegating work to POJOs (services) accessing the domain model objects. Clients are remote Swing-based thicks apps (webstarted) and a RDBMS is used for data storage. The chosen appserver is JBoss 4. I've started playing around a bit with Spring and Hibernate (both of which I didn't practiced before) and I begin to understand the fundamentals.
Now for my problem: I'd like to make our domain model as feature-rich as possible. In particular, certains of its objects should be made observable in order to dynamically react to data modification.
I know about the classic GoF observer pattern and its Java implementation. This is observation of instances of a class. Since Spring/Hibernate is in charge of domain model classes instanciation (getHibernateTemplate().load(XXXclass...))), I can't figure out how to make all of them observable by one or many instances of other classes. AOP maybe ?
I'm new to Spring so be indulgent if the answer is trivial.
Thanks in advance for any clues,
Baptiste
I'm the architect of a recently started J2EE project. We're heading towards a canonical layered architecture, with SLSBs and MDBs as facades delegating work to POJOs (services) accessing the domain model objects. Clients are remote Swing-based thicks apps (webstarted) and a RDBMS is used for data storage. The chosen appserver is JBoss 4. I've started playing around a bit with Spring and Hibernate (both of which I didn't practiced before) and I begin to understand the fundamentals.
Now for my problem: I'd like to make our domain model as feature-rich as possible. In particular, certains of its objects should be made observable in order to dynamically react to data modification.
I know about the classic GoF observer pattern and its Java implementation. This is observation of instances of a class. Since Spring/Hibernate is in charge of domain model classes instanciation (getHibernateTemplate().load(XXXclass...))), I can't figure out how to make all of them observable by one or many instances of other classes. AOP maybe ?
I'm new to Spring so be indulgent if the answer is trivial.
Thanks in advance for any clues,
Baptiste