hi, i developing a application using struts 1.1, jboss, sql server2000, and ita running fine. But now i want to implement licencing in application. i.e.-if i sale application to any user with licence of 2 as a Admin and 4 as a Condidate, then i want to user can not access more than licencing role at a time. Note that : application is installed on user local system.
please give me concept or code for implementing licencing in application.
It is actually quite unusual to try and limit the number of users for a web application. Most client-server applications that impose licensing restrictions that limit the number of users use some sort of fat client, mainly because it's easier to secure.
Restricting the number of logged-on users would be fairly easly. Just put an object in application scope and increment a counter every time someone logs in. When the counter gets to the maximum allowed by the license, don't allow any more logins until someone logs out.
If you're hosting the application on your server, and are selling licenses to access your application on that server, this would work just fine. If clients are running the application on their own servers and you're sending them a war file, it's much more difficult to control.
The hard part would be securing the application so that the licensing restrictions couldn't be defeated by a knowledgeable user. In this scenario, it wouldn't be difficult at all for someone to use a debugger to query what's in the ServletContext object, and then write code to modify it.
I'm sure there are techniques that can be used to obfuscate and secure licensing restrictions in a web application. I've just never done any of this, so I couldn't help you. I'm sure that by doing some research, you can find ways to do it. [ March 09, 2007: Message edited by: Merrill Higginson ]