Huge EAR Deployment

I am trying to figure out how to deploy a huge (EAS) file (40-50 MB) to a server through a rather slow VPN connection. The EAR contains the EJB and WAR projects created in Glassfish, and 90% of the file size is from external dependency libraries.

  • Has anyone come up with a strategy for elegant deployment on a Netbeans production system where deployment (over the network) is done only for what is really needed (i.e. only one WAR, not the entire EAR, or just one lib, not the whole library subproject).

  • Refers to the first question on how to separate external dependency libraries from a project in Netbeans so that the project compiles on the development machine, but when an EAR / WAR / EJB is created, it does not contain all the JAR-dependent ones that make it huge.

Perhaps we need to write a custom ant script? Start using maven?

Thank you all for your kind answers,

bozo

+3
source share
3 answers

That's why it is a bad idea to move your dependencies from the EAR and to the shared directory: by storing all the dependencies in the EAR, the server application can clear the undeploy / redeploy EAR and return the space that it uses in the JVM heap (for Sun JVMs, permgen). If you move some dependencies to a shared library, you risk that these dependencies will contain a hard link to any object defined in the EAR. This will mean that the EAR classes cannot be deleted and, ultimately, your application server will crash after the expiration of the space perments.

SSH , "VPN" Windows SMB, . SSH (, , SCP RSYNC), .

, . VPN , , , . : . , , .

, , " " - , JAR.

+4

EAR , rsync . EAR , , rsync.

+1

Why don't you copy the jars of the library to / glassfish install dir / glassfish / domains / domain1 / lib and not pack them into your ear file?

0
source

Source: https://habr.com/ru/post/1720091/


All Articles