-
1. Re: Entity Bean Pooling Question
dsundstrom Jun 24, 2002 8:07 PM (in response to vanrogu)I don't think entity beans pool. Why would you need to pool entity beans (We're talking pools not caches)? You are not allowed to hang onto connections between calls (that is what database connection pools are for, JCA in JBoss), so what would you want to do?
-
2. Re: Entity Bean Pooling Question
vanrogu Jun 25, 2002 1:11 PM (in response to vanrogu)It's not that I have problems, all functionality works well.
But as I'm learning EJB, and reading through several books, I'm getting an explanation about how the lifecycle of each type of EJB looks like.
The life cycle of an entity bean starts with the instantiation and a call to the setEntityContext method, which brings the new instance in the "pooled" state, from where it can be used to execute finder and home methods, or be given an identity to serve a client's request.
This differences from the behaviour I'm experiencing on my JBoss server.
Can it be that the literal implementation of the quoted Entity EJB lifecycle would give a small performance advantage, or is there any specific reason for the difference between the logical life cycle and the actual implementation? -
3. Re: Entity Bean Pooling Question
falk Jun 28, 2002 1:10 PM (in response to vanrogu)Hi!
I'm using JBoss 2.4.4 and I think, that there is Pooling and Caching of EnterpriseContext Objects. These only represents Bean Instances. So I also think, that the ejb life cycle from the spec maybe isn't just implemented in JBoss.
If you call a findByPrimaryKey to an Object in the JBoss Entity Instance Pool, the create-methode of the bean instance is called. So by calling the create()-Method on an bean instance, the state changed immedeatly to "ready" (these objects where hold in an Instance cache), so that these bean instances are not in a pooled state.
So I think, Instance Pooling for Bean Instances isn't really implemented (only for Stateless).
Thats what I found out.
If I'm thinking the wrong way, it would be very very nice, if somebody may correct me! -
4. Re: Entity Bean Pooling Question
falk Jun 28, 2002 1:11 PM (in response to vanrogu)Hi!
I'm using JBoss 2.4.4 and I think, that there is Pooling and Caching of EnterpriseContext Objects. These only represents Bean Instances. So I also think, that the ejb life cycle from the spec maybe isn't just implemented in JBoss.
If you call a findByPrimaryKey to an Object in the JBoss Entity Instance Pool, the create-methode of the bean instance is called. So by calling the create()-Method on an bean instance, the state changed immedeatly to "ready" (these objects where hold in an Instance cache), so that these bean instances are not in a pooled state.
So I think, Instance Pooling for Bean Instances isn't really implemented (only for Stateless).
Thats what I found out.
If I'm thinking the wrong way, it would be very very nice, if somebody may correct me! -
5. Re: Entity Bean Pooling Question
falk Jun 28, 2002 1:12 PM (in response to vanrogu)Hi!
I'm using JBoss 2.4.4 and I think, that there is Pooling and Caching of EnterpriseContext Objects. These only represents Bean Instances. So I also think, that the ejb life cycle from the spec maybe isn't just implemented in JBoss.
If you call a findByPrimaryKey to an Object in the JBoss Entity Instance Pool, the create-methode of the bean instance is called. So by calling the create()-Method on an bean instance, the state changed immedeatly to "ready" (these objects where hold in an Instance cache), so that these bean instances are not in a pooled state.
So I think, Instance Pooling for Bean Instances isn't really implemented (only for Stateless).
Thats what I found out.
If I'm thinking the wrong way, it would be very very nice, if somebody may correct me! -
6. Re: Entity Bean Pooling Question
alice Jun 28, 2002 9:43 PM (in response to vanrogu)JBoss gurus, Any thoughts on this??
Thanks.