2 Replies Latest reply on Mar 27, 2014 4:05 PM by John Francis

    Dynamic class loading from a deployed EAR

    John Francis Newbie

      Suppose I have a database which provides me with class names, which implement a standard Service Provider like API.

      I have an application packaged as an EAR which calls the database to get these class names and is then meant to load them.

      Those classes were not available at deployment time of the EAR, and are not available within the EAR itself.

      Is there a recommended mechanism to add the classes so that they become available to the EAR, without a redeploy of the EAR?

      Could I for example use the Module API to dynamically create a new module and then load them from there?

      Or am I just stuck with using a custom classloader which loads the .class files from some kind of datastore, with all the problems that implies (i.e. duplicating the jboss modules mechanism for resolving dependencies..)

       

      Thanks.

       

      In reply to Tomaz; (I cannot reply as I seem to have reached my 'frequency limit')

       

      For example the classes that need to be loaded are in a jar file on the filesystem or some other datastore...