如何在apache felix上实现异步处理?(How do I implement asynchronous processing on an apache felix?)
在我们当前的项目中,我们需要异步进行一些计算。 我们在Apache Felix 4上使用带有bndtools的OSGi。有关如何做到这一点的任何建议吗? 我们正在寻找类似http://docs.oracle.com/javaee/6/tutorial/doc/gkkqg.html的内容
In our current project we have the need to do some calculations asynchronously. We're using OSGi with bndtools on an Apache Felix 4. Any advice on how to do that? We're looking for something like http://docs.oracle.com/javaee/6/tutorial/doc/gkkqg.html
原文:https://stackoverflow.com/questions/39762144
最满意答案
再次作为答案,以便可以将主题标记为已解决: 可用的RecordStore大小
(PS:你有多少要写,SO不会自动将你的答案转换为评论。)
Once again as an answer so the topic can be marked as solved: Available RecordStore size
(PS: how much do you have to write that SO does not convert your answer automatically to a comment.)
相关问答
更多-
TCP/IP模型是一个________。[2023-05-19]
a -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
但是,如果MIDlet使用多个线程来访问记录存储,则MIDlet负责协调此访问,否则可能会导致意外后果。 我认为这意味着两个线程同时在商店中读取和写入记录可能会产生不良结果; 特别是当您依赖特定订单的商店,或者记录具有已知索引时。 您在RecordStore.enumerateRecords()的Javadoc中回答了您的第二个问题: keepUpdated - 如果为true,则枚举器将使其记录存储的记录中的任何更改保持其枚举。 请谨慎使用,因为可能会产生性能影响。 如果为false,则枚举将不会保持最新 ...
-
RMS不适合存储照片。 因为RMS设计用于少量存储。 你无法处理大量的数据。 更好的是你可以从手机内存或存储卡中读取。 还有,如何在没有申请的情况下拍摄当前拍摄的照片? 编辑: 您可以开发拍摄照片的应用程序并将其存储在RMS中(但数量不大)或通过调用Web服务将其存储在服务器中。 Ok , I make the application starts the camera through a command : mPlayer = Manager.createPlayer("capture://video") ...
-
我遇到了同样的问题。 但仔细阅读api类和这个方法后,我发现在解释中写了一行“记录从记录存储中删除。该记录的recordId不被重用。” 因此,在记录库中无法以相同的记录号更新和添加特定数据! 因此,您需要使用Record枚举技术或使用包含要存储的必填字段的类,将其转换为ByteArray,然后将ByteArray存储在记录存储中。 希望这会对你和其他人有所帮助。 I faced the same problem. But after carefully reading the api class and ...
-
我想到了。 原来这是数据库的一个问题。 在我的结构中,我使用的是“Discriminator”字段,该字段未设置并导致问题。 感谢您的时间。 I Figured it out. Turns out it was a problem with the Database. In my structure I was using a "Discriminator" field which was not set and was causing problems. Thank you for your time.
-
再次作为答案,以便可以将主题标记为已解决: 可用的RecordStore大小 (PS:你有多少要写,SO不会自动将你的答案转换为评论。) Once again as an answer so the topic can be marked as solved: Available RecordStore size (PS: how much do you have to write that SO does not convert your answer automatically to a comment ...
-
有趣的是 - 处理记录存储的代码对我来说相当不错。 UI中是否有可能出现一些故障 - 例如使用旧的或错误更新的屏幕对象? 你如何调试你的应用程序? 既然你提到了模拟器 , System.out/println看起来就像是一个自然的选择吗? 在updateClient设置并在getClients获取后,我会用它来输出记录的内容 interesting - your code dealing with record store looks rather OK to me. Is there a chance f ...
-
得到最后5条记录(get last 5 records)[2024-03-20]
订单received_documents创建日期并采取5最后: @business_partner.received_documents.order(:created_at).limit(5) 要得到5个最新的你会做: @business_partner.received_documents.order(created_at: :desc).limit(5) 编辑 这个问题 @business_partner.received_documents.last(5) do |document| 是你实际上 ... -
你需要的是enumeration.numRecords(); 我认为recordStore.getNumRecords()也应该工作,因为这是你使用填充数组,你甚至可以使用数组本身的长度。 这些选项都在代码中,最好再探索一下,并检查文档以解决琐碎的问题。 here is the solution of my problem , I do a for loop to get the number of elements of the array. the counter should be the lengt ...