B4J Question jShell remote update

atiaust

Active Member
Licensed User
Longtime User
Hi all,

I am trying to update a multi user B4J app remotely via a VPN.

I have a multi user network with a server hosting a Mysql database and VPN access. At present each network terminal runs a B4J app that accesses the database.

I need to be able to update the B4J app for each terminal remotely.

My plan is to write a small B4J/jShell app that will run on each pc terminal on the network in place of the main B4j app which inturn runs the main B4J app from the file server.

This way I can update the system remotely over the VPN.

Will my plan work and has any one else tried this?

Thanks
 

atiaust

Active Member
Licensed User
Longtime User
Hi Erel,

This is a UI app. It is now > 20k lines of code spresd over 25 code modules and 50 odd forms.

My other thought was to have the jShell app check to see if the local version of the app was
the same as the version on the server and if not copy the new version back to replace the local one
before running the main app.

Thanks
 
Upvote 0

AHilton

Active Member
Licensed User
Longtime User
This is what I do. The "starter" app doubles as the splash screen and handles device registration. Works well.


Hi Erel,

This is a UI app. It is now > 20k lines of code spresd over 25 code modules and 50 odd forms.

My other thought was to have the jShell app check to see if the local version of the app was
the same as the version on the server and if not copy the new version back to replace the local one
before running the main app.

Thanks
 
Upvote 0

AHilton

Active Member
Licensed User
Longtime User
Yes. Also, I get the version information from that 2nd app (the "Primary" App) through jShell, as well. The basic sequence is ...

- Starter App is run
- It shows splash screen while ...
- Connects to server (Starter App doesn't connect directly to databases ... it connects to a B4J server app that connects to the databases)
- Sends to the server the devices' MAC address and other identifying information for a 'device registration'
- jShell starts the Primary App and asks for it's version information then Primary App kills itself.
- Starter App asks Server App to compare my Primary App version with any new versions.
- Downloads new version, if necessary, of the Primary App and replaces it.
- jShell starts the Primary App while sending its' (Starter App) version information to the Primary App
- Starter App kills itself

- Primary App asks Server App to compare my Starter App version with any new versions.
- Downloads new version, if necessary, of the Starter App and replaces it.
- Primary App continues on.
 
Upvote 0

atiaust

Active Member
Licensed User
Longtime User
Thanks, sounds basically what I want to do.

How do you check the version no's? Did you use the B4J packager to install the starter app?
 
Upvote 0

AHilton

Active Member
Licensed User
Longtime User
No, I don't use a packager. I just declare a constant and keep that manually updated when I create a release. Then send that out to StdOut (ie Log([Version Constant])) back to the jShell-calling app.
 
Upvote 0

atiaust

Active Member
Licensed User
Longtime User
Update:

I placed the Main App onto one of the server network drives. This drive is accessible via the VPN so updating the app remotely is easy.

I created a small Terminal App that runs on each terminal which performs the log on, security and database checks for that terminal.
This in turn starts an instance of the Main App from the file server using jShell and passes the required security info to the Main App that it needs to run.

At some stage I will Take the advice of AHilton and include the ability to update the Terminal App remotely as well.

I am pleasantly surprised by the speed the Main App loads and runs.

Please let me know if anyone can see any flaws in my plan.

Thanks
 
Upvote 0
Top