Run Java Bean without open browser - java

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

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.

Related

how can i embed java db in a distribution so it runs on another machine?

I am designing a program that will use a large amount of database storage for information and even though it works fine while using Net beans because i start the server, what i need is to make a distribution that will run the java db on another machine by just running the program normally without a separate install and start up of other services because as it stands i have a login in dialog that wont start the rest of the program until that password is correct and this is then fed through for the database password and connection but when i run it on another machine it doesn't run because the database service doesn't start. So i was wondering if anyone knew how to get this working?
the way which the program is setup so far:
GUI class which runs and manages just the GUI side
a coordinating class which links a bunch of other classes for the main bulk of the process etc and receives most of its info from the GUI class and returns only what is needed.
the coordinating class also runs the database connection, record and retrieve methods
so i am hoping that its just another method i can add to one of these to start the java db then run the connection.
Thanks in advance for the help.

Access SQLite datatabase remotely through java app

Im working with a SQLite database right now, and I've made a javaFX application (I will call it the client) that allows me to work with it, but I need to work with it remotely as well. From what I've read SQLite does not support remote acces, so I have 2 choices:
Creating another application in the server that receives input from the client through a socket, and it modifies the SQLite database. (The problem with this, is that the server is a webserver and I dont have SSH access, so I can upload the server side application on the server, but I cant start it...)
(I dont know if this works) Create a java application that runs on the server, and you load it through a browser such as chrome or firefox. From what I've seen java webstart allows you that, but I don't if the app runs on the server or on your computer (meaning that you won't have acces to the SQLite database as well).
If someone here has some knowledge on this pls share, I need to know if I can make this work, and if not, what other options I have.
I don't think SQLite is designed for that. If you use SQLite because it's small and easy, why don't you try JavaDB (derby), it is included in your JDK distribution and you can use it embedded in your app or as a database server (not both of course).

Check allusers everyday, Java on tomcat + Neo4j

For a VAADIN Java Application running on Tomcat7 with Neo4j Database System, i need to create a routine that checks all users everyday at 12AM, and sends email to all of the users who have been returned by my request (the request is ready, and works well).
The problem is here:
I don't know how to start one of my class each day at 12 AM in the application, i already tried Quartz and Java.ejb.Schedule but none of them have worked, Quartz creates me a memory error and only starts the class once, and ajb is simply not working (no loop at all).
Is there an easier way to achieve this? i just need to start my class each day, even if no users are on the application.

Java creating server that is ran as one file with database?

I have a program that I've created that is meant to poll an html internal page with different IPs that update and then will run a telnet session to those IPs to see if the device still has a connection... I'm attempting to challenge myself in creating something further with a dynamic webpage instead of my program spitting out console output...
My Issue:
I dont know what technologies / libraries Java has to execute such things
I want:
A Local Server, to upload a page LOCALLY only (no security is needed as this will be strictly intranet)
My program to implement: A database of sorts to save "logs" essentially that a certain IP / device has had successful connections
in the past....maybe stored to an external file is fine i presume (my
program currently has to re-poll everytime i run it.. i want some kind
of "remembering"..
Is it possible this can all be done in one file? so if i want my computer to run this as soon as it starts up... it will run... grab
its current state of the database of IPs... poll them (periodically)
and then persist and save and update the HTML page dynamically....
I hope i'm being as descriptive as possible... Its a bit of an abstract.. I really just want some introduction to different libraries ... a friend recommended stuff like MongoDB or something but I want to stay strictly to Java programming

Create multi user JAVA program, with Derby, assigning Server dynamically

I´d like to create a Java application to distribute to users in a LAN, where the first who runs the app becomes the server, all the others must access to Derby DB such that they are clients. In my scenario I couldn't leave Derby running as a service, but must be started at first run of the app. Some hints?

Categories