Java Code Examples for com.sun.corba.se.impl.orbutil.ORBConstants#SERVER_LOG_DIR

The following examples show how to use com.sun.corba.se.impl.orbutil.ORBConstants#SERVER_LOG_DIR . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ORBD.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * Ensure that the Db directory exists. If not, create the Db
 * and the log directory and return true. Otherwise return false.
 */
protected boolean createSystemDirs(String defaultDbDir)
{
    boolean dirCreated = false;
    Properties props = System.getProperties();
    String fileSep = props.getProperty("file.separator");

    // determine the ORB db directory
    dbDir = new File (props.getProperty( ORBConstants.DB_DIR_PROPERTY,
        props.getProperty("user.dir") + fileSep + defaultDbDir));

    // create the db and the logs directories
    dbDirName = dbDir.getAbsolutePath();
    props.put(ORBConstants.DB_DIR_PROPERTY, dbDirName);
    if (!dbDir.exists()) {
        dbDir.mkdir();
        dirCreated = true;
    }

    File logDir = new File (dbDir, ORBConstants.SERVER_LOG_DIR ) ;
    if (!logDir.exists()) logDir.mkdir();

    return dirCreated;
}
 
Example 2
Source File: ORBD.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Ensure that the Db directory exists. If not, create the Db
 * and the log directory and return true. Otherwise return false.
 */
protected boolean createSystemDirs(String defaultDbDir)
{
    boolean dirCreated = false;
    Properties props = System.getProperties();
    String fileSep = props.getProperty("file.separator");

    // determine the ORB db directory
    dbDir = new File (props.getProperty( ORBConstants.DB_DIR_PROPERTY,
        props.getProperty("user.dir") + fileSep + defaultDbDir));

    // create the db and the logs directories
    dbDirName = dbDir.getAbsolutePath();
    props.put(ORBConstants.DB_DIR_PROPERTY, dbDirName);
    if (!dbDir.exists()) {
        dbDir.mkdir();
        dirCreated = true;
    }

    File logDir = new File (dbDir, ORBConstants.SERVER_LOG_DIR ) ;
    if (!logDir.exists()) logDir.mkdir();

    return dirCreated;
}
 
Example 3
Source File: ORBD.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Ensure that the Db directory exists. If not, create the Db
 * and the log directory and return true. Otherwise return false.
 */
protected boolean createSystemDirs(String defaultDbDir)
{
    boolean dirCreated = false;
    Properties props = System.getProperties();
    String fileSep = props.getProperty("file.separator");

    // determine the ORB db directory
    dbDir = new File (props.getProperty( ORBConstants.DB_DIR_PROPERTY,
        props.getProperty("user.dir") + fileSep + defaultDbDir));

    // create the db and the logs directories
    dbDirName = dbDir.getAbsolutePath();
    props.put(ORBConstants.DB_DIR_PROPERTY, dbDirName);
    if (!dbDir.exists()) {
        dbDir.mkdir();
        dirCreated = true;
    }

    File logDir = new File (dbDir, ORBConstants.SERVER_LOG_DIR ) ;
    if (!logDir.exists()) logDir.mkdir();

    return dirCreated;
}
 
Example 4
Source File: ORBD.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Ensure that the Db directory exists. If not, create the Db
 * and the log directory and return true. Otherwise return false.
 */
protected boolean createSystemDirs(String defaultDbDir)
{
    boolean dirCreated = false;
    Properties props = System.getProperties();
    String fileSep = props.getProperty("file.separator");

    // determine the ORB db directory
    dbDir = new File (props.getProperty( ORBConstants.DB_DIR_PROPERTY,
        props.getProperty("user.dir") + fileSep + defaultDbDir));

    // create the db and the logs directories
    dbDirName = dbDir.getAbsolutePath();
    props.put(ORBConstants.DB_DIR_PROPERTY, dbDirName);
    if (!dbDir.exists()) {
        dbDir.mkdir();
        dirCreated = true;
    }

    File logDir = new File (dbDir, ORBConstants.SERVER_LOG_DIR ) ;
    if (!logDir.exists()) logDir.mkdir();

    return dirCreated;
}
 
Example 5
Source File: ORBD.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Ensure that the Db directory exists. If not, create the Db
 * and the log directory and return true. Otherwise return false.
 */
protected boolean createSystemDirs(String defaultDbDir)
{
    boolean dirCreated = false;
    Properties props = System.getProperties();
    String fileSep = props.getProperty("file.separator");

    // determine the ORB db directory
    dbDir = new File (props.getProperty( ORBConstants.DB_DIR_PROPERTY,
        props.getProperty("user.dir") + fileSep + defaultDbDir));

    // create the db and the logs directories
    dbDirName = dbDir.getAbsolutePath();
    props.put(ORBConstants.DB_DIR_PROPERTY, dbDirName);
    if (!dbDir.exists()) {
        dbDir.mkdir();
        dirCreated = true;
    }

    File logDir = new File (dbDir, ORBConstants.SERVER_LOG_DIR ) ;
    if (!logDir.exists()) logDir.mkdir();

    return dirCreated;
}
 
Example 6
Source File: ORBD.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Ensure that the Db directory exists. If not, create the Db
 * and the log directory and return true. Otherwise return false.
 */
protected boolean createSystemDirs(String defaultDbDir)
{
    boolean dirCreated = false;
    Properties props = System.getProperties();
    String fileSep = props.getProperty("file.separator");

    // determine the ORB db directory
    dbDir = new File (props.getProperty( ORBConstants.DB_DIR_PROPERTY,
        props.getProperty("user.dir") + fileSep + defaultDbDir));

    // create the db and the logs directories
    dbDirName = dbDir.getAbsolutePath();
    props.put(ORBConstants.DB_DIR_PROPERTY, dbDirName);
    if (!dbDir.exists()) {
        dbDir.mkdir();
        dirCreated = true;
    }

    File logDir = new File (dbDir, ORBConstants.SERVER_LOG_DIR ) ;
    if (!logDir.exists()) logDir.mkdir();

    return dirCreated;
}
 
Example 7
Source File: ORBD.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Ensure that the Db directory exists. If not, create the Db
 * and the log directory and return true. Otherwise return false.
 */
protected boolean createSystemDirs(String defaultDbDir)
{
    boolean dirCreated = false;
    Properties props = System.getProperties();
    String fileSep = props.getProperty("file.separator");

    // determine the ORB db directory
    dbDir = new File (props.getProperty( ORBConstants.DB_DIR_PROPERTY,
        props.getProperty("user.dir") + fileSep + defaultDbDir));

    // create the db and the logs directories
    dbDirName = dbDir.getAbsolutePath();
    props.put(ORBConstants.DB_DIR_PROPERTY, dbDirName);
    if (!dbDir.exists()) {
        dbDir.mkdir();
        dirCreated = true;
    }

    File logDir = new File (dbDir, ORBConstants.SERVER_LOG_DIR ) ;
    if (!logDir.exists()) logDir.mkdir();

    return dirCreated;
}
 
Example 8
Source File: ORBD.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * Ensure that the Db directory exists. If not, create the Db
 * and the log directory and return true. Otherwise return false.
 */
protected boolean createSystemDirs(String defaultDbDir)
{
    boolean dirCreated = false;
    Properties props = System.getProperties();
    String fileSep = props.getProperty("file.separator");

    // determine the ORB db directory
    dbDir = new File (props.getProperty( ORBConstants.DB_DIR_PROPERTY,
        props.getProperty("user.dir") + fileSep + defaultDbDir));

    // create the db and the logs directories
    dbDirName = dbDir.getAbsolutePath();
    props.put(ORBConstants.DB_DIR_PROPERTY, dbDirName);
    if (!dbDir.exists()) {
        dbDir.mkdir();
        dirCreated = true;
    }

    File logDir = new File (dbDir, ORBConstants.SERVER_LOG_DIR ) ;
    if (!logDir.exists()) logDir.mkdir();

    return dirCreated;
}
 
Example 9
Source File: ORBD.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Ensure that the Db directory exists. If not, create the Db
 * and the log directory and return true. Otherwise return false.
 */
protected boolean createSystemDirs(String defaultDbDir)
{
    boolean dirCreated = false;
    Properties props = System.getProperties();
    String fileSep = props.getProperty("file.separator");

    // determine the ORB db directory
    dbDir = new File (props.getProperty( ORBConstants.DB_DIR_PROPERTY,
        props.getProperty("user.dir") + fileSep + defaultDbDir));

    // create the db and the logs directories
    dbDirName = dbDir.getAbsolutePath();
    props.put(ORBConstants.DB_DIR_PROPERTY, dbDirName);
    if (!dbDir.exists()) {
        dbDir.mkdir();
        dirCreated = true;
    }

    File logDir = new File (dbDir, ORBConstants.SERVER_LOG_DIR ) ;
    if (!logDir.exists()) logDir.mkdir();

    return dirCreated;
}
 
Example 10
Source File: ORBD.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Ensure that the Db directory exists. If not, create the Db
 * and the log directory and return true. Otherwise return false.
 */
protected boolean createSystemDirs(String defaultDbDir)
{
    boolean dirCreated = false;
    Properties props = System.getProperties();
    String fileSep = props.getProperty("file.separator");

    // determine the ORB db directory
    dbDir = new File (props.getProperty( ORBConstants.DB_DIR_PROPERTY,
        props.getProperty("user.dir") + fileSep + defaultDbDir));

    // create the db and the logs directories
    dbDirName = dbDir.getAbsolutePath();
    props.put(ORBConstants.DB_DIR_PROPERTY, dbDirName);
    if (!dbDir.exists()) {
        dbDir.mkdir();
        dirCreated = true;
    }

    File logDir = new File (dbDir, ORBConstants.SERVER_LOG_DIR ) ;
    if (!logDir.exists()) logDir.mkdir();

    return dirCreated;
}
 
Example 11
Source File: ServerMain.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private void redirectIOStreams()
{
    // redirect out and err streams
    try {
        String logDirName =
            System.getProperty( ORBConstants.DB_DIR_PROPERTY ) +
            System.getProperty("file.separator") +
            ORBConstants.SERVER_LOG_DIR +
            System.getProperty("file.separator");

        File logDir = new File(logDirName);
        String server = System.getProperty(
            ORBConstants.SERVER_ID_PROPERTY ) ;

        FileOutputStream foutStream =
            new FileOutputStream(logDirName + server+".out", true);
        FileOutputStream ferrStream =
            new FileOutputStream(logDirName + server+".err", true);

        PrintStream pSout = new PrintStream(foutStream, true);
        PrintStream pSerr = new PrintStream(ferrStream, true);

        System.setOut(pSout);
        System.setErr(pSerr);

        logInformation( "Server started" ) ;

    } catch (Exception ex) {}
}
 
Example 12
Source File: ServerMain.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
private void redirectIOStreams()
{
    // redirect out and err streams
    try {
        String logDirName =
            System.getProperty( ORBConstants.DB_DIR_PROPERTY ) +
            System.getProperty("file.separator") +
            ORBConstants.SERVER_LOG_DIR +
            System.getProperty("file.separator");

        File logDir = new File(logDirName);
        String server = System.getProperty(
            ORBConstants.SERVER_ID_PROPERTY ) ;

        FileOutputStream foutStream =
            new FileOutputStream(logDirName + server+".out", true);
        FileOutputStream ferrStream =
            new FileOutputStream(logDirName + server+".err", true);

        PrintStream pSout = new PrintStream(foutStream, true);
        PrintStream pSerr = new PrintStream(ferrStream, true);

        System.setOut(pSout);
        System.setErr(pSerr);

        logInformation( "Server started" ) ;

    } catch (Exception ex) {}
}
 
Example 13
Source File: ServerMain.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private void redirectIOStreams()
{
    // redirect out and err streams
    try {
        String logDirName =
            System.getProperty( ORBConstants.DB_DIR_PROPERTY ) +
            System.getProperty("file.separator") +
            ORBConstants.SERVER_LOG_DIR +
            System.getProperty("file.separator");

        File logDir = new File(logDirName);
        String server = System.getProperty(
            ORBConstants.SERVER_ID_PROPERTY ) ;

        FileOutputStream foutStream =
            new FileOutputStream(logDirName + server+".out", true);
        FileOutputStream ferrStream =
            new FileOutputStream(logDirName + server+".err", true);

        PrintStream pSout = new PrintStream(foutStream, true);
        PrintStream pSerr = new PrintStream(ferrStream, true);

        System.setOut(pSout);
        System.setErr(pSerr);

        logInformation( "Server started" ) ;

    } catch (Exception ex) {}
}
 
Example 14
Source File: ServerMain.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void redirectIOStreams()
{
    // redirect out and err streams
    try {
        String logDirName =
            System.getProperty( ORBConstants.DB_DIR_PROPERTY ) +
            System.getProperty("file.separator") +
            ORBConstants.SERVER_LOG_DIR +
            System.getProperty("file.separator");

        File logDir = new File(logDirName);
        String server = System.getProperty(
            ORBConstants.SERVER_ID_PROPERTY ) ;

        FileOutputStream foutStream =
            new FileOutputStream(logDirName + server+".out", true);
        FileOutputStream ferrStream =
            new FileOutputStream(logDirName + server+".err", true);

        PrintStream pSout = new PrintStream(foutStream, true);
        PrintStream pSerr = new PrintStream(ferrStream, true);

        System.setOut(pSout);
        System.setErr(pSerr);

        logInformation( "Server started" ) ;

    } catch (Exception ex) {}
}
 
Example 15
Source File: ServerMain.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private void redirectIOStreams()
{
    // redirect out and err streams
    try {
        String logDirName =
            System.getProperty( ORBConstants.DB_DIR_PROPERTY ) +
            System.getProperty("file.separator") +
            ORBConstants.SERVER_LOG_DIR +
            System.getProperty("file.separator");

        File logDir = new File(logDirName);
        String server = System.getProperty(
            ORBConstants.SERVER_ID_PROPERTY ) ;

        FileOutputStream foutStream =
            new FileOutputStream(logDirName + server+".out", true);
        FileOutputStream ferrStream =
            new FileOutputStream(logDirName + server+".err", true);

        PrintStream pSout = new PrintStream(foutStream, true);
        PrintStream pSerr = new PrintStream(ferrStream, true);

        System.setOut(pSout);
        System.setErr(pSerr);

        logInformation( "Server started" ) ;

    } catch (Exception ex) {}
}
 
Example 16
Source File: ServerMain.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private void redirectIOStreams()
{
    // redirect out and err streams
    try {
        String logDirName =
            System.getProperty( ORBConstants.DB_DIR_PROPERTY ) +
            System.getProperty("file.separator") +
            ORBConstants.SERVER_LOG_DIR +
            System.getProperty("file.separator");

        File logDir = new File(logDirName);
        String server = System.getProperty(
            ORBConstants.SERVER_ID_PROPERTY ) ;

        FileOutputStream foutStream =
            new FileOutputStream(logDirName + server+".out", true);
        FileOutputStream ferrStream =
            new FileOutputStream(logDirName + server+".err", true);

        PrintStream pSout = new PrintStream(foutStream, true);
        PrintStream pSerr = new PrintStream(ferrStream, true);

        System.setOut(pSout);
        System.setErr(pSerr);

        logInformation( "Server started" ) ;

    } catch (Exception ex) {}
}
 
Example 17
Source File: ServerMain.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private void redirectIOStreams()
{
    // redirect out and err streams
    try {
        String logDirName =
            System.getProperty( ORBConstants.DB_DIR_PROPERTY ) +
            System.getProperty("file.separator") +
            ORBConstants.SERVER_LOG_DIR +
            System.getProperty("file.separator");

        File logDir = new File(logDirName);
        String server = System.getProperty(
            ORBConstants.SERVER_ID_PROPERTY ) ;

        FileOutputStream foutStream =
            new FileOutputStream(logDirName + server+".out", true);
        FileOutputStream ferrStream =
            new FileOutputStream(logDirName + server+".err", true);

        PrintStream pSout = new PrintStream(foutStream, true);
        PrintStream pSerr = new PrintStream(ferrStream, true);

        System.setOut(pSout);
        System.setErr(pSerr);

        logInformation( "Server started" ) ;

    } catch (Exception ex) {}
}
 
Example 18
Source File: ServerMain.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private void redirectIOStreams()
{
    // redirect out and err streams
    try {
        String logDirName =
            System.getProperty( ORBConstants.DB_DIR_PROPERTY ) +
            System.getProperty("file.separator") +
            ORBConstants.SERVER_LOG_DIR +
            System.getProperty("file.separator");

        File logDir = new File(logDirName);
        String server = System.getProperty(
            ORBConstants.SERVER_ID_PROPERTY ) ;

        FileOutputStream foutStream =
            new FileOutputStream(logDirName + server+".out", true);
        FileOutputStream ferrStream =
            new FileOutputStream(logDirName + server+".err", true);

        PrintStream pSout = new PrintStream(foutStream, true);
        PrintStream pSerr = new PrintStream(ferrStream, true);

        System.setOut(pSout);
        System.setErr(pSerr);

        logInformation( "Server started" ) ;

    } catch (Exception ex) {}
}
 
Example 19
Source File: ServerMain.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private void redirectIOStreams()
{
    // redirect out and err streams
    try {
        String logDirName =
            System.getProperty( ORBConstants.DB_DIR_PROPERTY ) +
            System.getProperty("file.separator") +
            ORBConstants.SERVER_LOG_DIR +
            System.getProperty("file.separator");

        File logDir = new File(logDirName);
        String server = System.getProperty(
            ORBConstants.SERVER_ID_PROPERTY ) ;

        FileOutputStream foutStream =
            new FileOutputStream(logDirName + server+".out", true);
        FileOutputStream ferrStream =
            new FileOutputStream(logDirName + server+".err", true);

        PrintStream pSout = new PrintStream(foutStream, true);
        PrintStream pSerr = new PrintStream(ferrStream, true);

        System.setOut(pSout);
        System.setErr(pSerr);

        logInformation( "Server started" ) ;

    } catch (Exception ex) {}
}
 
Example 20
Source File: ServerMain.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
private void redirectIOStreams()
{
    // redirect out and err streams
    try {
        String logDirName =
            System.getProperty( ORBConstants.DB_DIR_PROPERTY ) +
            System.getProperty("file.separator") +
            ORBConstants.SERVER_LOG_DIR +
            System.getProperty("file.separator");

        File logDir = new File(logDirName);
        String server = System.getProperty(
            ORBConstants.SERVER_ID_PROPERTY ) ;

        FileOutputStream foutStream =
            new FileOutputStream(logDirName + server+".out", true);
        FileOutputStream ferrStream =
            new FileOutputStream(logDirName + server+".err", true);

        PrintStream pSout = new PrintStream(foutStream, true);
        PrintStream pSerr = new PrintStream(ferrStream, true);

        System.setOut(pSout);
        System.setErr(pSerr);

        logInformation( "Server started" ) ;

    } catch (Exception ex) {}
}