vendredi 13 mars 2015

In need of Java application deployment customization techniques

I am looking for ideas, methods, frameworks, patterns, articles or anything else that could help me solve a problem involving customizing a deployment of a software application. My focus right now is a Java language implementation of the application. There is also the need for a C++ language implementation. The application is not web-based, nor will it really have much of any user interaction. It will most likely execute on Windows or Linux based systems and will not have Internet access.


In a nutshell the application provides a message communication system between various service modules on a platform. The application was designed to have an abstraction of the message transport mechanism used to send/receive messages. In addition we can provide a number of concrete implementations of transports (e.g. ActiveMQ) that conform to the interface and the intention is that a specific client installation will only need to use one transport implementation.


The problem I need to solve is how to create a specific deployment of the application, where I include only the selected transport implementation classes. The reasons for this are to 1) reduce the overhead of unused code and supporting API libraries and 2) avoid imposing licensing costs for software a client will never need or use. The current idea is that the application defines interface(s) for the transport and only the selected implementing class(es) are provided in the installation. None of the other implementations would be included.


I have tried a method where a transport implementation is specified via some configuration information and a factory creates the appropriate concrete class objects as needed. The problem with this is that I cannot figure out how to avoid having references to all of the supported transport implementation classes. I could provide dummy implementations for the "other" transports, but that seems kludgy.


I was wondering if there was a way where I could create a deployment as described above and have something (Java class loader, something else?) identify the implementing transport classes in the "installation package" and make them available? Is there some sort of design pattern I might be able to use? Should I consider some sort of framework?


Aucun commentaire:

Enregistrer un commentaire