| Issue 21: | Feature Request: Built-In Class Loader for Dynamically Loading Java Classes and JARs | |
| 3 people starred this issue and may be notified of changes. | Back to list |
Would like to see the ability in OpenBD to dynamically load Java class and
JAR files without having to place them in the default lib directory or
restart the OpenBD server. Preferably this would be a built in tag or
function as opposed to a CFC.
Potential syntax:
loadJAR("/path/to/myjar.jar") or maybe
loadJavaClass("/path/to/class/or/jar/or/directory")
Would also be nice to allow for multiple paths to be loaded at once, so
maybe the function should be able to take an array containing multiple
resources.
|
|
,
Jun 13, 2008
What would be the scope of that classloader? In other words, if I load "a.jar" in one application would I be able to create classes from it in an other application? |
|
,
Jun 13, 2008
I would think that the reach of a loader of this sort would be at the application level. This is mostly because I could foresee situations where there a jar in the classpath (say version 1.0 which is "older) and you want to use a newer jar (say version 1.5). This would work similar to application specific mappings -- in which the engine checks for mappings set in Application.cfc/cfm first before using the server-wide mappings set in the admin. P.s. Matt originally submitted this feature request for me thus the reason why I am responding. |
|
,
Jun 14, 2008
I did experiment with extending createObject to take in a classpath argument essentially but that gets a bit messy. Access to an application level classloader via this method definitely sounds like a better way to provide this sort of facility. |
|
,
Feb 22, 2009
I hope to see this feature in a future version of the framework. |
|
|
|