× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



<justin>
OVRDBF FILE(QPRINT) TOFILE(QTEMP/JAVAOUTPUT) OVRSCOPE(*JOB)
RUNJVA CLASS(org.tmatesoft.svn.cli.SVN) PARM(checkout 'http://<svn server here>/' '<local file path here>' '--username' <userName> '--password' <password>)
DLTOVR FILE(QPRINT) LVL(*JOB)

The OVRDBF is mandatory because the Java outputs data that I must have. There are several different parameter sets, but the class itself remains the same. I'll send the JARS off list.
</justin>

ovrdbf to redirect stdout (System.out) isn't threadsafe and won't work for a prestarted JVM in a multithreaded environment (as AppServer4RPG is providing). But it's anyway possible to keep the JVM alive, thow the SVN class tries to throw the JVM out by System.exit(). You could try the following: (out of my head)

- write an ExitPreventer:

import java.security.AccessControlException;

class ExitPreventer extends SecurityManager {

public void checkExit(int status)
{
super.checkExit(status);
throw new AccessControlException("System.exit() not allowed");
}
}

- wrap SVN in a class of your own and activate ExitPreventer

public class MySVNCLI {
static{
System.setSecurityManager(new ExitPreventer());
}
public static void main(String[] args) {
org.tmatesoft.svn.cli.SVN.main(args);
}

}

- now you have to call your wrapper (with same parms etc) instead of SVN)

The first call would be as slow as RUNJVA SVN, but subsequent calls in the same job should be faster.

But it would be better,faster and more clean to use SVNUpdateClient() in a Java Programm or something similar; there are Java examples out and it should be rather easy to fit one of these examples in AppServer4RPG, implementing an SVNHandler.

Dieter

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.