Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Domain Objects and Service Oriented Design Pattern

 
sandipan shandilya
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic