If I put EJB's in an EAR file, should I put the entity classes in there, a seperate jar, or the web app?
If I put EJB's in there on开发者_StackOverflow中文版 EAR file should I put the entity classes in there, a seperate jar, or the web app?
Thanks.
I don't think they should go in the web app, because I believe that class loader fires after the EJB class loader. If I'm correct, your EJB will fail because it can't find what it needs.
As for the JAR versus EJB, that would be determined by your requirements for sharing entity classes. Put them in the EJB if they're only needed by one EJB; put them in a separate JAR if they're shared.
精彩评论