• Post Reply Bookmark Topic Watch Topic
  • New Topic

Methods calling in session bean

 
manish syal
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are two ways to call a method from session bean .
One is client look for each bean and call methods from the beans one after other
Other is bean itself looks for the methods in other beans and then client only calls the reqired method.
Which of this is the right appraoch and when to use them
 
Tim Holloway
Bartender
Posts: 18414
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's right is what works for you. It's commonly considered to be good practice to put all your business logic in a session bean and have the session bean do all the interaction with entity beans, but in many simple cases, it's easier to put the business logic in a servlet and invoke the entity beans directly.
The extra layer is most beneficial when creating a business package where you want to provide the business logic totally independent of any user-interface component and/or where you want to take advantage of the extr security mechanisms that EJBs offer.
 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just started to learn EJB by follow the examples in "The Java 2 Enterprise Edition Developer's Guide" by Sun.
How to package the files and classes in stead of putting everything in the root directory ? Please comments.
Thanks,
Ruilin
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!