O'Reilly logo

Head First EJB by Bert Bates, Kathy Sierra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

We have to look at the transitions

Now that you’ve seen the overall state diagram, we have to drill down and find out what really happens (and why) when a stateful session bean transitions from one state to another.

Moving from does not exist to method ready

image with no caption

Moving from method ready to passivated and vice-versa

image with no caption

Moving from passivated or method ready to does not exist

image with no caption

Note

You have to know this lifecycle!

If you take the exam, you’ll thank us for beating it to death because you really must know it backwards and forward.

But even as a bean developer, this is so fundamental to writing your bean code that you DO want to have this memorized. This isn’t like one of those API memorization questions where you think, “Isn’t that what the docs are for?”

Even if you have an IDE that puts the container callbacks into your code for you, you still have to know what they mean and what you should or should not do in each one.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required