RE: [JBoss-user] EJB Entity design question: Can ejbRemove() be used to modify a row in the DB?

2001-09-19 Thread Joost v.d. Wijgerd

Hi,

If you are using BMP this is perfectly valid, then in the
ejbFindByPrimaryKey
you throw an ObjectNotFoundException when the obsolete_indicator
column says Y

Joost.

-Original Message-
From: Adam Lipscombe [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 18, 2001 1:45 PM
To: JBoss User Mailing List
Subject: [JBoss-user] EJB Entity design question: Can ejbRemove() be
used to modify a row in the DB?


Folks,


I have several entity EJB's that model database tables.
Rows in the tables are never physically deleted, but rather they are
logically deleted by setting a obsolete_indicator column Y.

Can I use ejbRemove() to simply modify the row (setting this flag to
Y) or
will this break application server caching? Are there any other reasons
why
I should not use ejbRemove()?


Thanks in advance


Adam


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] EJB Entity design question: Can ejbRemove() be used to modify a row in the DB?

2001-09-19 Thread Karl Koster

Adam,

Even better, if you are using BMP and we are talking about an SQL storage
facility, construct your SQL to only fetch rows with the
obsolete_indicator column not equal to Y or null. This will reduce the
amount of network communication that occurs, especially if you are dealing
with wide rows, since the ResultSet will be null if no data is returned.

Karl.

 -Original Message-
 From: Joost v.d. Wijgerd [SMTP:[EMAIL PROTECTED]]
 Sent: Wednesday, September 19, 2001 11:21 AM
 To:   [EMAIL PROTECTED]
 Subject:  RE: [JBoss-user] EJB Entity design question: Can ejbRemove()
 be used to modify a row in the DB?
 
 Hi,
 
 If you are using BMP this is perfectly valid, then in the
 ejbFindByPrimaryKey
 you throw an ObjectNotFoundException when the obsolete_indicator
 column says Y
 
 Joost.
 
 -Original Message-
 From: Adam Lipscombe [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 18, 2001 1:45 PM
 To: JBoss User Mailing List
 Subject: [JBoss-user] EJB Entity design question: Can ejbRemove() be
 used to modify a row in the DB?
 
 
 Folks,
 
 
 I have several entity EJB's that model database tables.
 Rows in the tables are never physically deleted, but rather they are
 logically deleted by setting a obsolete_indicator column Y.
 
 Can I use ejbRemove() to simply modify the row (setting this flag to
 Y) or
 will this break application server caching? Are there any other reasons
 why
 I should not use ejbRemove()?
 
 
 Thanks in advance
 
 
 Adam
 
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user



This e-mail contains privileged attorney-client communications and/or confidential 
information, and is only for the use by the intended recipient. Receipt by an 
unintended recipient does not constitute a waiver of any applicable privilege.

Reading, disclosure, discussion, dissemination, distribution or copying of this 
information by anyone other than the intended recipient or his or her employees or 
agents is strictly prohibited.  If you have received this communication in error, 
please immediately notify us and delete the original material from your computer.

Sempra Energy Trading Corp. (SET) is not the same company as SDGE or SoCalGas, the 
utilities owned by SET's parent company.  SET is not regulated by the California 
Public Utilities Commission and you do not have to buy SET's products and services to 
continue to receive quality regulated service from the utilities.


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] EJB Entity design question: Can ejbRemove() be used to modify a row in the DB?

2001-09-19 Thread Adam Lipscombe



Thanks guys, its all working now

ejbFindByPrimaryKey only retrieves rows that have obsolete_indicator != Y,
and ejbRemove() sets obsolete_indicator = Y.


Many thanks!


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Karl Koster
Sent: 19 September 2001 16:51
To: [EMAIL PROTECTED]
Subject: RE: [JBoss-user] EJB Entity design question: Can ejbRemove() be
used to modify a row in the DB?


Adam,

Even better, if you are using BMP and we are talking about an SQL storage
facility, construct your SQL to only fetch rows with the
obsolete_indicator column not equal to Y or null. This will reduce the
amount of network communication that occurs, especially if you are dealing
with wide rows, since the ResultSet will be null if no data is returned.

Karl.

 Snip 


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] EJB Entity design question: Can ejbRemove() be used to modify a row in the DB?

2001-09-18 Thread Maurice le Rutte

 I have several entity EJB's that model database tables.
 Rows in the tables are never physically deleted, but rather they are
 logically deleted by setting a obsolete_indicator column Y.

 Can I use ejbRemove() to simply modify the row (setting this flag to Y)
or
 will this break application server caching? Are there any other reasons
why
 I should not use ejbRemove()?
I can't answer this, but I assume you are not using CMP? Otherwise your
beans would still be accessible with findByPrimaryKey.

Maurice.




___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] EJB Entity design question: Can ejbRemove() be used to modify a row in the DB?

2001-09-18 Thread Adam Lipscombe

Yes, The beans use BMP. 

Sorry I forgot to mention that :-)

Adam

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Maurice le
Rutte
Sent: 18 September 2001 13:28
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] EJB Entity design question: Can ejbRemove() be
used to modify a row in the DB?


 I have several entity EJB's that model database tables.
 Rows in the tables are never physically deleted, but rather they are
 logically deleted by setting a obsolete_indicator column Y.

 Can I use ejbRemove() to simply modify the row (setting this flag to Y)
or
 will this break application server caching? Are there any other reasons
why
 I should not use ejbRemove()?
I can't answer this, but I assume you are not using CMP? Otherwise your
beans would still be accessible with findByPrimaryKey.

Maurice.




___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user