@@ -34,6 +34,7 @@ component {
34
34
var settings = controller .getConfigSettings ();
35
35
// parse parent settings
36
36
parseParentSettings ();
37
+
37
38
// Bind Core JavaLoader
38
39
binder .map ( " jl@cbjavaloader" )
39
40
.to ( " #moduleMapping #.models.javaloader.JavaLoader" )
@@ -43,6 +44,7 @@ component {
43
44
.initArg ( name = " sourceDirectories" , value = settings .modules .cbjavaloader .settings .sourceDirectories )
44
45
.initArg ( name = " compileDirectory" , value = settings .modules .cbjavaloader .settings .compileDirectory )
45
46
.initArg ( name = " trustedSource" , value = settings .modules .cbjavaloader .settings .trustedSource );
47
+
46
48
// Load JavaLoader and class loading
47
49
wirebox .getInstance ( " loader@cbjavaloader" ).setup ();
48
50
}
@@ -62,7 +64,13 @@ component {
62
64
throw ( message = " Invalid library path" , detail = " The path is #arguments .dirPath #" , type = " JavaLoader.DirectoryNotFoundException" );
63
65
}
64
66
65
- return directoryList ( arguments .dirPath , true , " array" , arguments .filter , " name desc" );
67
+ return directoryList (
68
+ arguments .dirPath ,
69
+ true ,
70
+ " array" ,
71
+ arguments .filter ,
72
+ " name desc"
73
+ );
66
74
}
67
75
68
76
/**
@@ -93,6 +101,7 @@ component {
93
101
if ( ! structKeyExists ( javaLoaderDSL , " loadPaths" ) ){
94
102
javaLoaderDSL .loadPaths = [];
95
103
}
104
+
96
105
// Array of locations
97
106
if ( isArray ( javaLoaderDSL .loadPaths ) ){
98
107
var aJarPaths = [];
@@ -105,19 +114,30 @@ component {
105
114
}
106
115
javaLoaderDSL .loadPaths = aJarPaths ;
107
116
}
117
+
108
118
// Single directory? Get all Jars in it
109
119
if ( isSimpleValue ( javaLoaderDSL .loadPaths ) and directoryExists ( javaLoaderDSL .loadPaths ) ){
110
120
javaLoaderDSL .loadPaths = getJars ( javaLoaderDSL .loadPaths );
111
- }
121
+ }
122
+
112
123
// Single Jar?
113
124
if ( isSimpleValue ( javaLoaderDSL .loadPaths ) and fileExists ( javaLoaderDSL .loadPaths ) ){
114
125
javaLoaderDSL .loadPaths = [ javaLoaderDSL .loadPaths ];
115
126
}
127
+
116
128
// If simple value and no length
117
129
if ( isSimpleValue ( javaLoaderDSL .loadPaths ) and ! len ( javaLoaderDSL .loadPaths ) ){
118
130
javaLoaderDSL .loadPaths = [];
119
131
}
120
132
133
+ // Now that we have figured out the user's settings, let's incorporate ours
134
+
135
+ // Dynamic Proxy
136
+ arrayPrepend (
137
+ javaLoaderDSL .loadPaths ,
138
+ variables .modulePath & " /models/javaloader/support/cfcdynamicproxy/lib/cfcdynamicproxy.jar"
139
+ );
140
+
121
141
// incorporate settings
122
142
structAppend ( configStruct .modules .cbjavaloader .settings , javaLoaderDSL , true );
123
143
}
0 commit comments