Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passivation confusion

 
Sangeetha Rao
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In EJB 2.0, when it is said 'a reference to java.sql.Connection cannot be passivated', does it mean that the compiler will throw an error or that the reference will be nullified after activation. Then, what happens in case of a transient variable with a not null value? Can it be passivated or not? The 'Sharpen your pencil' on pg.205 in HFEJB has confused me.
 
prashanth kumar
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by S.Sangeetha Rao:
In EJB 2.0, when it is said 'a reference to java.sql.Connection cannot be passivated', does it mean that the compiler will throw an error or that the reference will be nullified after activation.
>>It means that an exception will be thrown at runtime when the container tries to passivate a bean which has valid reference to Connection object.

Then, what happens in case of a transient variable with a not null value? Can it be passivated or not? The 'Sharpen your pencil' on pg.205 in HFEJB has confused me.
>>It will be passivated but after it gets activated,it will contain "indeterminate" values unlike normal passivation of transient variables in java where all the transient variables will get thier default values after deserialization



HTH
Prashanth
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic