【问题标题】:How to change the eclipse osgi service to timeout如何将eclipse osgi服务改为超时
【发布时间】:2015-02-25 14:49:55
【问题描述】:

我需要通过在 Eclipse RCP 应用程序中启动 OSGi 动态服务进行调试,但超时太短(或者我调试速度太慢!)。

!ENTRY org.eclipse.equinox.ds 2 0 2015-02-25 21:46:26.374
!MESSAGE Getting a lock required more than 10000 ms. There might be a synchronization problem in this callstack or just the build/dispose process of some components took too long! 

有没有办法将超时值设置为比默认的 10000 更长?

【问题讨论】:

    标签: eclipse osgi


    【解决方案1】:

    看起来这可以在'org.eclipse.equinox.ds'插件的调试'.options'文件中配置:

    # Debugging options for the org.eclipse.equinox.ds plugin
    
    # Turns on/off debugging of SCR
    org.eclipse.equinox.ds/debug=true
    # Specifies that logged entries should be printed to the framework runtime console 
    org.eclipse.equinox.ds/print_on_console=false
    # Enables generating and printing logs about the time performance of the operations executed by the SCR
    org.eclipse.equinox.ds/performance=false
    # Makes instance of each component nevertheless components are "immediate" or not
    org.eclipse.equinox.ds/instantiate_all=false
    
    #Advanced options 
    # Enables caching of the parsed XML documents of the component descriptions
    #org.eclipse.equinox.ds/cache_descriptions=false
    # Specifies the maximum time in milliseconds, which is allowed to a user component's activate or bind method to take. If the method invocation has not finished, a new dispatcher thread will be launched to process the pending work of SCR 
    org.eclipse.equinox.ds/block_timeout=30000
    

    要使用此文件,请在 eclipse 命令中指定 -debug <path to options file>

    【讨论】:

      【解决方案2】:

      如果您使用 run configuration

      启动 eclipse 实例,您还可以设置 VM 参数
      -Dequinox.ds.block_timeout=300000000
      

      【讨论】:

        【解决方案3】:

        要增加时间,请查看 Equinox/RuntimeOptions:

        http://wiki.eclipse.org/Equinox/RuntimeOptions

        例如:

        -Dequinox.scr.waitTimeOnBloc=15000

        【讨论】:

          猜你喜欢
          • 2014-12-15
          • 1970-01-01
          • 2016-08-05
          • 2013-06-14
          • 1970-01-01
          • 2010-09-11
          • 2011-06-18
          • 1970-01-01
          相关资源
          最近更新 更多