Solved

Silent upgrade

Posted on 2010-11-23
7
429 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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 video teaches viewers about errors in exception handling.

717 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