English 中文(简体)
• 如何控制 running干服务
原标题:how to control a running java service

我打算设立一个“java方案/服务”,利用信息资料库的民意测验器功能,不断对手法进行污染。 我愿补充一下,在该方案运行期间,再补充一下手工艺。 我以前没有资料库的经验,但我需要把资料库扩大到许多手稿。

  • 是否有任何人在为投票人打听器而设的信息库方面有经验? 你们会考虑用什么其他方法/图书馆来污染许多手套(10 000+)?

  • 你们认为,什么是控制 running(console)方案的一种公认解决办法。 我正在考虑利用一个控制港进行指挥。 是否有其他机制更容易用于实现这一功能?

请让我知道,你是否需要更具体的信息。

Kind regards, Ivo

最佳回答

Yes, a normal way to interact with a remote service would be a control port as you described it. You can also control it via Database settings and create a thread which will poll for these DBs settings. The DB settings will be set via some web? UI.

If you plan on running one service with polling on one single machine I would rather recommend against it and set your service either on virtual machines or setup multiple instances of the service on one big machine with a big amount of memory. I have been using a com.sun.syndication library for feeds parsing/retrieving.
I don t want to be a captain obvious but I think it s easily achievable with a usual multi-threading application and Concurrent Queueing. If I got you correctly.

感谢。

问题回答

What do you consider to be an accepted solution to control a running (console) java program. I was thinking about using a control port for sending commands. Are there other mechanisms more commonly used to achieve this functionality?

  1. 您可从<代码>上读到参数。 唯一的不利之处是,无论价值是否改变,每当你想要使用该财产时,必须阅读财产档案。

  2. 您可使用JMX。 这是一种相当神圣的概念,在这一概念中,你利用<条码>jconsole/code>的指挥(Java管理延伸s Console)使信条易于管理。 一旦完成,你就能够把价值远程注入一个运行中的联合考试。

http://docs.oracle.com/javase/tutorial/jmx/remote/jconsole.html” rel=“nofollow”>nice example 。 甲骨文网站显示你如何这样做。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签