BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Accessing ejb 2.0 entity bean from within implementation cla

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Enterprise
View previous topic :: View next topic  
Author Message
Dave Klein
Guest





PostPosted: Fri Feb 23, 2007 6:50 am    Post subject: Accessing ejb 2.0 entity bean from within implementation cla Reply with 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.

Thanks,
Dave
Back to top
Kevin Dean [TeamB]
Guest





PostPosted: Fri Feb 23, 2007 7:30 pm    Post subject: Re: Accessing ejb 2.0 entity bean from within implementation Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Enterprise All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.