I have very little knowledge about EJB. Here is my question --
1. If I have a struts action class, the action calls a stateless session bean, stateless session bean calls a DAO class. If I bundle all things together in a EAR, then what's the point of using that stateless session bean ? can I simply replace that session bean by a java class ?
2. Now, I believe the benefit of EJB is it provides distributed computing. Let's refer to the above scenario. assume I have the following things --
JSp, action, stateless session bean, DAO.
a) when I create .war, which pieces shall I bundle together, shall I bundle JSP, action, DAO ?
b) for EJB .jar, shall I just bundle the bean(s) ?
c) getting to the distributed point, is it true that I can deploy the .war and .jar to different machine ? But it seems people just bundle the whole thing in a .EAR, then does it mean we are NOT using the distributed feature of EJB ?
Thanks.
1. If I have a struts action class, the action calls a stateless session bean, stateless session bean calls a DAO class. If I bundle all things together in a EAR, then what's the point of using that stateless session bean ? can I simply replace that session bean by a java class ?
2. Now, I believe the benefit of EJB is it provides distributed computing. Let's refer to the above scenario. assume I have the following things --
JSp, action, stateless session bean, DAO.
a) when I create .war, which pieces shall I bundle together, shall I bundle JSP, action, DAO ?
b) for EJB .jar, shall I just bundle the bean(s) ?
c) getting to the distributed point, is it true that I can deploy the .war and .jar to different machine ? But it seems people just bundle the whole thing in a .EAR, then does it mean we are NOT using the distributed feature of EJB ?
Thanks.