Let me answer my question after some tries so that others can use the same:
- Regarding point no 1 I am not sure about. Need to check with Apache ACE owners
- Regarding point no 2:
As commented by Marcel, i had extracted agent jar "jar xf target.jar jar/org.apache.ace.agent.jar" and installed the same in local maven repo with command
mvn install:install-file -Dfile=./org.apache.ace.agent.jar -DgroupId=org.apache.ace -DartifactId=org.apache.ace.agent -Dversion=2.0.1 -Dpackaging=jar
Provided this dependency in original web application maven code as detailed below:
<dependency>
<groupId>org.apache.ace</groupId>
<artifactId>org.apache.ace.agent</artifactId>
<version>2.0.1</version>
</dependency>
Added additional configured parameters where we were instantiating Felix as detailed below:
String localId = UUID.randomUUID().toString();
Map config = new HashMap();
//Here i am adding Apache ACE agent configuration. For now two are ok
config.put(AgentConstants.CONFIG_DISCOVERY_SERVERURLS, "http://localhost:8080");
config.put(AgentConstants.CONFIG_IDENTIFICATION_AGENTID, localId);
List<BundleActivator> activators = new ArrayList<>();
//Here i am attaching Apache ACE activator as system activator
activators.add((BundleActivator) new Activator());
config.put(FelixConstants.SYSTEMBUNDLE_ACTIVATORS_PROP, activators);
Felix felix = new Felix(config);
.... regular felix.start etc goes here.