I want to write an application that when deployed on a server discovers some classes on that server and their methods and exposé a list of it to a client (via web service, servlet or RMI).
the client can then choose a method and activate it (with reflection).
Problem is that my application is not in the same context of the other applications on the server so I can't activate their methods (I don't have access to their classloader).
I have a few ideas but not sure if they are feasible:
Create a jar and make all applications on the server know it (via Manifes file or by putting it in the server lib) - Problem is ,that way I can't exposé an interface to the client (maybe I can through RMI?)
Create a WAR and link all applications to this WAR, so when they startup they load it (like linking to a jar) - as far as I know its not possible.
Is there a classloader that knows all classes? is there a way to get it?
How does profilers do it?
Any idea will be welcomed.