 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Dave Klein Guest
|
Posted: Fri Feb 23, 2007 6:50 am Post subject: Accessing ejb 2.0 entity bean from within implementation cla |
|
|
Is there a way to access the enitity bean interface say, MyEntity from with
the code of the MyEntityBean class? My first inclination was to use "this"
but that obviously failed since MyEntityBean does not implement the MyEntity
interface. Any suggestions would be appreciated.
Thanks,
Dave |
|
| Back to top |
|
 |
Kevin Dean [TeamB] Guest
|
Posted: Fri Feb 23, 2007 7:30 pm Post subject: Re: Accessing ejb 2.0 entity bean from within implementation |
|
|
Dave Klein wrote:
| Quote: | Is there a way to access the enitity bean interface say, MyEntity from
with the code of the MyEntityBean class? My first inclination was to use
"this" but that obviously failed since MyEntityBean does not implement the
MyEntity interface. Any suggestions would be appreciated.
|
The context object passed into setEntityContext() contains methods
getEJBLocalObject() and getEJBObject(). Choose the appropriate one for
your bean and use the narrow() method to narrow the return value to your
interface type.
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/
Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|