File module = new File(moduleDir);
FileArchive fileArchive = new FileArchive();
fileArchive.open(module.toURI()); // directory where rar is exploded
ConnectorRuntime runtime = ConnectorRuntime.getRuntime();
ClassLoader loader ;
if(ConnectorsUtil.belongsToSystemRA(rarModuleName)){
loader = ConnectorRuntime.getRuntime().getSystemRARClassLoader(rarModuleName);
Thread.currentThread().setContextClassLoader(loader);
}else{
loader = runtime.createConnectorClassLoader(moduleDir, null, rarModuleName);
}
ConnectorArchivist connectorArchivist = runtime.getConnectorArchvist();
//TODO V3 what happens to embedded .rar ? as its parent classloader should be application CL
//setting the classloader so that annotation processor can make use of it.
connectorArchivist.setClassLoader(loader);
//fileArchive.entries("META-INF/ra.xml");
//TODO V3 need to check whether ra.xml is present, if so, check the version. process annotations