【问题标题】:EJB TimerService: Changing location of file data storeEJB TimerService:更改文件数据存储的位置
【发布时间】:2016-05-23 07:36:24
【问题描述】:

我正在使用 EJB 的 TimerService,并使用文件数据存储来持久化计时器。文件位于standalone/data/timer-service-data/applicationname-fullversion-buildnumber.NameOfBean

每次我提高版本或内部版本号时,计时器都会位于一个新目录中,我会失去持久性。

查看配置 XML,似乎我可以更改计时器持久性的基本目录,但我似乎无法找到任何地方来指定使用什么来识别应用程序。最好我想使用应用程序名称和可能的主要版本,去掉次要版本和内部版本号,确保应用程序在次要版本中使用相同的计时器数据存储。

我正在使用 JBoss 6.4.5.GA。

【问题讨论】:

    标签: java timer jboss ejb


    【解决方案1】:

    您好,您可以配置定时器服务相关文件的路径。

    见官方文档here

    登录 登录管理控制台。

    Open the Timer Service Tab
    Click on Profile in the top right, expand the Container item in the Profile panel on the left and select EJB 3. Select the Services
    

    主面板中的选项卡,然后是计时器服务选项卡。

    Enter Edit Mode
    Click the Edit Button. The fields become editable.
    
    Make the Required Changes.
    You can select a different EJB3 thread pool used for the Timer Service if additional thread pools have been configured, and you can
    

    更改用于保存计时器服务数据的目录。计时器 服务数据目录配置由两个值组成:Path、 存储数据的目录;和相对于,目录 包含路径。默认情况下,Relative To 设置为文件系统路径 变量。

    【讨论】:

    • 它看起来很像 Configuration > Container > EJB 3 > Services 下的一般路径设置,它是计时器的 base 目录,而不是每个计时器的特定目录名称。看起来它正在使用应用程序名称,我希望以编程方式或在应用程序配置中更改它。
    猜你喜欢
    • 2012-12-18
    • 2023-03-12
    • 2015-05-25
    • 1970-01-01
    • 2012-06-08
    • 1970-01-01
    • 1970-01-01
    • 2018-04-26
    • 2010-11-20
    相关资源
    最近更新 更多