Safe to use ProcessEngineConfigurationImpl.setClassloader?

We are embedding Camunda into our product, and our product has some JavaDelegate classes we want to make available to all BPFlows, including those deployed as separate war files on our server.

We are using JBoss with the shared process model, and we currently deploy our JavaDelegate classes in our EAR file.

Our current thinking is to create an Engine plugin that sets our EAR file classloader as the classloader for Camunda. This makes the JavaDelegates from the EAR available to the shared engine. The API we are using is:
https://docs.camunda.org/javadoc/camunda-bpm-platform/7.3/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.html#setClassLoader(java.lang.ClassLoader)

In our initial tests, this seems to work. Does this sound like a valid approach? We did have some concerns about messing with the Camunda classloader and any unexpected problems this may cause.

This is a forum about the modeling toolkits provided by bpmn.io. Please refer to the Camunda forum to address your platform specific concerns.