Hi...
I think no one has ever brough this up about implementing the modified_by field when updating an EJB but it's bothering me for so long. So please comment on our implementation. I want to know how other people implemented it. Here's how we do it.
1. update a bean
2. username = context.getCallerPrincipal().getName()
3. user = UserHome.findByUserName(username)
4. id = user.getID()
5. modifiedBean.setModifiedBy(id)
What do you think? I feel that it's a bit inefficient cause retrieving the userEJB would synchronize all fields from the database, where I don't need the other fields. We implemented it this way cause I feel that it is more OO. If we directly use sql to retrieve the id, accessing the user ejb wouldn't be consistent. What's your opinion?
thanks...
Jerson
-
Implementing modified by in EJB (1 messages)
- Posted by: Jerson Chua
- Posted on: October 13 2000 22:35 EDT
Threaded Messages (1)
- Implementing modified by in EJB by Jerson Chua on October 17 2000 21:14 EDT
-
Implementing modified by in EJB[ Go to top ]
- Posted by: Jerson Chua
- Posted on: October 17 2000 21:14 EDT
- in response to Jerson Chua
EJB gurus...
Please comment. I need your opinion.
Thanks.
Jerson