업데이트 : 어떤 이유로 실현하는 데 약간의 시간이 걸렸지 만 구성 파일은 번들 PID에만 해당되며 동일한 cfg 파일을로드하려고 시도합니다. 서로 다른 두 묶음 안에서 청사진을 만들고 경쟁 조건을 만들고있었습니다. 대상 번들에서만 cfg 파일을 사용해야합니다.Karaf v4.0.8 : 여러 청사진에서 동일한 영구 ID의 구성을로드 할 수 없습니다.
참고 : 위의 내용은 청사진 묶음에만 적용됩니다. 번들을 동적으로 유지하기 위해 OSGI ConfigAdmin 서비스에 의존하지 않고 Camel 컨텍스트와 같은 것으로부터 cfg 파일을 사용하려면 괜찮습니다.
2 개의 청사진이 karaf 4.0.8 'deploy'폴더를 통해 배포되었습니다. 둘 다 다음과 같은 공통 섹션이 있습니다.
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint https://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<cm:property-placeholder id="common" persistent-id="common" update-strategy="reload" placeholder-prefix="$(" placeholder-suffix=")"/>
<cm:property-placeholder id="sqlcfg" persistent-id="12345" update-strategy="reload" placeholder-prefix="$[" placeholder-suffix="]">
</cm:property-placeholder>
'공통'에서 둘 다 공통으로 구성을로드하고 싶습니다. 그러나 'etc'폴더에서 동일한 persistentId 및 properties 파일을 공유 할 때 두 번째로 배치 될 청사진은로드 및 언로드를 유지합니다. 파일을 다른 파일에서로드하면 모든 파일이로드됩니다.
커뮤니티에서 아이디어를 얻은 이유는 무엇입니까? 미리 감사드립니다.