Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Is it Right  RSS feed

 
Sudhakar Rao
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,<br>
Is it right to write business method in entity bean(BMP)?<br>
If not why?<br>
Thanks in Advance<br>
Sudhakar
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, business methods don't belong in Entity Beans for simply one reason, tight coupling. You just coupled EJBs with business logic. What happens if you decide to no longer use Entity Beans, or EJBs, then you will have to rewrite all that business logic.

If you put that Business Logic in plain old Java objects, then those objects can go anywhere and you don't have to rewrite them.

Mark
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, and HTML is not enables on this site, so you don't have to add "<br>" tags

But if you want formatted text when posting code, for instance, there are ten buttons under the Add Reply button, one is called Code, there are others that might interest you.

Mark
 
Sudhakar Rao
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for the response. I had written one business method for updating my entity bean. I can't use ejbStore() because I have to do some modifcations to my CLOB data in the in the store after updating my record in the table.

Thanks
Sudhakar
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!