AdempiereActivator vs Incremental2PackActivator (Activator and 2Pack)

AdempiereActivator vs Incremental2PackActivator (Activator)

The purpose of this section is to discuss the relationship between an OSGi plugin and an iDempiere Pack In (2Pack). There are two developer tools that an integrator will typically use when deploying customizations. One is the OSGi plugin and the second is iDempiere Pack In (also known as a 2Pack). The OSGi plugin packages code into a deploy-able module. Deploying a plugin is demonstrated here. The Pack In (2Pack) packages changes to iDempiere's application dictionary. Deploying a Pack In is demonstrated here. There are times when it makes sense for a integrator to include a 2Pack file in an OSGi plugin. iDempiere supports this 'single-file' deployment process by providing two OSGi activators:
  1. AdempiereActivator - used when you have a plugin with a single 2Pack named 2Pack.zip. Note the name includes a capital P. Note this method will try to install the 2Pack file every time the server is launched. If you have one plugin with a small 2Pack, the re-install every launch is a minor issue. If you have many plugins with large 2Packs, this overhead can become noticeable.
  2. Incremental2PackActivator - used when you have plugin that has multiple 2Pack files. When plugin is activated, it looks at the version of the plugin/bundle and it compares it to the names of the 2Pack files. 2Pack files installed with the Incremental2PackActivator will follow a pattern like: 2Pack_1.2.3.zip. If the bundle's version is less than or equal to the version of the 2Pack file, the 2Pack file gets added to the list to be packed in.
Here are the common questions: