Thanks, now (see below)

-----Original Message-----
From: Rickard Öberg [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 30, 2001 10:49 AM
To: jBoss
Subject: Re: [jBoss-User] Dirty Entity bean?


Hi!

Luis Ochoa wrote:
> Newbie here, so bear with me.
> I have successfully put together a system consisting of 2 Entity and 1
> session. Stuff was working great, I created a few entities, all good, but
> after a little while, I created this one entity, and just filled in a few
of
> the fields. When I looked in the database (Oracle), to my horror, the bean
> row had been created with the fields I had specified, but the rest of the
> fields I hadn't, contained OLD data from a previous creation!!
> 
> Of course I don't want this to happen, so my question is:
> 
> Is this normal behavior?

Yes.

> if so, how can I avoid it? 

Either
* set pool size to 0 (zero). This will cause new instances to be caused
all the time, hence avoiding "old" data to be used
* make sure you initiate all fields to proper values

-->where do I do this: ejbCreate?


Of course the latter is preferred since it allows the container to work
more efficiently. The first method is easy to use, but produces
unportable beans (as another container might not support setting pool
sizes). 





--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to