aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Value Objects in BMPs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Value Objects in BMPs" Watch "Value Objects in BMPs" New topic
Author

Value Objects in BMPs

seshu Palamanti
Ranch Hand

Joined: Jul 03, 2004
Posts: 59
I have a session bean which finds a BMP bean by its primary key using ejbFindbyPrimarykey() then to retrieve other values of the bean i use get methods to populate a Value object in session bean.How about setting and sending in the value object itself from with in the BMP bean.Does it work...? is it a good practice?.

Thanks in Advance.
Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
Yes it works and yes it�s a good practice. If you access the bean remotely through its remote interface is better to have coarse-grained methods that get/set bean�s attributes at once (passing or retrieving a VO). However if the bean is always accessed locally, then you might use fine-grained methods for getting/setting bean�s attributes one by one. As I understand from your design, the entity bean is hidden from the clients through a session fa�ade, which again is a good practice. Just make sure that the session ejb accesses the entity bean through its local interface.
Regards.


I think, therefore I exist -- Rene Descartes
 
jQuery in Action, 2nd edition
 
subject: Value Objects in BMPs