Skip to content
This repository
Browse code

Merge pull request #28 from cfrockstar/develop

Railo Mongo Factory to load jars without Javaloader or requiring them to...
  • Loading branch information...
commit 6061a06b4c4eba78230558efb41de6c690c73873 2 parents 846b320 + c619d52
Marc Esher authored

Showing 1 changed file with 16 additions and 0 deletions. Show diff stats Hide diff stats

  1. +16 0 core/RailoFactory.cfc
16 core/RailoFactory.cfc
... ... @@ -0,0 +1,16 @@
  1 +<cfcomponent output="false" extends="AbstractFactory" hint="Uses Railo's createObject('java', path, jarPaths) to create Java objects.">
  2 +
  3 + <cffunction name="init" output="false" access="public" returntype="any" hint="">
  4 + <cfscript>
  5 + variables.jarPaths = directoryList( expandPath("/cfmongodb/lib"), false, "path", "*.jar" );
  6 + return super.init();
  7 + </cfscript>
  8 + </cffunction>
  9 +
  10 + <cffunction name="getObject" output="false" access="public" returntype="any" hint="Creates a Java object">
  11 + <cfargument name="path" type="string" required="true">
  12 + <cfset var result = createObject("java", path, arraytolist(variables.jarPaths))>
  13 + <cfreturn result>
  14 + </cffunction>
  15 +
  16 +</cfcomponent>

0 comments on commit 6061a06

Please sign in to comment.
Something went wrong with that request. Please try again.