• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

[JBoss 6.0 M2] Best approach to build and deploy an EAR archive

 
Ranch Hand
Posts: 563
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am wondering what is the best approach regarding the packaging and deployment of a new enterprise application that
I am working on.

This enterprise application has a web project and an EJB project.
My web project requires some external libraries.
So I have 2 otpions :
1) I either put them in web-project\WebContent\WEB-INF\lib
2) I put them in \jboss-6.0.0.M2\server\default\lib and then add them to the build path of the web-project, under Eclipse

If i use option 1, I of course end up with a somewhat large EAR archive since it contains the external libraries i am using.
Although it's not that big (17 MB).

If I use option 2, the EAR archive is kept at a minimum size.

So I see a matter of size.

Another aspect to take in consideration is the deployment in the production server.

I mean developers are running their own JBoss servers in their respective machines.
One of them will be in charge to generate the EAR archive and deploy it on the JBoss server, in the production server.

So then i am wondering what's best in that case ?
1) To drop the big EAR archive (17 MB) in the deploy folder of the JBoss server (production server)
2) To drop the small EAR archive in the deploy folder of the JBoss server (production server) and update the \jboss-6.0.0.M2\server\default\lib folder (production server)
with the needed libraries as they come along ?

Also, generally, what is an acceptable size for an EAR archive ? I am not aware of any standard or limitation regarding the size.

Maybe there are other ways to do it and that i do not know about.

Thanks for your help.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Option 1 (in both cases) is the typical mechanism used. An alternative with an EAR is to place the library JARs into a lib directory in the EAR. But that usually depends on the JARs - if the JARs are for a UI framework (such a Struts 2), then in the WAR file would be a better location; but if they are utility JARs (such as one of Apache's commons libraries) then the EAR file might be best. JDBC driver JAR files, on the other hand, should go in the common/lib or server/xxx/lib directory.

There are no general guidelines as to WAR or EAR file size. I have seen some huge ones, especially for Grails apps!

 
Celinio Fernandes
Ranch Hand
Posts: 563
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Peter for this quick answer. That's reassuring.
 
What's that smell? I think this tiny ad may have stepped in something.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic