• Post Reply Bookmark Topic Watch Topic
  • New Topic

Design Decision on EJB  RSS feed

 
Saritha Penumudi
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am working on a web application which can be used in distributed environment. It is decided that we should use EJB for this. In my design I have used Value Objects to send data across the network. I mean between Struts framework and EJB.

As all the data is being passed as valueObjects in a method parameter, my beans does have any attributes. Hence I thought of using Stateless session beans for this. Does I have any synchronization problems with this approach?.

I have few business specific classes and some utility classes. Do you suggest to use Session beans for all my classes or go with EJB for business classes and normal java classes for utility classes. Please suggest me on this.

I thought of having DB classes for accessing database. Most of my queries would be complex queries with joins to n number of tables. Do you suggest me to go with BMP or go with just normal java classes that access database.

I would really appreciate your replys on this.

Thank you in advance
Saritha
 
Saritha Penumudi
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please help me out
 
Sebastian Hennebrueder
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
where to put business logic is more a design question. I prefere to put business logic into session beans to keep it at one point.

I try to make classes only for visual design as "normal" classes. Depending on the application you could think about a business delegate pattern to access the session beans instead of accessing it directly by actions

For complex joins think about views. Entity EJB can access Views.

Sebastian
 
Saritha Penumudi
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for your reply.

I have been hearing since long that Entity Beans costs very much. Their performance is low. Do you suggest me to use Entity beans?.

When do I have to anticipate using EJB?. I think of using them when my application should work in distributed environment. In this case, I am not sure if my utility classes should be just normal java classes or they should be EJB as they are extensively used in all my business classes, which makes my business classes and utility classes more coupled with each other.

Please clarify me on this
Thank you
Saritha
 
Susanta Chatterjee
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been hearing since long that Entity Beans costs very much. Their performance is low. Do you suggest me to use Entity beans?.


If you are using a container with EJB 1.1, entity bean performance could be poor, but that is not true with EJB 2.0, as you can have local entities, to be accessed by session bean business methods. And if you can stay away from stateful session bean, you should not worry about performance problem only because of entity beans. There could be many other areas in a standard J2EE applications, which may cause sluggish response time.
 
Saritha Penumudi
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I really appreciate your reply.

If you could sight some of the scenarios which I need to take care of would be a great help to me.

Thank you very much

Saritha
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!