当前位置: 首页>>代码示例>>Java>>正文


Java Server.setLogWriter方法代码示例

本文整理汇总了Java中org.hsqldb.Server.setLogWriter方法的典型用法代码示例。如果您正苦于以下问题:Java Server.setLogWriter方法的具体用法?Java Server.setLogWriter怎么用?Java Server.setLogWriter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.hsqldb.Server的用法示例。


在下文中一共展示了Server.setLogWriter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUp

import org.hsqldb.Server; //导入方法依赖的package包/类
protected void setUp() {

        if (isNetwork) {
            serverProps = "database.0=mem:test";
            url         = "jdbc:hsqldb:hsql://localhost";
            server      = new Server();

            server.putPropertiesFromString(serverProps);
            server.setLogWriter(null);
            server.setErrWriter(null);
            server.start();
        } else {
            url = "jdbc:hsqldb:file:test";
        }

        try {
            Class.forName("org.hsqldb.jdbcDriver");
        } catch (Exception e) {
            e.printStackTrace();
            System.out.println(this + ".setUp() error: " + e.getMessage());
        }
    }
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:23,代码来源:TestBase.java

示例2: setUp

import org.hsqldb.Server; //导入方法依赖的package包/类
protected void setUp() {

        server = new Server();

        server.putPropertiesFromString(serverProps);
        server.setLogWriter(null);
        server.setErrWriter(null);
        server.start();

        try {
            Class.forName("org.hsqldb.jdbcDriver");
        } catch (Exception e) {
            e.printStackTrace();
            System.out.println(this + ".setUp() error: " + e.getMessage());
        }
    }
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:17,代码来源:TestBugBase.java

示例3: setUp

import org.hsqldb.Server; //导入方法依赖的package包/类
protected void setUp() {

        if (isNetwork) {
            if (url == null) {
                url = "jdbc:hsqldb:hsql://localhost/test";
            }

            server = new Server();

            server.setDatabaseName(0, "test");
            server.setDatabasePath(0, "mem:test;sql.enforce_strict_size=true");
            server.setLogWriter(null);
            server.setErrWriter(null);
            server.start();
        } else {
            if (url == null) {
                url = "jdbc:hsqldb:file:test;sql.enforce_strict_size=true";
            }
        }
    }
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:21,代码来源:TestBase.java

示例4: databaseServer

import org.hsqldb.Server; //导入方法依赖的package包/类
@Bean(destroyMethod = "stop")
public Server databaseServer() throws SQLException, IOException {
	DriverManager.registerDriver(new org.hsqldb.jdbcDriver());
	int hsqldbPort = SocketUtils.findAvailableTcpPort(10000);
	System.setProperty("db.server.port", Integer.toString(hsqldbPort));
	logger.info("Database is using port: " + Integer.toString(hsqldbPort));
	HsqlProperties configProps = new HsqlProperties();
	configProps.setProperty("server.port", hsqldbPort);
	configProps.setProperty("server.database.0", "file:target/db/test");
	configProps.setProperty("server.dbname.0", "test");
	Server server = new org.hsqldb.Server();
	server.setLogWriter(null);
	server.setErrWriter(null);
	server.setRestartOnShutdown(false);
	server.setNoSystemExit(true);
	server.setProperties(configProps);
	server.start();
	return server;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-task-modules,代码行数:20,代码来源:SqoopToolDatabaseConfiguration.java

示例5: Db

import org.hsqldb.Server; //导入方法依赖的package包/类
/**
 * Constructor to specify the directory of the database.
 * 
 * @param dbDir
 *            the directory of the database
 */
public Db(final File dbDir) {
	tmpFolder = dbDir;
	hSqlDb = new Server();
	dbs = new HashMap<String, File>();

	// disable any logging
	hSqlDb.setLogWriter(null);
	hSqlDb.setErrWriter(null);
	hSqlDb.setTrace(false);
	hSqlDb.setSilent(true);

	// define the address
	hSqlDb.setAddress("localhost");
	hSqlDb.setPort(6666);
}
 
开发者ID:pmeisen,项目名称:dis-timeintervaldataanalyzer,代码行数:22,代码来源:Db.java

示例6: HSQLDBServer

import org.hsqldb.Server; //导入方法依赖的package包/类
public HSQLDBServer() {
    try
    {
        hsqlServer = new Server();
        hsqlServer.setLogWriter(null);
        hsqlServer.setSilent(true);

        hsqlServer.setDatabaseName(0, DB_NAME);
        hsqlServer.setDatabasePath(0, DB_PATH);

        hsqlServer.start();
    }
    catch(Exception e)
    {
        logger.error("Failed to startup HSQLDB!", e);
    }
}
 
开发者ID:apolaskey,项目名称:Falnir,代码行数:18,代码来源:HSQLDBServer.java

示例7: setUp

import org.hsqldb.Server; //导入方法依赖的package包/类
protected void setUp() {

        user     = "sa";
        password = "";
        stmt     = null;
        conn1    = null;
        conn2    = null;

        server   = new Server();
        // server = new WebServer();

        server.putPropertiesFromString(serverProps);
        server.setLogWriter(null);
        server.start();

        try {
            jdbcDataSource dataSource = new jdbcDataSource();

            dataSource.setDatabase(url);

            conn1 = dataSource.getConnection(user, password);
            conn2 = dataSource.getConnection(user, password);
            stmt  = conn1.createStatement();
        } catch (Exception e) {

            //e.printStackTrace();
            System.out.println(this + ".setUp() error: " + e.getMessage());
        }
    }
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:30,代码来源:TestJDBCSavepoints.java

示例8: setUp

import org.hsqldb.Server; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
    reactor = new NioReactor();

    crusher = TcpCrusherBuilder.builder()
            .withReactor(reactor)
            .withBindAddress("127.0.0.1", CRUSHER_PORT)
            .withConnectAddress("127.0.0.1", DB_PORT)
            .buildAndOpen();

    hsqlServer = new Server();
    hsqlServer.setAddress("127.0.0.1");
    hsqlServer.setPort(DB_PORT);
    hsqlServer.setDaemon(true);
    hsqlServer.setErrWriter(new PrintWriter(System.err));
    hsqlServer.setLogWriter(new PrintWriter(System.out));
    hsqlServer.setNoSystemExit(true);
    hsqlServer.setDatabasePath(0, "mem:testdb");
    hsqlServer.setDatabaseName(0, "testdb");
    hsqlServer.start();

    Class.forName("org.hsqldb.jdbc.JDBCDriver");

    BoneCPConfig config = new BoneCPConfig();
    config.setJdbcUrl(String.format("jdbc:hsqldb:hsql://127.0.0.1:%d/testdb", CRUSHER_PORT));
    config.setUsername("sa");
    config.setPassword("");
    config.setInitSQL(SQL_CHECK);
    config.setConnectionTestStatement(SQL_CHECK);
    config.setAcquireIncrement(1);
    config.setAcquireRetryAttempts(1);
    config.setAcquireRetryDelayInMs(1000);
    config.setConnectionTimeoutInMs(1000);
    config.setQueryExecuteTimeLimitInMs(1000);
    config.setDefaultAutoCommit(false);
    config.setDefaultReadOnly(true);
    config.setDefaultTransactionIsolation("NONE");
    config.setPartitionCount(1);
    config.setMinConnectionsPerPartition(1);
    config.setMaxConnectionsPerPartition(1);
    config.setLazyInit(true);
    config.setDetectUnclosedStatements(true);

    connectionPool = new BoneCP(config);
}
 
开发者ID:NetCrusherOrg,项目名称:netcrusher-java,代码行数:46,代码来源:DbTest.java

示例9: setUp

import org.hsqldb.Server; //导入方法依赖的package包/类
void setUp() throws SQLException {
  if (isNetwork) {
    if (url == null) {
      url = "jdbc:hsqldb:hsql://localhost/test";
    }

    server = new Server();

    server.setDatabaseName(0, "test");
    server.setDatabasePath(0, "mem:test;sql.enforce_strict_size=true");
    server.setLogWriter(null);
    server.setErrWriter(null);
    server.setTrace(false);
    server.setSilent(true);
    server.start();
  } else {
    if (url == null) {
      url = "jdbc:hsqldb:file:test;sql.enforce_strict_size=true";
    }
  }

  try {
    Class.forName(DRIVER_CLASS);
  } catch (Exception e) {
    e.printStackTrace();
    System.out.println(this + ".setUp() error: " + e.getMessage());
  }
  Thread.yield();
  
  createTables();
}
 
开发者ID:cscfa,项目名称:bartleby,代码行数:32,代码来源:DBAppenderHSQLTestFixture.java

示例10: beforeClass

import org.hsqldb.Server; //导入方法依赖的package包/类
@BeforeClass
  public static void beforeClass() {
  	hsqlServer = new Server();
hsqlServer.setLogWriter(null);
hsqlServer.setSilent(true);
hsqlServer.setDatabaseName(0, "iva");
hsqlServer.setDatabasePath(0, "file:ivadb");
hsqlServer.start();
  }
 
开发者ID:OpenSoftwareSolutions,项目名称:bonita-connector-pdfreporter,代码行数:10,代码来源:CreatePDFReportTest.java

示例11: startUp

import org.hsqldb.Server; //导入方法依赖的package包/类
@Override
protected void startUp() throws Exception {
    server = new Server();
    server.setProperties(hsqlProperties);
    server.setErrWriter(null);
    server.setLogWriter(null);
    server.start();
}
 
开发者ID:ow2-proactive,项目名称:scheduling,代码行数:9,代码来源:HsqldbServer.java

示例12: initDatabase

import org.hsqldb.Server; //导入方法依赖的package包/类
@BeforeClass
public static void initDatabase() throws IOException, AclFormatException {
    final HsqlProperties properties = new HsqlProperties();
    properties.setProperty("server.database.0", "mem:test");
    // properties.setProperty("server.database.0","file:./target/testdb");
    // properties.setProperty("server.dbname.0", "test");
    // properties.setProperty("server.port", "9001");

    server = new Server();
    server.setProperties(properties);
    server.setLogWriter(new PrintWriter(System.out));
    server.setErrWriter(new PrintWriter(System.out));
    server.start();
}
 
开发者ID:unkascrack,项目名称:lucene-jdbcdirectory,代码行数:15,代码来源:AbstractJdbcDirectoryITest.java

示例13: init

import org.hsqldb.Server; //导入方法依赖的package包/类
/**
 * Initialize the server
 */
@SuppressWarnings("rawtypes")
public static void init() {
	if (initialized)
		return;
	org.apache.commons.logging.LogFactory.getLog(HSQLDBserver.class).info(
			"Creating data base ...");

	server = new Server();
	server.setDatabaseName(0, "LMS_DOC");
	server.setDatabasePath(0, "mem:LMS_DOC;sql.enforce_strict_size=true");

	server.setLogWriter(null);
	server.setErrWriter(null);
	server.setSilent(true);
	server.start();

	initialized = true;
	try {
		Class.forName("org.hsqldb.jdbcDriver");

		PrintStream out = new PrintStream(new ByteArrayOutputStream());
		Connection conn = DriverManager.getConnection(
				"jdbc:hsqldb:hsql://localhost/LMS_DOC", "sa", "");
		SqlFile file = new SqlFile(new File(FileIO.findFile(
				"main/foundation/docDB/LMS_DOC.sql").getFile()), false,
				new HashMap());
		file.execute(conn, out, out, true);

		org.apache.commons.logging.LogFactory.getLog(HSQLDBserver.class)
				.info("Data base generation finished");

	} catch (Exception e) {
		org.apache.commons.logging.LogFactory.getLog(HSQLDBserver.class)
				.error(e, e);
	}

}
 
开发者ID:Tell1,项目名称:LMSRecommender,代码行数:41,代码来源:HSQLDBserver.java

示例14: init

import org.hsqldb.Server; //导入方法依赖的package包/类
/**
    * Initialize the server
    */
   @SuppressWarnings("rawtypes")
public static void init()
   {
if (initialized)
    return;
       org.apache.commons.logging.LogFactory.getLog(ProfileHSQLDBserver.class).info("Creating data base ...");

server = new Server();
server.setDatabaseName(0, "LMS_REC");
server.setDatabasePath(0, "mem:LMS_REC;sql.enforce_strict_size=true");

server.setLogWriter(null);
server.setErrWriter(null);
server.setSilent(true);
server.start();

initialized = true;
try
{
    Class.forName("org.hsqldb.jdbcDriver");

    PrintStream out = new PrintStream(new ByteArrayOutputStream());
    Connection conn = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost/LMS_REC", "sa", "");
    SqlFile file = new SqlFile(new
    File(FileIO.findFile("main/foundation/profileDB/LMS_REC.sql").getFile()),false,new HashMap());
    file.execute(conn,out,out, true);
    
    org.apache.commons.logging.LogFactory.getLog(ProfileHSQLDBserver.class).info("Data base generation finished");
    
} catch (Exception e)
{
    org.apache.commons.logging.LogFactory.getLog(ProfileHSQLDBserver.class).error(e);
}

   }
 
开发者ID:Tell1,项目名称:LMSRecommender,代码行数:39,代码来源:ProfileHSQLDBserver.java

示例15: FusionDB_start

import org.hsqldb.Server; //导入方法依赖的package包/类
public void FusionDB_start(String database_path, String fusion_db)
{
	server = new Server();
	server.setLogWriter(null);
	server.setSilent(true);
	server.setDatabasePath(0, "file:" + database_path);
	server.setDatabaseName(0, fusion_db);
	server.start();
}
 
开发者ID:RabadanLab,项目名称:Pegasus,代码行数:10,代码来源:QueryFusionDatabase.java


注:本文中的org.hsqldb.Server.setLogWriter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。