• 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
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!