Situation:
I have an EJB Project. It has a Class model that contains the business logic and database connection (the classes use JDBC). Within the same project, these classes are used by remote EJBs. Why? Because these EJBs will be used by a remote client, through their remote access interfaces.
The project deploys WildFly correctly. From the EJB Project, the BBDD persists correctly.
Client:
It's a Java Project. The problem appears when the client wants to use the EJBs.
I have everything well configured: the jndi.properties, the BuildPath, the WildFLy libraries, etc. The doubt and the error, I think, comes from the specifications of the EJBs that I can not find anywhere.
The question is: Can an EJB use classes that connect to the DB using JDBC (PreparedStatement, ResultSet, etc.), or should I use JPA?
If it is possible that the EJBs can use them, I do not understand why the remote client can not use the functionalities.
I hope I have been clear. I do not attach code because all the logic code is tested and works well. The specific doubt is highlighted in bold.