questions - Question:Deploying multiple “Web Fragment” projects within an EAR without a WAR

I have a handful or EJB jar modules which also include their web resources as described in in this question.

I would now like to deploy this as part of an EAR.

Now, I could do this as a war without any issues and that is my backup plan. However, I would like to understand if it is possible to deploy multiple "web fragment" jars into an ear to form a complete web application without having a war file in there to combine it all together.

Additionally, If I have multiple war files that depend on one or more of these jars, will I have to build them such that these jars are duplicated within the WEB-INF/lib of the war files even if the war files then end up within the same ear?

In this case, if the jar files include entities, would they also be needed in the root of the ear so that a global persistence unit can be defined?

I am on JBoss 7 though I would prefer a standard container independent solution if possible.


asked Sep 13, 2013 in Java Interview Questions by anonymous
edited Sep 12, 2013
0 votes

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.