?
Solved

Silent upgrade

Posted on 2010-11-23
7
Medium Priority
?
442 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 200 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 200 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 92

Assisted Solution

by:objects
objects earned 200 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Suggested Courses

649 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