In your session bean, you can do the lookup of entity bean through the session 
context.  After that, you can use this reference to call any methods in the entity 
bean.
Also,you can have a serialized object.  In this object, you try to set all the return 
fields you want them returned from the entity bean.  What i mean here is that instead 
of having so many getter methods you can use one "super" get and return a serialized 
object containing all the stuffs you want.
By doing this way, you can prevent the number of calling from session bean to entity 
bean.

Regards,
Justin Pham

Parag Sankla wrote:

> Hi all.
> Does anybody have some code on the following scenario:
> (1)A servlet calling a stateless session bean passing some number/string as a 
>parameter.
> (2)The session bean in turn calling an entity bean passing the same number/string as 
>a parameter.
> (3)The entity bean talks to the database and retrieves the record corrosponding to 
>that number.Then it sends it back to the session bean.
> (4)Now the session bean sends this data back to the servlet.
> (5)The servlet now shows the data on the browser from which it was invoked .
>  The difficult part is how the entity bean will send the data to the session bean?In 
>the form of an object or what else ?
>  I will be very glad if you can help me in this.Even if you jnow some site where 
>such an example is available,that will be more than enough.I have seen a lot of 
>examples where the client directly talks to either a session bean or an entity 
>bean.But nowhere I found an example as I described above.
>  Thanking you in advance.Hoping for a positive reply.
>   Regards.
> Parag
>
> ===========================================================================
> 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".

===========================================================================
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