What criteria can a person use to determine when to use an EJB or not?
If the object has a need for EJB container services such as security, transaction processing, load balancing, persistence or lifecycle management. If there is not, then there is not much of an argument for using an EJB.
If the object has a lot of fine-grained accessor methods that will be called quite often, the object itself is not a great candidate for an EJB. You might consider using a facade object that interacts with an EJB if it has any specific needs mentioned above.
The need for remote access to an object is not an automatic need for an EJB. If all you need is remote access and not any of the EJB container services, RMI, IIOP, HTTP, sockets, Jini or even SOAP should be considered.
Dig Deeper on Topics Archive
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.