Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » J2EE Pattern »

Re: Persistence with JDBC ???

Chris Harrison

2005-10-11

Replies:

Hi Nadeem,

Not sure I understand, are you saying Servlets are better for tx's than EJBs?

That goes against the grain of many experts advice.

Ch.


-----Original Message-----
From: An interest list for Sun Java Center J2EE Pattern Catalog
[mailto:J2EEPATTERNS-INTEREST@(protected)
Sent: Tuesday, 11 October 2005 2:31 PM
To: J2EEPATTERNS-INTEREST@(protected)
Subject: Re: Persistence with JDBC ???


If this is a critical, high-volume transactional system (as you state below)
don't you need to use EJBs for the transaction control they provide (instead
of just servlets)? If you do use EJBs, then CMP comes along in the deal and
takes care of your persistence problem as well.

Regards,
Nadeem Khan

-----Original Message-----
From: An interest list for Sun Java Center J2EE Pattern Catalog
[mailto:J2EEPATTERNS-INTEREST@(protected)
Sent: Monday, October 10, 2005 7:51 PM
To: J2EEPATTERNS-INTEREST@(protected)
Subject: Persistence with JDBC ???

Hi everybody, I'm migrating a legacy system from pl/sql to J2EE.
Initially i had to use an implementation of JDO, but after trying to
translate lots of query without getting a good performance and, in many
cases, being almost impossible to translate them, we are planning to use
other persistence system. Some people suggested me to use JDBC and call
directly stored functions or execute statements.
I've tried it and it performs much faster than with JDO. I think it's
normal, since now we are avoiding to create the objects and simplifying
considerably the number of queries (JDO generates lots).

Although JDBC is faster, I know that there are some issues I should
consider before adopting it. The one that more worries me is the cache
management. The system manages lots of data and users, and same queries
are invoked once and other.

Do you think that JDBC is a good solution? Is that enough for a big
web-based system?

I know that I could use Hibernate but initially the chiefs didn't want
to use free software for persistence, since is a very critical system
and they always want to have some comercial ''support''..
Another thing is that the system is based only in servlets (with Struts)
and doesn't use any kind of EJB.

Thanks in advance!!

====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive:
http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
listserv@(protected)

====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and permanently delete the material from your computer system. We cannot guarantee that this e-mail is virus-free. You should scan attachments with the latest virus scan before opening. We will not be liable for any loss, cost or damage of any kind whatsoever caused by any receipt or use of this e-mail and attachments.

====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
©2008 junlu.com - Jax Systems, LLC, U.S.A.