如何使用Spring DM在AWT EventQueue上创建Swing OSGi捆绑软件 [英] How to create Swing OSGi bundles on AWT EventQueue with Spring DM

查看:120
本文介绍了如何使用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创建一个片段捆绑包,并配置

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捆绑软件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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