Created
July 22, 2011 14:58
-
-
Save bittersweetryan/1099615 to your computer and use it in GitHub Desktop.
Put Classloader in metadata
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cffunction name="setClassLoader" returntype="void" access="private" output="false" hint="I put this objects classloader into the metadata its only created once" > | |
<cfargument name="libs" type="array" required="true"> | |
<cfscript> | |
//class loader doesn't exist yet | |
if(!structKeyExists(getMetaData(this),"classLoader")) | |
getMetaData(this).classLoader = createObject("component", "JavaLoader").init(arguments.libs); | |
instance.classLoader = getMetaData(this).classLoader; | |
</cfscript> | |
</cffunction> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment