Java EE stop application programmatically -


i'm part of project rewrite se application in ee. we're using jboss 7.1.3 our supported application server, trying minimize specific code in interest of portability.

a little background on our application...it accepts processing requests systems (mdb/webservice) , fulfills request interfacing number of other systems. system processing auditing database driven.

current functionality in existing application application shuts down in event of database connection loss prevent unaudited processing. so, i've been looking around see if there standard way of recreating functionality in portable way. guess i'm wondering if there's standard way of stopping application programatically within application or if have thoughts on providing similar functionality.

so far i've seen there may ways hook jboss via jmx , undeploy application or possibly stop mdb delivery...but i'm concerned portability since specific. i'm not concerned portability across ass across different versions of as...since process these actions seems have changed on different jboss releases.

when stop app mean system.exit(0) ? can in jboss/ ee code long app being run yours (not shared jboss)

if shared (by other apps in company or shared provider)

  1. send error response clients serve
  2. write log file , if succeeds continue servicing (log can transferred database - wont work if db has latest time)
  3. use connection pooling maintain data base connections -> suggestion keep better. can use alternate data base if main not reachable. again depends on business / particular situation
  4. to portable , responsive - respond null/ empty set. have status screen -> way of telling clients/ support of status of app , or events (like db or other resource not available time date-time). implementation: each api function first have aop intersect handle in common way.

if want un-deploy can have basic design of 1 abstract class , version each app server/ app server variant. once on app server hardly think changing or adding more, often. maybe can suggest oracle future jsr / feature of web/ ejb application


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -