Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Add service in Enterprise Application  RSS feed

Martin Ahlblom
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Background history:
I have some experience in Java SE programming, but I am new to Java EE. I have decided to learn, and thus followed this excellent guide: guide

In the application that you get to create in the guide you can add messages and list them. I also figured out how to be able to remove them and how "most" things are connected.
What i wanted to do next was remake the application to list a bunch of servers and then tell me if you could reach them by ping.
Adding and listing servers was not a big step from the messages, but:

The problem:
I want a separate thread (or similar) to run constantly on the server, not only when a client makes the server do things.
In my case, i want it to go through my server list every minute, try to ping each server and update a value in the list depending on the result.
How do i start this thread/process/service or what it might be called in the Java EE world?

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!