I have two different applications deployed in Tomcat server. The purpose of one application is to call another application which processes data using rule engines. Basically, it calls a static method of another application through reflection.
This works perfectly fine in Jboss. But now for some reason, I need to deploy same applications on Tomcat. And here it fails. It seems that one application classes are not able to find another application classes. Doesn’t Tomcat supports reflection? Or reflection is not possible between different applications?
Thanks,
Nipun
I think you’re relying on the classloading structure of each app server. The classloader structure/hierarchy is configurable, but generally the 2 apps will occupy different classloaders, and using reflection across classloaders could well be problematic.
Why are you using reflection to communicate between these apps ? This doesn’t sound practical or, indeed, suitable. You have 2 web apps, so why not communicate using their HTTP API ? If you can/don’t want to do this, I would investigate other solutions, such as RMI.