本文介绍了如何使用Spring DM在AWT EventQueue上创建Swing OSGi捆绑软件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个OSGi目标平台,该平台由Equinox,Spring框架,Spring DM和一些针对我的应用程序的自定义捆绑包组成.我所有的捆绑软件都包含Spring应用程序上下文,因此由Spring OSGi扩展程序自动加载.

I have an OSGi target platform consisting of Equinox, the Spring Framework, Spring DM, and several custom bundles for my application. All of my bundles contain Spring application contexts and so are automatically loaded by the Spring OSGi extender.

我的某些捆绑软件包含Swing ui组件.问题在于,Spring OSGi Extender不会在AWT EventQueue上创建这些应用程序上下文,这会导致多个ui问题.

Some of my bundles contain Swing ui components. The problem is that the Spring OSGi Extender does not create these application contexts on the AWT EventQueue which results in several ui issues.

到目前为止,我发现的唯一解决方法是为spring-osgi-extender创建一个片段捆绑包,并配置此处.基本上,我的自定义taskExecutor实现将所有execute()调用转发到AWT EventQueue.这并不是一个很好的解决方案,因为我的应用程序中所有由Spring支持的捆绑软件都将在AWT线程上创建,从而在启动时减慢ui的速度(并且由于无法进行任何刷新,因此基本上取消了初始屏幕加载状态).

The only workaround I've found so far is to create a fragment bundle for the spring-osgi-extender and configure the "taskExecutor" as mentioned here. Basically my custom taskExecutor implementation forwards all execute() calls to the AWT EventQueue. This is not really a good solution since ALL the Spring-powered bundles in my application will be created on the AWT thread, slowing down the ui at start-up (and basically killing our splash screen load status since it's starved of any refresh).

关于如何在AWT EventQueue上创建那些Spring/Swing包的任何想法吗?

Any ideas about how to create those Spring/Swing bundles on the AWT EventQueue?

推荐答案

我没有直接回答您的问题,但是以下项目可以帮助您解决问题. http://max-server.myftp.org/trac/pm

I don't have a direct answer to your question, but the following project should help you to figure it out.http://max-server.myftp.org/trac/pm

这篇关于如何使用Spring DM在AWT EventQueue上创建Swing OSGi捆绑软件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 03:07