Solved

Silent upgrade

Posted on 2010-11-23
7
406 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
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 …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now