wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Domain Objects and Service Oriented Design Pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Domain Objects and Service Oriented Design Pattern" Watch "Domain Objects and Service Oriented Design Pattern" New topic
Author

Domain Objects and Service Oriented Design Pattern

sandipan shandilya
Greenhorn

Joined: Dec 14, 2005
Posts: 1
We have J2EE based application with following components, we are facing some issues with existing system.

Current System : We have J2EE based application. The following is the flow.
Client Layer [including JSP, Struts ]-> action classes -> Delegates -> Session fa�ade [Session bean] -> DAO -> EJBDAO -> EJB. We use CMP,CMR, xDoclets , JBOSS.

1. Our Domain objects are heavy. I know they are suppose to be coarse objects but they take more time in loading. Also, we noticed one thing that lot of methods are called during Domain Object creation process and it takes lot of time in loading. Actually, we dont really know what is happening as we are using CMPs.

Question :
- Any input on what can be done to avoid Domain object excessive loading time.
- Anyone can share there experiences with Domain objects. Are you facing issues related with performance.
- We dont use DTO, we pass domain objects between. Do you see any problem in doing that.

2. Currently, our system was used by one single front end or lets say we have only one client but soon we will have more clients using it.
Question :
- What should be our design approach. How can we make our system more like service oriented. If the two clients demand different business logic then how it will be handled. Business logic common to all the clients will be handled by which layer and business logic specific to client will be handles by which layer.
- Please suggest based on our existing infrastructure. We don�t want to use SOAP or cannot make drastic changes to our flow.

Your inputs will be very helpful.
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
Our Domain objects are heavy. I know they are suppose to be coarse objects but they take more time in loading. Also, we noticed one thing that lot of methods are called during Domain Object creation process and it takes lot of time in loading. Actually, we dont really know what is happening as we are using CMPs.

What do you mean by "domain objects"? And if your are not clear what is happening, how do you know that these objects are taking a long time to load?


We dont use DTO, we pass domain objects between. Do you see any problem in doing that

When you pass args and return types between delegates and the Session fa�ade, I'd expect you to be passing serializable DTOs (which encapsulate the business data) in order to reduce network traffic. Typically, the Session fa�ade would expose course-grained methods which accept the DTOs, and it would be up to the underlying EJBs to read the DTOs in order to invoke their own fine-grained methods.


If the two clients demand different business logic then how it will be handled. Business logic common to all the clients will be handled by which layer and business logic specific to client will be handles by which layer.

The business logic will still be done by the EJBs, so additional and/or modified methods will be needed for new requirements. The EJB layer must know nothing about the client, it just processes requests coming in from the client proxy, ie the delegate. It is possible that an EJB will need to create multiple types of DTOs depending on the client request.


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Domain Objects and Service Oriented Design Pattern