Solved

Silent upgrade

Posted on 2010-11-23
7
418 Views
Last Modified: 2012-05-10
I'm developing a java application that is supposed to run on some workstations. This application  has a Derby database. Also I have a web server too. The application is supposed to communicate with the web server.
This application will run in customers' environment so I was looking for a solution to implement the silent upgrade for this application. Because the customer's staff are not familiar with IT and we don't have enough resource to do it ourselves.
What I thought is this:
1. The application call the web server periodicly for updates.
2.If an upgrade was available:
      2-1:the application gets the upgrade sql and run it on it's own database.
      2-2. the application gets new jar files/class files from web server and reload the classes dynamicly.
I prefer not to use any third party framework for reloading jar files or classes and use just pure java internal APIs.
If anybody has a experience in this issue, I really appreciate his/her help.
0
Comment
Question by:amirmb
7 Comments
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 50 total points
ID: 34199687
You should probably use Java Web Start. In theory, updates to the app will be transparent to the user
0
 
LVL 92

Expert Comment

by:objects
ID: 34200031
> updates to the app will be transparent to the user

jws does not support that
0
 
LVL 10

Assisted Solution

by:Hegemon
Hegemon earned 50 total points
ID: 34200598
If you use jws, it will upgrade the application itself, then it will need to check whether a database upgrade is required by contacting the server.
If you don't then p 2-2 is about the same + additional burden of implementing it + reloading the classes.

I'd opt for jws to update the application itself, with the database upgrade logic (2-1) programmed in the application.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 92

Assisted Solution

by:objects
objects earned 50 total points
ID: 34200692
be aware jws has issues with versioning, and it doesn't handle class reloading
0
 

Author Comment

by:amirmb
ID: 34233194
Thanks for your comments.
 But you know, my application must run silent and as a service in the client machine. So there isn't any browser and any end user. So I can't use JWS.
0
 

Accepted Solution

by:
amirmb earned 0 total points
ID: 35702846
I decided to develop a parent service just for upgrade reasons. this parent service(program) will be installed in client machine but jt would just install updates.
This parent will start the main application. and then whenever there is a new update, the main application will get it(the jar and sql files) and then exit. the parent service will install the updates and start the child service(main application) again.
I don't have a jar file reloading or class loading problems in this solution because the main application would be restarted after update every time (with new jars).
I'm pretty sure that it will work quite well.
0
 

Author Closing Comment

by:amirmb
ID: 35726974
The solution I provided for the problem is simple and practical.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This video teaches viewers about errors in exception handling.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question