See Chapter 28 in the "Developing Applications with JRun" manual for
information about container managed persistence and entity beans in JRun.
Electronic documentation is present even when you download an evaluation
copy. I have never used CMP entity beans with JRun so I can't give you
exact details.
To answer Eric's question, here are a few differences between EJBs and
regular JavaBeans.
1. EJBs are a remote procedure call technology, meaning that the client
software using an EJB, (such as a JSP page), does not have to be running on
the same machine as the EJB. This can be a great benefit when you are
creating large systems that must scale. It is also helpful for client/server
systems where the client code is never on the same machine as the server.
JavaBeans are just standard classes and must run on the same machine as the
class that is using them.
2. EJB containers provide services which you can take advantage of without
writing any special code. For example, EJB containers manage threads and
database transactions for you automatically in most cases.
3. You can also use container managed persistence, (as mentioned in
Sanjeevi's original question), which means that you don't even have to write
any database code to make your object persistent. In other words, the member
variables in your object are automatically saved to a database when the
object goes away. When the object is recreated, the information is
automatically loaded from the database to the object in memory. The database
is always kept in sync with the object in memory.
In general, EJBs are very good for modeling the business logic tier in a
scalable, reusable way. One EJB can be used in a multitude of systems.
When combined with JSPs and Servlets for the presentation tier they make a
powerful base for web applications.
Most of the things you would do with an EJB can be done with JavaBeans but
you lose out on the benefits mentioned above. On the other hand, while EJBs
may make database transactions and thread handling easier, they are
generally harder to develop and deploy than JavaBeans. It took me two weeks
just to figure out how to code an EJB, successfully deploy it to JRun, and
then access it from client code. If your project is small to medium in size
and does not need to scale past a single server, it may be better to stick
with JavaBeans.
I don't believe in using technology just because it is there.
-----Original Message-----
From: Eric Cheng [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 07, 2001 9:59 PM
To: JRun-Talk
Subject: Re: how to deploy Entity Bean
Hi,
Would someone tell me the benefit of using EJB?
What's the difference between EJB and JB?
Your feedback if highly appreciate
Best Regards,
Hogi
----- Original Message -----
From: Sanjeevi Athreya <[EMAIL PROTECTED]>
To: JRun-Talk <[EMAIL PROTECTED]>
Sent: Monday, May 29, 2000 4:13 PM
Subject: how to deploy Entity Bean
> Hi
> New to EJB, can U please tell me how to deploy a Entity Bean I mean I
tried
> using WEBLOGIC , I am right now reading EJB by OReilly and he says there
is
> a interface to map the persistant fields with the DB fieids.
> I want to know if JRUn provide a interface like this.
>
> Some one told me WEBLOGIC does
>
> please help
> thanks
> regards
> Sanjeevi
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists