Hi marc

I think you and Simon are getting diverted by what was intended to be (and
was clearly labelled as being) a throw-away comment.

My main point still stands. Take any of the approaches being suggested and
you'll end up with something that's non-portable and sensitive to changes in
the container's implementation of CMP. Just because you can kludge a
solution that works today doesn't make it right. As I said in the main body
of my post, the correct solution is not to use CMP in this instance.

Edward

-----Original Message-----
From: marc fleury [mailto:[EMAIL PROTECTED]]
Sent: 14 December 2000 03:57
To: jBoss
Subject: RE: [jBoss-User] Entity Bean becoming Dirty..


|>What suggested by Edward won't work if you're using CMP, because the
|>container does not ask to a CMP bean if it's changed to decide to
|reload it
|>from the DB.
|
|LOL! You must be a mind reader to work out precisely what I meant from what
|I wrote :-)

what you suggested was not correct.  Doesn't take a mind reader.

we all are wrong every once in a while, ALL of us.  Myself, I don't count
the times I have been proven wrong on my own lists.  Rickard is wrong
(sometimes).  So go easy, being wrong is the best thing that can happen to
you in open source.

This is Open Source, the courtesy you owe to others is not wasting their
time, we don't even want you to acknowledge when you are wrong we just want
you to not waste time and learn why.

Finally it is not because it is Open Source and you are not paid that you
should say "whatever" take the time to do it right if you really want to
help

marc


|
|>Commit option is set in jboss.xml
|
|Which is specific to jBoss is it not - ie depend on it and you have a
|non-portable app.
|
|HTH,
|
|Simon
|
|> Hi Aravind
|>
|> Are you using CMP ? If so then you shouldn't really be accessing the
|> database directly - it's "implementation detail" of how jBoss
|> happens to
|> implement CMP. Also you have problems like you describe.
|>
|> Consider using BMP if you want complete control over the db and the
|> persistence mechanisms used by your beans.
|>
|> Edward
|>
|> PS
|>
|> Here's a pseudo-code kludge for CMP - very horrible and very
|> inefficient but
|> the only way I know you could even begin to do it with CMP ;-)
|>
|> mySessionBean::doBulkUpdate()
|> {
|>      do bulk update
|>      get home interface
|>      for each modified entity
|>              home.findbyPrimarykey();
|>              entity.markDirty();
|> }
|>
|> -----Original Message-----
|> From: Aravind Ajad Y [mailto:[EMAIL PROTECTED]]
|> Sent: 13 December 2000 14:37
|> To: [EMAIL PROTECTED]
|> Subject: [jBoss-User] Entity Bean becoming Dirty..
|> Importance: High
|>
|>
|> Hi All,
|>
|> I am having a situation where I am using an entity bean is
|> used to represent
|> a row in the database.
|> I also have another situation where I have to update multiple
|> rows in single
|> transaction.  Since it
|> bulk update, I am using a stateless session bean to call the
|> update query.
|> Now since the database
|> is updated by Stateless Session Bean the data hold by the
|> entity bean became
|> dirty.  How can I update
|> the data in the entity beans that are dirty.
|>
|> regards,
|> Aravind.
|>
|>
|>
|>
|> --
|> --------------------------------------------------------------
|> To subscribe:        [EMAIL PROTECTED]
|> To unsubscribe:      [EMAIL PROTECTED]
|> Problems?:           [EMAIL PROTECTED]
|>
|>
|> --
|> --------------------------------------------------------------
|> To subscribe:        [EMAIL PROTECTED]
|> To unsubscribe:      [EMAIL PROTECTED]
|> Problems?:           [EMAIL PROTECTED]
|>
|
|
|--
|--------------------------------------------------------------
|To subscribe:        [EMAIL PROTECTED]
|To unsubscribe:      [EMAIL PROTECTED]
|Problems?:           [EMAIL PROTECTED]
|
|
|--
|--------------------------------------------------------------
|To subscribe:        [EMAIL PROTECTED]
|To unsubscribe:      [EMAIL PROTECTED]
|Problems?:           [EMAIL PROTECTED]
|
|



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to