• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Doubt related to SFSB made ready for Serialization  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am studying the specification and I am having some doubts hope someone could help me out with these.

1) According to the specification the SFSB and its Interceptor instances should be ready for serialization after the PrePassivate() method callback. How can the bean developer make the SFSB interceptor's instance variables ready for passivation like to make references to non serializable data null? Should the interceptor also have a PrePassivate method or would the interceptor's AroundInvoke method be called before the PrePassivate method? I thought Interceptor classes do not hold a conversational state so why is it required for SFSB's to have specific instances of the Interceptor and the interceptor is serialized together with the SFSB?

2) In the spec it says that the SFSB is ready for passivation even it contains references to the following as the serialization of those should be handled by the session bean container.
•A reference to a container-managed EntityManager object, even if it is not serializable.
•A reference to an EntityManagerFactory object obtained via injection or JNDI lookup, even if it is not serializable.

but it also says that if a bean is using extended persistence context and the container can passivate the bean only if
•All the entities in the persistence context are serializable.
•The EntityManager is serializable.
so its like if only the bean is using extended persistence the EntityManager should be serializable for the container to passivate the bean? and it also says that the container cannot destroy the bean if it doesnt comply to the above mentioned condition so in that case such beans are not destroyed and would exist without being passivated?


Thanks in advance.
 
Let nothing stop you! Not even this tiny ad:
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!