"One jvm in a database cannot compete with 42 or more jvm's in a fully
distributed application. In the extreme case of a filter on text output, the
app-servers' jvms will leave the database jvm in the dust."

That might be true if you had one jvm in one db host, but the reality is
that a cluster of db hosts that share state like Sybase ASE have operated
within the most intensive applications environments around, like the NYSE
for example.

Bill G.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of The
elephantwalker
Sent: Thursday, September 06, 2001 3:00 PM
To: Orion-Interest
Subject: RE: Stored procedures and J2EE


Well I do like R.E.M., and that religion song, but interestingly enough, I
don't wear glasses ;). But seriously, I have also tried this both way's. And
cmp dev can be done in 1/4 the time...see below for performance comparisons.

Take a look at McGouphlin's column on pk generation in the Flashzone. You
can use orion's home-grown pk generation (this is fast and works everytime,
and is based upon the database ;)), or you can use slsb's and the database
to create your pk's. Fast and safe, and no triggers. Sql finds with joins
and the like will always be with us, but these are fast and easy to do in
orion (see the orion-ejb-jar.xml doc's) and where necessary slsb's can be
used. oo mapping is also easy to do with orion (using Set and Collection's
are a one line affair in the cmp ejb).

There is a place for stored procedures...but their need is usually very
specific. However, its important that implementers stay away from stored
procedures as a solution for all performance problems.

One jvm in a database cannot compete with 42 or more jvm's in a fully
distributed application. In the extreme case of a filter on text output, the
app-servers' jvms will leave the database jvm in the dust.

Seriously, there is room for agreement here. I was asked a question on a
specific project and how to use j2ee to transition an older database from
store-procedures to j2ee business methods. I gave a very low risk strategy
for doing this. Its important the project members test performance at every
step during the project. There is no one and all encompasing solution to
bring legacy database applications into the 21st century. j2ee, cmp ejb's,
and slsb's are just some of many tools in our quiver to solve these
problems.

Regards,

the elephantwalker


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Bill G
Sent: Thursday, September 06, 2001 1:40 PM
To: Orion-Interest
Subject: RE: Stored procedures and J2EE


Using EJB means that you can use CMP, BMP or an Object/Relation Mapping
tool. I have found CMP to be very limited. I have found BMP with stored
procedures way more flexible when working with relational database and I
have found Object/Relation mapping even better. An O/R mapping tool like
Cocobase allows you decouple your objects from your data model via dynamic
binding. CMP will tightly bind your objects to your data - which according
to the Patterns community is a bad thing. My experience with CMP leads me to
believe that its creators/supporters are a religious myopic bunch. First
there is EJB 1.0, then EJB 1.1 and now EJB 2.0 which btw cannot handle
Primary Key creation via Identity/Sequence column without a hack. In
heterogeneous environments where you have multiple applications talking to
the same database, the database engine must be in charge of Primary key
generation.


As for "There is absolutely no hit on performance if you pull out all of
your business logic into a slsb or cmp...there's just no need to use store
procedures any more."

It is a fact that static SQL runs faster that dynamic SQL, and (generally)
pre-compiled Stored procedures run faster than static SQL. So, in a model
that employs multiple tiers, improving the speed in one tier can improve the
overall speed of you application, watch out for network I/O though.


My 2 cents,

Bill G...
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Cristian
Donciulescu
Sent: Thursday, September 06, 2001 1:41 AM
To: Orion-Interest
Subject: Stored procedures and J2EE


Is it possible (and recommended) to use stored procedures with the J2EE
architecture? We would be interested in creating objects directly into the
database, bypassing the create method of the enterprise bean. Is this
possible when using CMP (Container Managed Persistence)? If not, in your
opinion, which is best: using BMP and stored procedures or using CMP?

Example: We have an Oracle DB that uses packages associated to the business
objects of the system. These packages contain the PL/SQL methods of the
corresponding business objects.  Additionally every business object's fields
are stored as columns of a specific table. The constructor of a business
object is also a method in the associated package. The inheritance relation
between two objects is modeled by making the primary key of the child
object's table reference the primary key field of the parent object's table.
This reference means that the child inherits the fields of the parent. Thus,
the constructor of a child object, which is passed all the parameters
required for itself and its parent's initialization, will call the
constructor of its parent passing the appropriate parameters. The question
is:

How could such constructors be used without conflicting with the create
methods of the CMP entity beans?



Get your FREE download of MSN Explorer at http://explorer.msn.com



Reply via email to