Hello !!!
Q1. Why cannot literally be a field, is it a specification restriction or
there is some other logic.
Q2. Proxy to entity, you means that I have to a object as  a field and
through that object I access entity bean ?


-----Urspr�ngliche Nachricht-----
Von: Ian McCallion [mailto:[EMAIL PROTECTED]]
Gesendet am: Mittwoch, 3. November 1999 14:04
An: [EMAIL PROTECTED]
Betreff: Re: [EMAIL PROTECTED]

Domenico Pascuzzi wrote:

> I know that session bean stateful are private resource for clients,
> while entity bean are mapped in DB and are shared by all users.
> My need is a little different:
>
> I need a session bean modelling interaction with one client and I need
> this session bean having some persistent fields. These persistent fields
> must be private resource for clients because they store in a persistent
> way information about session client.
>
> So I had thought at a session bean with an entity bean as field attribte:
> in such a way I think that entity bean could sure me persistence and in
> the same time it is private to the client that creates the session...
> is it correct?

An entity bean cannot literally be a field attribute of a session bean,
although
a proxy to the entity could be a field attribute.

> Another approch, nearer to EJB philosophy, could be the explicit
> serialization of session bean fields that store informations about
> client actions on DB. What about this? Is it possible for me to
> explicitly "passivate" the session bean (I don't intend to call
> ejbpassivate(), but getHandle() and serialize it).

It is possible (indeed it is common) to serialise session bean fields to a
database. You need to use a client-specific unique key to store the data
under.
You probably also need to ensure the data is deleted when no longer needed.

You should not attempt to load and store the data during activate/passivate,
since this would not guarantee that the data was saved in the event of a
server
error. Instead you should store the data at the end of each method, and you
should load the data during create() processing for a session bean that is
resuming a conversation with the client.



Ian McCallion
CICS Business Unit
IBM Hursley
[EMAIL PROTECTED]
Tel: ++44-1962-818065
Fax: ++44-1962-818069

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

Regards,
Uma Shanker
-------------------
Munich: [EMAIL PROTECTED] Tel:+49-89-2171-5455

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