This isn't a proper seperation of functionality from the EJB perspective.
Your delegating component business logic to the persistence layer. If
you swtich your persistence layer to another implementation that does
not support such notion, your component no longer functions. If you
don't like this take over the responsibility of the peristence layer using
a session bean and your own JDBC or equivalent persistent managment.
A BMP entity is still not approriate as your just coding the peristence
load and stores, not controlling how this interweaves with the business
logic.

xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx
----- Original Message -----
From: "Bill Pfeiffer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 16, 2002 6:49 PM
Subject: Re: [JBoss-user] Passing Business Exception to Client


> In my situation, I just have a field that has a unique constraint on it,
but
> I would like to allow my user to put in this field whatever they would
like,
> as long as there are no duplicates.  From a coding perspective, the
> constraint failure is THE place to catch this, not with my own attempt to
> check the constraint in code.
>
> I guess what I'm hearing is that Entity Beans are not meant to handle
> database constraint errors (or that a constraint violation is catastrophic
> so code to avoid it).  Coming from a client server backround where, in
this
> case, the issues seem to be the same, I find this kind of odd.  If the
> violation was a foriegn key constraint, I could kinda understand the "code
> it right so it doesn't happen" stance.  But a unique constrained column
> value seems like a very reasonable thing to allow the db to determine and
> report back to a user.
>
> Thanks for the response,
>
> Bill P.



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

Reply via email to