Yes, you are wright and I am thinking that the Stored Procedure are not
well supported in JDBC (at least as far as I know) because the most DB
I know (Oracle, SQL-Server and Postgres) can provide information about
the parameter data type.

But beside that issue I still think that their are good reasons to implement
an OR mapper allowing to use stored procedures. From my point of view
I think Stored Procedure should be supported for Insert, Update and Delete
but maybe also to retrieve records. At the moment I know two big companies
which have a company police saying that Stored Procedure should be used
instead of INSERT, UPDATE and DELETE statements (mostly for security
reasons).

Does anybody know about a specification to support Stored Procedure in
an OR mapper or is this addressed in the new EJB spec (2.0).

If not I would like to write a proposal how this could be accomplished in
jBoss. First I would create one for the OR mapper itself and then a GUI
for the EJX. What do you think?

Have fun

Andy "Mad" Schaefer

----- Original Message -----
From: Dan Christopherson <[EMAIL PROTECTED]>
To: jBoss Developer <[EMAIL PROTECTED]>
Sent: Wednesday, July 19, 2000 8:02 AM
Subject: Re: [jBoss-Dev] CMP Database Mapping


> You won't find many containers at this point that do support mapping to
> stored procedures. Does anyone know of OR mappers that support this?
> One of the problems is the (historic, anyway) variability in stored
> procedure support among databases: many don't (or didn't) support the
> return of recordsets from stored procedures, which would tend to make
> mapping the 'ejbLoad' operation pretty tough. Also, how do you determine
> what the in parameters are and what the out fields are? using normal
> tables, you just ask the catalog. With stored procedures, I have a feeling
> that some DBs will support this, others will have other introspection
> techniques, and others will say 'Huh?' Basically the tool will (unless i'm
> wrong) have to trust the user.
>
> Dan Christopherson (danch)
> STR Technical Architect (www.str.com)
>
> On Tue, 18 Jul 2000, Andreas Schaefer wrote:
>
> > Hi Geeks
> >
> > After I found out how to setup a CMP for my PostgreSQL DB
> > I tried to do the same for the actual jBoss from the CVS repository.
> > But this seems to be quite different and I was wondering if someone
> > can give me a hint how to setup.
> >
> >
> > At my actual company we use Stored Procedures to update or delete
> > data on the DB. Because of the actual discussion how to move to EJB
> > we also encounter the problem that Stored Procedure could not be used
> > within a CMP Entity Bean (WebLogic).
> > According to my understanding of CMP it should be possible for an
> > application server to support this because if you map your Entity Bean
> > to an "Insert", "Update" or "Delete" SQL statement or to particular
Stored
> > Procedure call should not that big difference.
> > The difference is that instead of mapping members to record attributes
it
> > needs also to map members to the parameter in the "Insert" and "Update"
> > Stored Procedure.
> > This will make jBoss at little bit more advanced to WebLogic, what do
you
> > think?
> >
> > Have fun
> >
> > Andreas Schaefer
> >
> > P.S.: You maybe think why should jBoss support Stored Procedures for
> > CMP. But it works simmilar that setter/getter methods in Java Beans
> > because it allows the DB administrator to get his/her hands between the
> > call and the change of the data. This is necessary if the DB
administrator
> > wants to implement a stronger security or advanced constraints. In
addition
> > it can increase the performance because Stored Procedures are compiled
> > on the DB. This becomes more important if the DB is not only used by
> > EJB beans but also by other (mostly legacy) applications.
> >
> >
>
>


Reply via email to