Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > To EJB or not to EJB

Reply
Thread Tools

To EJB or not to EJB

 
 
Jeremy Haile
Guest
Posts: n/a
 
      09-02-2003
I have worked on a variety of web-based software projects and typically
employ a combination of JSP, Servlets, Struts, Postgresql, etc. However, I
am about to start on a project that needs to potentially scale to the size
of a large e-commerce site. In the past, I have always written database
interface classes that use straight SQL (via JDBC) to extract objects from a
database. However, due to the scalability issues involved in a large
e-commerce site, I am considering using EJBs.

Does anyone have any comments or suggestions on the use of EJBs, especially
in regards to large e-commerce sites? Can anyone point me to a good
resource for designing an e-commerce-like site using J2EE?

Thanks,
Jeremy Haile
http://www.velocityreviews.com/forums/(E-Mail Removed)


 
Reply With Quote
 
 
 
 
Kevin Hooke
Guest
Posts: n/a
 
      09-03-2003
The book "Mastering Enterprise JavaBeans 2nd ed" published by Wiley has a
couple of good chapters on EJB best practices and issues to consider when
starting an EJB based project.

You could also read around on the www.theserverside.com site for good
practices, and read through some of the J2EE design patterns and usage
discussions they have there.

Theres also a few other books that may be worth taking a look at that cover
J2EE Design Patterns - "Core J2EE Patterns" published by Prentice Hall is a
good one, and there are others.

Hope that gives you some info to start with,

--
Kevin Hooke
MindBeans Software Consulting
http://www.mindbeans.net


"Jeremy Haile" <(E-Mail Removed)> wrote in message
news:bj387d$9it$(E-Mail Removed)...
> I have worked on a variety of web-based software projects and typically
> employ a combination of JSP, Servlets, Struts, Postgresql, etc. However,

I
> am about to start on a project that needs to potentially scale to the size
> of a large e-commerce site. In the past, I have always written database
> interface classes that use straight SQL (via JDBC) to extract objects from

a
> database. However, due to the scalability issues involved in a large
> e-commerce site, I am considering using EJBs.
>
> Does anyone have any comments or suggestions on the use of EJBs,

especially
> in regards to large e-commerce sites? Can anyone point me to a good
> resource for designing an e-commerce-like site using J2EE?
>
> Thanks,
> Jeremy Haile
> (E-Mail Removed)
>
>



 
Reply With Quote
 
 
 
 
Joe
Guest
Posts: n/a
 
      09-03-2003
In article <bj387d$9it$(E-Mail Removed)>, (E-Mail Removed) says...
> I have worked on a variety of web-based software projects and typically
> employ a combination of JSP, Servlets, Struts, Postgresql, etc. However, I
> am about to start on a project that needs to potentially scale to the size
> of a large e-commerce site. In the past, I have always written database
> interface classes that use straight SQL (via JDBC) to extract objects from a
> database. However, due to the scalability issues involved in a large
> e-commerce site, I am considering using EJBs.
>
> Does anyone have any comments or suggestions on the use of EJBs, especially
> in regards to large e-commerce sites? Can anyone point me to a good
> resource for designing an e-commerce-like site using J2EE?
>



There is an O'Reilly book, "Building Java Enterprise Applications" that I
feel is outstanding.
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      09-03-2003
On Wed, 3 Sep 2003 10:15:17 -0700, Joe <(E-Mail Removed)> wrote or
quoted :

>There is an O'Reilly book, "Building Java Enterprise Applications" that I
>feel is outstanding.


Here are several books with similar titles:

J2EE(tm) Technology in Practice: Building Business Applications with
the Java(tm) 2 Platform, Enterprise Edition
by R. G. G. Cattell, et al (Paperback)

Building Java Enterprise Applications, Vol. 1: Architecture (O'Reilly
Java)
by Brett McLaughlin (Paperback - March 2002)

Building Java Enterprise Applications Vol. II: Web Applications
by Brett McLaughlin, Robert Eckstein (Paperback)

Enterprise Java 2 Security: Building Secure and Robust J2EE
Applications
by Marco Pistoia, et al (Paperback)

Which is the one you recommend?

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
Joe
Guest
Posts: n/a
 
      09-04-2003
In article <(E-Mail Removed)>,
(E-Mail Removed) says...
> On Wed, 3 Sep 2003 10:15:17 -0700, Joe <(E-Mail Removed)> wrote or
> quoted :
>
> >There is an O'Reilly book, "Building Java Enterprise Applications" that I
> >feel is outstanding.

>
> Building Java Enterprise Applications, Vol. 1: Architecture (O'Reilly
> Java)
> by Brett McLaughlin (Paperback - March 2002)
>
> Which is the one you recommend?
>





--

"The natural progress of things is for liberty to yield and government to
gain ground"
-- Thomas Jefferson
 
Reply With Quote
 
Christopher Blunck
Guest
Posts: n/a
 
      09-10-2003
On Tue, 02 Sep 2003 19:17:22 -0400, Jeremy Haile wrote:

> I have worked on a variety of web-based software projects and typically
> employ a combination of JSP, Servlets, Struts, Postgresql, etc. However, I
> am about to start on a project that needs to potentially scale to the size
> of a large e-commerce site. In the past, I have always written database
> interface classes that use straight SQL (via JDBC) to extract objects from a
> database. However, due to the scalability issues involved in a large
> e-commerce site, I am considering using EJBs.
>
> Does anyone have any comments or suggestions on the use of EJBs, especially
> in regards to large e-commerce sites? Can anyone point me to a good
> resource for designing an e-commerce-like site using J2EE?
>


Hi Jeremy-

J2EE (specifically EJB) is a good enterprise level component architecture
well suited for high volume e-commerce sites. It offers many benefits
that make development easier (not simple, but easier) as well as very nice
cache management (well, certain vendors do). For example ...

Let's say that you plan on hosting a site that sells goods. There is a
very hot item that many people are interested in. If you don't use EJB,
and you don't write some cache management code in your database tier,
you're going to overwhelm your database with read calls and you'll quickly
burn up cycles unnecessarily. Writing cache management software is not
difficult, but it's not trivial. There are several products out there
that fit into EJB (TopLink comes to mind) that allow you to retrieve the
hot item once, keep it in memory, and concurrently update it from multiple
threads (requests). Commits are sent back to the database at appropriate
times (as decided by the EJB container). The net result is that you have
a faster overall site (reading from memory is several orders of magnitude
faster than reading from a disk over the network), and you don't have to
do much work.

EJB is also a distributed component architecture, meaning that if
necessary you could separate your JSP and servlet (presentation tier) onto
a set of hardware load balanced via a http balancer (F5 and Cisco make
them). Your front end presentation tier all peers over the network into
your central core located on a set of clustered J2EE application servers.
This puts you into a position where you can more intelligent scale your
application depending upon user load. If you find that your entity
cluster is struggling with managing connections, throw another server into
the mix and let J2EE spread the load to another server. Alternatively, if
you find your presentation tier to be sluggish, you can throw in another
server tuned for http performance.

Bottom line - J2EE provides for a lot, and makes it pretty easy to
accomplish most tasks. If you're going to deploy a high volume site,
seriously look into it.


-c


-c

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible to generate "ejb-jar.xml" from EJB class (source)? "ejb-jar.xml" appserver independent? Raymond Schanks Java 0 08-03-2010 08:21 AM
EJB 1PC errors with EJB's Mark Java 0 10-29-2003 10:08 PM
EJB-QL: writing a regular expression query using EJB QL Sriv Chakravarthy Java 0 09-18-2003 03:39 PM
EJB on Weblogic7 : accessing Ejb thru *Local interface* fails due to JNDI lookup Mumbai Joe Java 0 07-29-2003 04:16 PM
Dynamically Access & Call An EJB From Another EJB? Steve Java 1 07-15-2003 06:47 PM



Advertisments