tracker issue : CF-4199851

select a category, or use search below
(searches all categories and all time range)

New approaches for integrating java libraries via network class loader

| View in Tracker

Status/Resolution/Reason: To Fix//Investigate

Reporter/Name(from Bugbase): Luis Majano / Luis Majano ()

Created: 09/29/2017

Components: Language, Java Integration

Versions: 2016

Failure Type: Others

Found In Build/Fixed In Build: /

Priority/Frequency: Normal /

Locale/System: / Core

Vote Count: 0

One of the abilities that is missing in ColdFusion is to be able to class load new java libraries dynamically.  Right now you can only achieve this in the following ways:

1) Add to lib path.  Not portable, extremely custom and not modular.
2) Add to Application.cfc via this.javaSettings.  Great for standalone apps, but not modular and does not allow for on-deman loading.

It would be great to integrate a network class loader into the current page context class loader so you can add paths a-la-carte, get the current loaded URLs, or remove them as needed.  This is completely doable as we have achieved this already with the JavaLoader project with Mark Mandel.  It requires implementing a network class loader and just attaching it to the current parent loader.

This would open great flexibility for modular development and not monolithic development for Java integrations.  

Here are some proposals for implementation:

1. Top level functions
addJavaClassPath( paths )

2. Objectifyed

I find this imperative if we want to integrate modularly with Java.  If not, we go back to monolithic times.