Search code examples
javaweb-applicationsglassfishejbjavabeans

Run Java Bean without open browser


I would like to run a web application and keep running a Class which inserts Data in a Database 24/7 without having a browser open.

If I open a browser I would just like to see which data is beeing inserted right now.

How would I keep this process running in a web application on a Glassfish server without having a website open?

Thanks in advance, Daniel


Solution

  • Put the data insertion into a plain old java application and start it via the main method.

    With your web application show the current state of the data base. Add timestamps to your DB records. This allows to query for new records.