2011-07-27 161 views
2

我试图让一个包部署其他包并使用org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer启动它们,大部分类似于管理应用程序(org.eclipse.virgo .apps.admin)正在做。我从管理控制台代码中获得启发,并执行以下操作: deploymentIdentity = applicationDeployer(bundleFile.getURI(),new DeploymentOptions(false,false,true));处女座的应用程序部署程序API崩溃取消部署

和:

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] 

我接线的applicationDeployer先是用服务REF,然后用OSGi的:听众。在这两个实现中,applicationDeployer引用永远不会回来,但仍然可以在处女座的管理Web应用程序中正常工作。 我在做什么错?

回答