It is unclear to me what you are asking exactly.  So I will provide several 
answers, take the one you want.

1. An EJB component can call another component of the same type.  The bean 
could get a reference to its own home interface (getEJBHome() in the context) 
and then invoke either a create() method (session bean) or finder() method 
(entity) on the home.

2. An EJB Component can get  a reference to itself as an EJBObject via the 
context method getEJBObject().  This is normally passed to  other beans in 
the same way as the Java this pointer is used.

However,  you must remember that you cannot get a reference to the instance of 
the bean implementation class or another EJB  -- that is under the control of 
the EJB container, you can only communicate with get the  bean instance class 
object via the EJBObject associated with it,   which is the whole point 
behind teh EJB architecture.

On Thursday 13 November 2003 05:43 am, Le Quang Tu wrote:
> Hi all,
> I have a doubt in EJB:
> A bean can have reference to itself? Or in another word,  an instance of
> bean can call other instance of the same bean?
> Regards
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

-- 
.................................................
OK, so what's the speed of dark?

Rod Davison -  Critical Knowledge Systems Inc. 

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to