Hi all. I have design question which I'm sure someone on this list can
answer without blinking, but which has been giving me fits:
Basically, I have an entity bean A whose name is derived from the names
of its CMR entity beans B and C. I.e., the name is not stored in one of
A's CMP fields but must be calculated from various CMP values in B and
C. Furthermore, I want to access A's name from one of the
fore-mentioned CMR entities B and C. Obviously, if I wait until the
first access of A to generate the A's name (i.e., naively on demand),
this results in reentrance:
(1) B calls A.getName()
(2) A.getName() calls B.getFoo()
So, what I would like to do is to guarantee that A's name is computed
*before* B's thread of control calls A.getName(). What is the best way
to do this? I've tried executing A.setName() in A's ejbLoad() method,
but it appears that if A is loaded as a result of B's call in (1), then
this still counts as occurring in the same thread of control, and
therfore still counts as reentrance.
Oh guru, what am I missing?
Thanks,
Beau Cronin
-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
- [JBoss-user] EJB Design Question Hunter Hillegas
- Re: [JBoss-user] EJB Design Question Fred Loney
- Beau Cronin
