skyman
skyman

Reputation: 2335

Application server use for non-web applications

I am interested in understanding "best practice" for the use of application server (for example Glassfish). I have a medium size application that consists of various components that consume and source web services. These components are hosted in a Glassfish environment.

I now have a requirement for a simple scheduled function that copies data from one database to another. That is, it requires no web type functionality. It could easily be built as a simple application (say around Quartz) and deployed in the same Glassfish server with the other components. I understand that this is a simple question, however is this a "reasonable" approach or should it really be a stand alone application running independently from an application server? I guess the more general question is "What are appropriate uses for an application server and what are not?"

Upvotes: 0

Views: 801

Answers (1)

Rick Mangi
Rick Mangi

Reputation: 3769

It could just be a shell script called from cron...

Seriously, not a very good use of an app server UNLESS you're going to get some sort of monitoring or load distribution out of it. But it sounds like this is really just a batch job in which case you should do the easy thing and just write a script or a simple app with a main method that you either call from cron (or something similar) or run from the command line with some sort of embedded timer (or a sleeping thread).

Upvotes: 1

Related Questions