I think EJB persistence should be guaranteed by the application server. For
instance, as far as I know, Weblogic makes this passivation process automatically
according to some inicialization values.
So you shouldn't need to make the persistence by yourself saving data after a method
is completed.

Santiago
=======================================
 Santiago Alvarez
    mailto:[EMAIL PROTECTED]
    http://members.tripod.com/salvarez
=======================================

***********
If we were to "Name the Decade" from an application programming perspective, the
1990s would be "The Decade of Object Orientation." The next will probably be "The
Decade of Distributed Applications."
***********



Ian McCallion wrote:

> 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".
begin:vcard
n:Alvarez;Santiago
tel;fax:+34 91 3672703
tel;work:+34 91 432 8100
x-mozilla-html:FALSE
org:Cap Gemini
adr:;;Condesa de Venadito, 7;Madrid;;28027;
version:2.1
email;internet:[EMAIL PROTECTED]
title:Technical Consultant
x-mozilla-cpt:;-1
fn:Santiago Alvarez
end:vcard

Reply via email to