Ejb's and javabeans

Can anybody give me a good explanation on the difference between Ejb's and javabeans....

And also the advantages and disadvantages of both.

Pl do help as soon as possible....I want to know that whether I should be using javabeans or Ejb's in my web-based site...which is a administration site for a content management system...So it evolves setting users and their permissions...many other administrative factors ...All of these come from a database...I am using an sql server.

smita

[524 byte] By [smitaunni] at [2007-9-26 2:27:20]
# 1
Pl suggestions reqd urgently....
smitaunni at 2007-6-29 9:41:26 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
Pl...urgent suggestions reqd....
smitaunni at 2007-6-29 9:41:26 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3

Hi,

Javabeans are normal classes which got private attribute and associated public get and set method. Usually they are used to access EJB from the presentation layer. EJB is the class in a distributed format which contains all the business logic and data handling. Once EJB is written and deployed in an application server it can be accessed from servlet, Javabeans or other CORBA compliant classes. For you requirements you need to find where do you intend to host the business logic and how you intend to access it. Do not forget you need application server to host any EJB. If it is a normal user setting and permission this can be easily done by a Servlet and you can have associated Javabean class for data access.

Regards

Ibnul

ibnul at 2007-6-29 9:41:26 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4

Thanxs for ur suggestion..

Yes this is not a very critical website...Its just an administration for a web management system...Which may have some limited users or permission for editing a particular page in the websites in cluded...

I too had the opinion as follows...

i would do the user interface...and normal code validations using jsp or servlets...and carry out the database part...i.e. insertions or updation of records using javabeans....

But I have just a doubt..may be silly...Will the performance make any diff...by using Ejb's for Java beans

thanxs again

smita

smitaunni at 2007-6-29 9:41:26 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 5

The great point about the EJP's is that they are able to be used by more than 1 application. You may want to check out the j2ee documentation. They include a developers guide that gives a great tutorial on the use of EJB's and which types you should use in different situations. Good luck.

wheaton84 at 2007-6-29 9:41:26 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 6
Thanx...For the help...I would like to go thru the documentation.smita
smitaunni at 2007-6-29 9:41:26 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 7

I'll tell you this much. If you don't know what an EJB is then you probably don't need one. Javabeans in the context your using are just classes to support java server pages. They allow you to put all the java code related to your jsp ui in a java class and all the html code in the jsp file. If you were using a servlet, you would have no need of a javabean. An EJB is a much bigger ball of wax and is meant for larger, scalable applications. Go to sun's J2EE site and read the documentation and tutorials.

t3chi3

t3chi3 at 2007-6-29 9:41:26 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...