The moose likes EJB and other Java EE Technologies and the fly likes EJB Code - discussion 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 "EJB Code - discussion" Watch "EJB Code - discussion" New topic

EJB Code - discussion

Chetan Mehta
Ranch Hand

Joined: Aug 04, 2001
Posts: 40
I am reading someone's code. I find that he has implemented
all the insert / update / delete functions within stored procedure and query operations within Entity Bean.
To the best of the my knowledge, I feel that this implementation is not exploiting EJB features properly.
I feel EJB provide tranasction services.
Implementation should be done as:
1. All the inserts / update / deletes should be implemented using Entity bean.
2. Complex Retrieve should be implemented using views and creating beans over these views.
Before commenting over anyone's code, I thought I will discuss within group member about their views.
Can you please provide me your feedback on the same?
Chetan Mehta
Kyle Brown
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
I'm with you. This isn't right. It's exactly the opposite of what I usually do -- which is implement set/update functionality in Entity beans, and then do "large result set" queries using Stored procedures, Value Objects and Stateless Session beans...
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at for other WebSphere information.

Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at for other WebSphere information.
I agree. Here's the link:
subject: EJB Code - discussion
It's not a secret anymore!