将Apache ACE Agent与嵌入在Tomcat中的Apache Felix集成? [英] Apache ACE Agent integration with Apache Felix embedded in Tomcat?

查看:164
本文介绍了将Apache ACE Agent与嵌入在Tomcat中的Apache Felix集成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下跟进问题 Apache ACE和嵌入在Tomcat中的Apache Felix?

  1. 从1.0版开始(从0.8.1版开始)之后,我看不到最新的Maven存储库可用于检索org.apache.ace.agent?我是Apache ACE的新手.因此想知道我是否想念任何东西吗?
  2. 我也有类似的问题.因此想检查一下是否成功?如果是,那么它是如何实现的?

推荐答案

让我尝试一些之后回答我的问题,以便其他人可以使用相同的方法:

Let me answer my question after some tries so that others can use the same:

  1. 关于第一点,我不确定.需要与Apache ACE所有者核对
  2. 关于第2点:

正如Marcel所说,我已经提取了代理jar"jar xf target.jar jar/org.apache.ace.agent.jar",并使用命令将其安装在本地Maven存储库中.

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

在原始Web应用程序Maven代码中提供了这种依赖关系,如下所述:

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>

在实例化Felix的地方添加了其他已配置的参数,如下所述:

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.

这篇关于将Apache ACE Agent与嵌入在Tomcat中的Apache Felix集成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆