3 Replies - 301 Views - Last Post: 17 March 2012 - 11:13 PM Rate Topic: -----

#1 nick2price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 561
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

Advise on task

Posted 17 March 2012 - 10:38 PM

Hey guys. I am going to create a desktop app using spring. I want this app do handle some tasks automatically. For instance, one task will be to send an email at a particular time and date each month. As this is not a web app, I would imagine it will be slightly more complicated as I cant use something like cron. There are two things I would imagine need doing. One would be to have the java app start as a window service, as the computer with the app will not be on 24/7. The second thing would be to somehow get a mail sent at a particular time and date. What worries me is if the computer is off at the time and date the email should be sent. I doubt it could perform the action if the computer is off.
So this is what I was thinking. Is it possible to store a desktop app on a server? I dont want to turn it into a web app, but maybe the desktop app could be accessed through a web address? So the user visits the web address, and the desktop app becomes a pop out window using swing. In this case, even if the user doesnt access the app, it is still running on the server therefore automated tasks will be carried out.

Any thoughts on the best way to do this? (I really dont want to make a spring mvc app, I will though if this is the best option)

Is This A Good Question/Topic? 0
  • +

Replies To: Advise on task

#2 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7562
  • View blog
  • Posts: 12,680
  • Joined: 19-March 11

Re: Advise on task

Posted 17 March 2012 - 10:48 PM

Sounds to me like two parts, a front end and a daemon. The daemon lives on the server, the front end runs on the desktop and contacts the daemon when the user wants to set up an outgoing message.
Was This Post Helpful? 1
  • +
  • -

#3 nick2price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 561
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

Re: Advise on task

Posted 17 March 2012 - 10:56 PM

Sounds interesting. One thing I should have mentioned which might be a problem for this approach is the email sent will contain data from the frontend. If the deamon remains online, and the frontend is on a computer which is turned off, I would think there would be no way for the deamon to get the email data from the frontend. The easy solution would be to just create a spring mvc app, which is what I will probably do. I am not really a big fan of jsp though which is why I have been trying to avoid it, lol. Out of interest though, do you know if it is possible to store a whole desktop app (pure swing, no client/server stuff) on a server?
Was This Post Helpful? 0
  • +
  • -

#4 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7562
  • View blog
  • Posts: 12,680
  • Joined: 19-March 11

Re: Advise on task

Posted 17 March 2012 - 11:13 PM

Well, I assume the front-end program would upload the email to the daemon, which would load it into a queue to be fired off at the appropriate moment. That's the point of putting it on a server, no?
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1