Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https://issues.jboss.org/browse/RAILO-3213 #433

Open
wants to merge 1 commit into
base: 4.2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class CFMLEngineFactory {
// set to false to disable patch loading, for example in major alpha releases
private static final boolean PATCH_ENABLED = true;

private static boolean loadRailoFromClassPath = false;
private static CFMLEngineFactory factory;
private static File railoServerRoot;
private static CFMLEngineWrapper engineListener;
Expand Down Expand Up @@ -171,6 +172,12 @@ else if(root.canWrite()) {
}
}
catch(IOException ioe){}
// if this is true, the railo patch file should be renamed to a jar file and placed on the classpath in order for it to work.
String loadRailoFromClasspathProperty = config.getInitParameter("railo-load-from-classpath");
if ( !Util.isEmpty( loadRailoFromClasspathProperty ) ) {
loadRailoFromClassPath = loadRailoFromClasspathProperty.toLowerCase().equals("true");
}

}


Expand Down Expand Up @@ -198,6 +205,19 @@ private CFMLEngine getEngine() throws ServletException {
}

private void initEngine() throws ServletException {

if ( loadRailoFromClassPath ) {
try {
engine = getEngine( mainClassLoader );
} catch (Exception e) {
e.printStackTrace();
}
} else {
_initPatchEngine();
}
}

private void _initPatchEngine() throws ServletException {

int coreVersion=Version.getIntVersion();
long coreCreated=Version.getCreateTime();
Expand Down