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

Persistence in Entity Beans  RSS feed

 
Gautam Sabba
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy,
I have this li'l query . Will an entity bean persist a field that is not part of a database table. ie.
If customerName did not match a column in a table in the database but existed as a member variable of the bean class will its value survive passivation and activation ?
thanx
gautam
 
Jim Thomas
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The short answer is no.
Entity Bean class attributes can only be persisted to a database if you provide the mapping information to the EJB container. You do this via the deployment descriptor for container managed persistence.
In regard to passivation, it relates to object serialization, but the mechanism is not specified in the EJB spec. In short, if you don't want certain attribute values retained during passivation, mark them with the 'transient' keyword.
[This message has been edited by Jim Thomas (edited September 21, 2000).]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!