If you do a good job of separating your business logic from your
presentation, then it's quite easy to put that business logic into an
EJB behind a BusinessDelegate that implements the same API.  This ease
means that you can defer going to an EJB solution until you actually
need the advantages (principally transaction management, IMO) that EJB's
provide.

In pictures, I suggest going from

        -- Presentation Layer --
        -- Business Layer --

to

        -- Presentation Layer --
        -- Business Delegate --
        -- EJB Remote Interface & Service Locator --
        -- EJB Session Facade --
        -- Business Layer --

You can even do this for only part of your Business API.  I've done that
where only part of the API needed the transaction services.

I'm not fond of Entity beans, but if you use a DAO interface, you can do
the same thing between the Business Layer and the Persistence Layer to
substitute Entity beans instead of some other DAO such as JDBC.

  Hope this helps,
    George Dinwiddie
    http://www.idiacomputing.com/

> -----Original Message-----
> From: Tejas Bavishi [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, June 29, 2006 6:09 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Ejb
> 
> 
> Hello
> 
> There are some standard advantages mentioned in favour of 
> EJBs like transaction management, application scalability, 
> security, database connection pools, etc. You can read 
> through the advantages by browsing through the EJB specification.
> 
> However, recently there have been loads of talks of not using 
> EJBs and instead using different approaches. There is a book 
> called "J2EE without EJBs" by Rod Johnson that talks a lot 
> about building applications without using EJBs.
> 
> Thanks & regards
> Tejas
> 
> 
> -----Original Message-----
> From: Abhimanyu Koul [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 29, 2006 3:08 PM
> To: Struts Mailing list
> Subject: Ejb
> 
> 
> hi!
> Why do we use ejbs in our application particularly entity and 
> sessions. can't we write java classes to do the same and use 
> java beans as data carriers. what are the true benefits of 
> using ejbs with struts.
> 
> 
> Regards,
> Abhimanyu Koul
> FinEng Solutions (P)  Ltd.
> Mobile : +91 9819510090
> 
> 
http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_____________________________________________________________________

This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to whom
this message was originally addressed. Any review, e-transmission
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 have received this e-mail in error
kindly delete  this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at [EMAIL PROTECTED] and delete this mail. 
_____________________________________________________________________


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to