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 Link

  1. Download the utility and unzip the file. You should have a file called “AdobeJBossEarUnpacker.jar
  2. 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).
  3. 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.

Comments

11 Responses to “Speedup JBoss LiveCycle Startup”
  1. Mark Szulc says:

    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 :-)

  2. pcopeland says:

    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

  3. Charles Mae says:

    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?

  4. Charles Mae says:

    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!

  5. Jayan Kandathil says:

    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.

  6. raffaele says:

    Which directory i delete if i wanna redeploy with this tool?
    tnx in advance

  7. htreisman says:

    You don’t delete any directory.
    Howard

  8. Rob says:

    Hi.

    Will the above trick work for LCES2?

    Thanks,
    Rob

  9. admin says:

    Sure will!

  10. admin says:

    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.

Trackbacks

Check out what others are saying about this post...
  1. [...] post on Avoka blog – they created a script to unpack the EAR and WAR archives from Livecycle ES distribution – that [...]



Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!