Questions tagged [ejb-passivation]

EJB passivation refers to Stateful EJB Session Beans being passivated, or deactivated, to a secondary storage.

passivation refers to Stateful EJB Session Beans being passivated, or deactivated, to a secondary storage. Excerpt from the official JEE6 tutorial:

While in the ready stage, the EJB container may decide to deactivate, or passivate, the bean by moving it from memory to secondary storage. (Typically, the EJB container uses a least-recently-used algorithm to select a bean for passivation.) The EJB container invokes the method annotated @PrePassivate, if any, immediately before passivating it. If a client invokes a business method on the bean while it is in the passive stage, the EJB container activates the bean, calls the method annotated @PostActivate, if any, and then moves it to the ready stage.

8 questions
4
votes
1 answer

When are @PrePassivate and @PostActivate annotations useful?

I have seen the @PrePassivate and @PostActivate annotations in every EJB tutorial, but I don't see how are they useful. What would be an scenario where I need those?
Julio Bastida
  • 1,180
  • 1
  • 14
  • 30
4
votes
1 answer

Stateful bean passivation fails because of Stateless beans references

I am using Weblogic 12c (12.1.3 to be specific) to deploy my (EJB 3.1) application. In my application, I have a @Stateful bean, which holds references to an EntityManager and other @Stateless beans, injected using @PersistenceContext and @EJB…
Dagan Sandler
  • 475
  • 1
  • 5
  • 16
4
votes
0 answers

In wildfly, how do I disable Stateful Bean Passivation without using the EJB3.2-specific "passivationCapable=false"

I have set up cluster. I am using EJB 3.1 in my project. Can I somehow disable Stateful Session Bean passivation?
Marinos An
  • 9,481
  • 6
  • 63
  • 96
4
votes
1 answer

EJB Bean passivation

I have read that when ejbPassivate() is called Stateful Session Beans are usually evicted but Entity Beans and Stateless Beans are pooled which means they are not appilicable for passivation. In another article I have read that activation and…
FrankD
  • 859
  • 4
  • 19
  • 31
2
votes
1 answer

How is an EJB stateful session bean passivated to secondary storage

I have read for stateful session bean: "While in the ready stage, the EJB container may decide to deactivate, or passivate, the bean by moving it from memory to secondary storage" So what is this secondary storage? Is it the underline database?…
Harshana
  • 7,297
  • 25
  • 99
  • 173
1
vote
0 answers

How Ejb object make associated entity bean restore the last content before passivation

For example in this scenario : A client has reference to an EjbOBject which is associated to an Entity bean ,after long time without using this bean , container decides to passivate the bean and kick it to the pool. Making the Ejb not assoc with any…
0
votes
1 answer

Session scoped Managed Bean passivation

I'm reading about JSF2 and Managed Beans. I've got a question related to passivation. I've recently asked for different use cases of @Stateful EJB's, @SessionScoped and @ManagedBean here: sessionscoped managed bean vs stateful ejb. Now, stateful…
arg20
  • 4,893
  • 1
  • 50
  • 74
0
votes
2 answers

Is activation and passivation the same concept as deserialization and serialization?

I haven't worked with EJB. Every now and then I hear about the terms "activation" and "passivation" in context of EJB's. Maybe these terms are equally applicable for normal POJO objects also. Are these two concepts different names for the concept of…
Geek
  • 26,489
  • 43
  • 149
  • 227