I would like to learn EJB and I am looking for some insights and inputs from others who are experts in EJB.
I would like to know the following as
1) What are the advantages of using EJB?
2) When do we have to use EJB?
If I am using JDBC for data fetching, writing and database validations from java, how can I effectevely use EJB?
As am planning to learn EJB, without using JPA, can I use EJB in web application?
any help is highly appreciable.
Regards
We don’t have to, but it’s a wise choice when implementing any sort of scalable server, typically accessed using HTTP (web, SOAP, REST)
EJB container will inject
DataSourcefor you to your EJB, from now on its up to you. EJB spec does not provide any support for plain JDBC, there is only JPA.