Move your common classes into a new
java project, and make it a jar. Put that jar into class path of WAR and JAR(MDB related).
Make sure that your MDB related JAR does not depend on WAR.
As the common design principles says, WAR contains your presentaion layer, MDB JAR contains your service layer.
Presentaion layer depends on Service layer. Service layer never depend on Presentation layer.
If there are some common classes used in both the layers, they should go into a separate JAR, which is a simple java project.
Hope that clears the path issues !
