JBoss Application Initialization

I have a question about startup of my java ee application in JBoss.  I keep track of whether users are 'logged in' in my database.  Every time JBoss restarts, I want all the logged in booleans to be set to false.  Where do I put application initialization code in JBoss?

I saw a post that inidicated using a Servlet that loads on startup, but surely there is a way to do this without getting the web container involved?

Who is Participating?
muktajindalConnect With a Mentor Commented:
An alternative approach may be setting all the logged in booleans to false while shutting down the application or JBoss but here you may need to take care of the server misbehaviour too.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.