I'm New in EJB thanks to confirm my understanding:-
1. EJB module need to be implement in .ear file format? can it hold it in .war file?
2. can i mix with the EJB code(Connect to DB_1 ) with other code which due with JPA and Hibernate(Connect to DB_2) and package it into single package?
Let see. From my understanding, an EJB module is a jar file. If you wan to incorporate an EJB module in a web app ... then the file needs to be an enterprise archive (ear) file. An EAR can have multiple war and jar (both EJB and app client).
For Q2, because of Q1 (different files) you can package the EJB code with your web code (war) together. Yet the EJB package names can be the same as the packages in the WAR.
Just to confirm my understanding, means i should have a single .ear file to package EJB and web module together? I'm seeking a way how to handle my case in Maven, just in case if you can enlighten me on this.