0

I want to use an algorithm implemented in java if it exists, that allow me to schedule work in a company where employees can leave company to serve client, the customer request come to the company every day and the algorithms can take also old customer request.

4 Answers 4

1

Quartz Job Scheduler should do you just fine. You can configure jobs using CRON expressions. This product is used by enterprises everywhere.

Quartz Scheduler Home Page

Is this algorithm you need for a school project or for work? Why re-invent the wheel when you don't have to?

Sign up to request clarification or add additional context in comments.

Comments

1

Drools Planner is a tool for optimized automated planning. Is this what you're after?

Comments

0

If you really wanted algorithm, try JGap or Jaga

Solver ofers some shedule apps.

Comments

0

You tagged your question with java-ee, so here's an answer that leverages the technologies and APIs available in the Java Enterprise Edition platform:

  1. Configure queue in an JMS server. Depending on your setup, you can either use the JMS server provided with the application server, or use an external message server.
  2. Implement an enterprise application with a Timer bean and a stateless Session bean.
    • The Timer bean will be set to fire every day/hour/other appropriate interval. When it wakes up, it calls the stateless Session bean.
    • The stateless Session bean has a single business method which reads all messages off the JMS queue and performs actions according to each message.
  3. Deploy the two beans in an enterprise application on the application server.
  4. Provide information to customers about how to connect to the queue and the message format, or implement client applications that submit messages to the queue on behalf of customers.

If you connect to a JMS queue that supports transactions, then any failure while handling a message in the stateless Session bean will cause the message to be put back into the queue and re-send.

This design does not use an Message-Driven Bean to consume the messages from the queue because then you would have to worry about persisting the messages through other means until the timer service fires.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.