私はバンドルに他のバンドルをデプロイさせ、org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer を使用してそれらを開始しようとしています。ほとんどの場合、管理アプリ (org.eclipse.virgo.apps.admin) と同じです。私は管理コンソールのコードから着想を得て、次のことを行いました。
と :
applicationDeployer.undeploy(deploymentIdentity);
動作しますが、たまに例外でクラッシュします:
service proxy has been destroyed
org.springframework.osgi.service.importer.ServiceProxyDestroyedException: service proxy has been destroyed
at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor$ServiceLookUpCallback.doWithRetry(ServiceDynamicInterceptor.java:105) ~[na:na]
at org.springframework.osgi.service.importer.support.internal.support.RetryTemplate.execute(RetryTemplate.java:83) ~[na:na]
at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor.lookupService(ServiceDynamicInterceptor.java:430) ~[na:na]
at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor.getTarget(ServiceDynamicInterceptor.java:415) ~[na:na]
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62) ~[na:na]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[na:na]
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) ~[na:na]
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) ~[na:na]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[na:na]
at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59) ~[na:na]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[na:na]
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) ~[na:na]
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) ~[na:na]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[na:na]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) ~[na:na]
最初に service ref を使用して applicationDeployer を配線し、次に osgi:listener を使用しました。どちらの実装でも、applicationDeployer 参照は戻ってきませんが、乙女座の管理 web アプリケーションでは引き続き正常に機能します。私は何を間違っていますか?