After rummaging through every forum, I could not find a final answer on how to
use a MySql server db in Embedded EJB3.1 container.
It seems the Embedded EJB Container configured in a way that it uses the JavaDB
as its default data source.
I gonna use a mysql data source in embedded ejb but nothing has helped yet.
Note that it seems when unit testing my ejbs through Maven, the persistence.xml
in src/test/resources/META-INF is not considered and instead the persistence.xml
in src/main/resources/META-INF is regarded. Therefore, every time I have to
comment <jta-data-source>…</jta-data-source> when unit testing. I guess this may
also be the source of the answer.
Please let me know how to set Embedded EJB Container in a way to use MySql
server data source instead of JavaDB.