I need your sage counsel on the following scenario that I would like to implement.
I have a class that interfaces with a persistence layer (an ERP system) with a JAR dependency (in fact JAR and a DLL :() let's call him DaButler. What I'd like to do is to put it into its own webapps directory in Tomcat and make its services available to any/all other projects (let's call them project Abuser1, Abuser2 etc) on that particular Tomcat (8.5 at the moment) instance. Can you please let me know
- If you have done this and have some code to share. :)
- What are my options and the pros and cons of each.
- Since the primary purpose of the persistence layer interface is to retrieve data and hand it over to the caller. Would each and every bean need to be defined in both projects? Meaning DaButler and Abuser1?
Here are the options that I considered and rejected. I don't want to explain why as it might confuse things too much. At least for the moment.
- Make DaButler a JAR and include it with every project.
- Turn DaButler into a REST Service.
Lastly here are a couple of options that I thought might work but I have never tried.
Writing a custom class loader. If I do this and load DaButler in my Abuser1 project will the dependencies of DaButler get loaded also?
Also thought about using Tomcats Shared classloader. However, I see that it is missing from Tomcat 8 documentation, which makes me very nervous. :O If it is still an option and will work would love some code examples
Thank you in advance.
LAC