Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

data integrity with entity beans

 
Joseph Rank
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know a good resource that describes the concurrency management capabilities of entity beans? Specifically, I'm trying to find out:
Supposing I have an entity bean associated with a stateful session bean, I want to ensure that the fields mapped in the entity bean are "locked" for the session bean's lifetime--no other session bean can change the data, but reads are ok. Is this do-able with EJBs, or is this a db level issue?
[This message has been edited by Joseph Rank (edited June 20, 2001).]
 
greg philpott
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can just make the fields that you don't want changed blank final variables:
final String varIDontWantChanged;
and then assign a value to the variable in an initializer.
[This message has been edited by greg philpott (edited June 22, 2001).]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic