0
votes

According to my project requirement i have to deploy an EAR file of my application in JBOSS7.

My application contains a jar (java project ) and War (web project)

My war is dependent on some classes in java project so, i created jar file of java project and set it to class path of web project. (placed in web-inf lib folder)

So, finally i have created a ear file with both web and java projects and deployed in jboss7.

My doubt is ..... creating a EAR with jar (which is already in war class path)and war make sense? (I mean my war and ear are behaving in the same way. )

And at the same time, i only want to deploy ear and not war..

can some one share you idea on this?

1

1 Answers

0
votes

If your jar contains only POJOs you can place it in

your.ear/your.war/WEB-INF/lib/your.jar

or

your.ear/lib/your.jar

or don't create an ear and user war only

your.war/WEB-INF/lib/your.jar    

If your jar contains only a persistence unit (META-INF/persistence.xml) place it in

your.ear/lib/your.jar

If your jar contains @Stateless or @Statefull EJBs place it in

your.ear/your.jar