| Author |
loose class and EJB difference
|
Nelson Nadal
Ranch Hand
Joined: Jun 06, 2002
Posts: 169
|
|
I hope this is not really an intermediate question. If a loose class is called from JSP or servlets is that consider as Java Beans? What is the difference of it from EJB? in what aspect? Is it the setXXX and getXXX standard? What is the use of EJB that can't do by usual Java Bean? Thanks, I just want to enlighten on this matter, thank you.
|
 |
vikasids sharma
Ranch Hand
Joined: Aug 01, 2003
Posts: 157
|
|
Well Nelson if u use a simple class in ur jsp by using <jsp:useBean>, u would be using it as so called server side java Beans.
Originally posted by Nelson Nadal: If a loose class is called from JSP or servlets is that consider as Java Beans? What is the difference of it from EJB? in what aspect? Is it the setXXX and getXXX standard? you may or may not have getter methods corresponding to setter methods in javabeans(well depends upon the requirements )EJB does nt differentiate itself by getXXX and setXXX standards. What is the use of EJB that can't do by usual Java Bean? Thanks, I just want to enlighten on this matter, thank you.
Usual javabeans are instantiated by developer itself.so if developer wants to incarporate services like persistence , transaction, instance pooling in application.he needs to call all these respective APIs(explicitly ) to get it services enabled. EJBs are instantiated by container itself , it creates request interceptor for each EJB(Enterprize java bean) deployed which provides all these above services implicitly. Here developer is concerned with providing business logic rather than writing explicitly to transaction, security etc APIs.
|
Thanks
Vikas Sharma
SCJP(1.4)
|
 |
 |
|
|
subject: loose class and EJB difference
|
|
|