• Post Reply Bookmark Topic Watch Topic
  • New Topic

Read Only Entity Beans  RSS feed

 
pavi kavi
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
How to make any entity beans read only or read/write
Any thought on this will be great help
Pavithra
 
Rufus BugleWeed
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AFAIK, there is no reason to create a read only entity bean. For this function get a stateless session bean to return you a transfer object from a data access object.
Are you wanting to lock your data during a transaction?
[ March 12, 2004: Message edited by: Rufus BugleWeed ]
 
Tonny Tssagovic
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rufus BugleWeed:
AFAIK, there is no reason to create a read only entity bean. For this function get a stateless session bean to return you a transfer object from a data access object.
[ March 12, 2004: Message edited by: Rufus BugleWeed ]

Why do you think that read only data should be handled by a session bean directly accessing data through DAOs? Any particular reasons? Would you have a POJO in this case, or still use a session+DAO?
Please explain.
 
pavi kavi
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply
I asked about this for academic purpose , since i know we can set them in the one of the deployement descriptor but not exactly and also if i use read only entity beans how can i make it invalidate when i use read/write bean
Your suggestion will be of great help in my fututr e project
thanks
pavithra
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I guess the following link might be useful,
http://docs.sun.com/source/816-7151-10/deentity.html#35567
Regards
Maulin
 
Rufus BugleWeed
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, yeah, yeah
Creation of an non-read-only entity bean causes a massive amount of overhead. If you know that you have read only data and can clue the container that it is read only, then that makes sense.
If a client gets a trandfer object with with static data, especially a remote client, performance would be greatly improved.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!