Speedup JBoss LiveCycle Startup
JBoss Start-up Performance
Starting JBoss with a fully configured LiveCycle installation can take an awfully long time! We’ve done some digging and found that a large portion of this time is spent unpacking the LiveCycle EAR file – and copying these files into the jboss/server/all/tmp directory. In fact a fully configured LiveCycle EAR can amount to over 800 MB of data being written – which adds a considerable amount of time to the start-up.
JBoss supports unpacked EAR and WAR files in the deploy directory, which will save these files from being unpacked at start-up time. To simplify this we’ve created a small utility that unpacks the LiveCycle EAR file and all of its contents into the deploy directory.
We’ve found that its halved the JBoss start-up time – on my laptop this saved nearly 8 minutes – which is lots when you have to restart Jboss often.
Instructions:
- Download the utility and unzip the file. You should have a file called “AdobeJBossEarUnpacker.jar“
- Run the Jar – it will prompt you for the location of the JBoss deploy directory (typically its under your LiveCycle install directory in /jboss/server/all/deploy).
- That’s it. It will create a copy of your LiveCycle.ear file then proceed to unpack LiveCyle inside your deploy directory. Whenever you need to redeploy LiveCycle make sure you delete the exploded directory first.
Startup Sequence
While we are on the topic of starting JBoss another really handy trick is to make use of the “deploy.last” sub-directoy. Any files placed in this directory won’t be deployed until all the files in the main deploy directrry have started. This can be very handy when you have an application that is dependant on a LiveCycle service – which means that you don’t want it to start until LiveCycle its-self has fully started.
PS – Thanks to Malcolm Edgar for some great investigative work and creating the unpacker util.
Nice! Kind of obvious in hindsight but a definite timesaver. Your util saves some time too unpacking over 200 .war files.
It just shaved about 3 minutes off my boot time.
It’s worth keeping in mind that if this is applied to a turnkey installation of LiveCycle, that you may run into trouble when applying the service packs automatically… so beware
Thanks Mark.
You are right about the service packs. In that case you’d need to delete the exploded LiveCycle.ear and then restore the backed up version so you can apply the patch.
Phil
I downloaded the utility. I’m running it as java -jar AdobeJBossEarUnpacker.jar
The application asks me to point to my deploy directory which is c:\adobe\livecycle8.2\jboss\server\all\deploy
But, then I get an error:
C:\tmp>java -jar AdobeJBossEarUnpacker.jar
Exception in thread “main” java.io.FileNotFoundException: C:\Adobe\LiveCycle8.2\
jboss\server\all\deploy\adobe-forms-ivs-jboss.ear (Access is denied)
at java.io.FileInputStream.open(Native Method)
I checked, and that’s because I unzipped that test ear file so that I can easily add/remove files directly from the file system.
Anything that can be done to handle ear folders or ignore them?
ok. for now, I just moved that folder out, ran the script, and then just copied it back
My install within a VM was about 18 minutes. It is now 9 minutes! cool!
Deploying the FormsIVS, OutputIVS and Assembler sample applications in /deploy.last caused ClassCastExceptions in our JBoss 4.2/Windows/MySQL environment which got resolved only when they were moved to the /deploy folder. We haven’t got to the bottom of this behavior but I wanted to people to know about this.
Which directory i delete if i wanna redeploy with this tool?
tnx in advance
You don’t delete any directory.
Howard
Hi.
Will the above trick work for LCES2?
Thanks,
Rob
Sure will!
It only works for ear files. But it will unpack the ear files, as well as all the sub-ears and wars below that, so you get the same effect as you’re after.