Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic program modules

Status
Not open for further replies.

JavaDude32

Programmer
Aug 25, 2001
180
US
Okay, I'm working on a server application (not servlet or jsp) that will service multiple users and have a user account system. I'd like to have different modules of code in this program used for users with different security levels. Also I'd like to be able to update the system on fly, or basically recompile modules from the inside without stopping it, is there a way I can do this? Do I have to overload the ClassLoader to accomplish these tasks?
 
>>> Okay, I'm working on a server application
Using ...

>>> I'd like to have different modules of code in this program used for users with different security levels.

Why can the same code not service different account levels ?

>>> basically recompile modules from the inside without stopping it

Dangerous. How is the JVM going to know which version of code to use ? How will you tell it that it needs to unload your current version and reload your new version ? Is this not in effect stopping your application anyway ? What if a user is in mid-transaction when you do a "recompile".
 
Okay, using Java networking, basically the server code is from pure stratch. I don't mean like a full recompile either, just a module section such as perhaps admin tools or the file reader or whatever. The same code can service different users, I was just looking for a different way, breaking up the structure basically, sort of like a conditional include system in C++. Anyways, is this possible?
 
Take a look at :
HotSwap provides a robust library for updating the implementation of an object at runtime, otherwise known as hotswapping. This is achieved through recompilation, dynamic class reloading, and object state migration throughout the life of an application. This is fundamentally useful for runtime development of an application, so-called application evolution or incremental development.
HotSwap is released under the LGPL.
Source included.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top