Package org.apache.derby.drda

Examples of org.apache.derby.drda.NetworkServerControl.trace()


        // assume we don't have permission to write to root.
        nsctrl.setTraceDirectory("/");
       
        // attempt to turn on tracing to location where we don't have permisson
        try {
            nsctrl.trace(true);
            fail("Should have gotten an exception turning on tracing");
        } catch (Exception e) {
            // expected exception
        }
        // make sure we can still ping
View Full Code Here


    {
        NetworkServerControl nsctrl = NetworkServerTestSetup.getNetworkServerControl();
        String derbySystemHome = getSystemProperty("derby.system.home");
        nsctrl.setTraceDirectory(derbySystemHome);
      
        nsctrl.trace(true);
        nsctrl.ping();
        assertTrue(fileExists(derbySystemHome+"/Server3.trace"));
        nsctrl.trace(false);
       
        // now try on a directory where we don't have permission
View Full Code Here

        nsctrl.setTraceDirectory(derbySystemHome);
      
        nsctrl.trace(true);
        nsctrl.ping();
        assertTrue(fileExists(derbySystemHome+"/Server3.trace"));
        nsctrl.trace(false);
       
        // now try on a directory where we don't have permission
        // this won't actually cause a failure until we turn on tracing.
        // assume we don't have permission to write to root.
        nsctrl.setTraceDirectory("/");
View Full Code Here

        // assume we don't have permission to write to root.
        nsctrl.setTraceDirectory("/");
       
        // attempt to turn on tracing to location where we don't have permisson
        try {
            nsctrl.trace(true);
            fail("Should have gotten an exception turning on tracing");
        } catch (Exception e) {
            // expected exception
        }
        // make sure we can still ping
View Full Code Here

        expectedValues.setProperty("derby.drda.startNetworkServer","false");
        expectedValues.setProperty("derby.drda.host","127.0.0.1");
        expectedValues.setProperty("derby.drda.traceAll","false")
        getConnection().setAutoCommit(false);
        NetworkServerControl nsctrl = NetworkServerTestSetup.getNetworkServerControl();
        nsctrl.trace(4,true);
        nsctrl.logConnections(true);
        p = NetworkServerTestSetup.getNetworkServerControl().getCurrentProperties();
        Enumeration expectedProps = expectedValues.propertyNames();
        for ( expectedProps = expectedValues.propertyNames(); expectedProps.hasMoreElements();) {
            String propName = (String) expectedProps.nextElement();
View Full Code Here

     */
    public void testPropertiesTraceOn() throws Exception {
        Properties p = null;

        NetworkServerControl nsctrl = NetworkServerTestSetup.getNetworkServerControl();
        nsctrl.trace(true);
        String derbySystemHome = getSystemProperty("derby.system.home");
        nsctrl.setTraceDirectory(derbySystemHome);
        Properties expectedValues = new Properties();
        expectedValues.setProperty("derby.drda.traceDirectory",derbySystemHome);
        expectedValues.setProperty("derby.drda.maxThreads","0");
View Full Code Here

        expectedValues.setProperty("derby.drda.startNetworkServer","false");
        expectedValues.setProperty("derby.drda.host","127.0.0.1");
        expectedValues.setProperty("derby.drda.traceAll","false")
        getConnection().setAutoCommit(false);
        NetworkServerControl nsctrl = NetworkServerTestSetup.getNetworkServerControl();
        nsctrl.trace(4,true);
        nsctrl.logConnections(true);
        p = NetworkServerTestSetup.getNetworkServerControl().getCurrentProperties();
        Enumeration expectedProps = expectedValues.propertyNames();
        while (expectedProps.hasMoreElements()) {
            String propName = (String) expectedProps.nextElement();
View Full Code Here

     */
    public void test_03_propertiesTraceOn() throws Exception {
        Properties p = null;

        NetworkServerControl nsctrl = NetworkServerTestSetup.getNetworkServerControl();
        nsctrl.trace(true);
        String derbySystemHome = getSystemProperty("derby.system.home");
        nsctrl.setTraceDirectory(derbySystemHome);
        Properties expectedValues = new Properties();
        expectedValues.setProperty("derby.drda.traceDirectory",derbySystemHome);
        expectedValues.setProperty("derby.drda.maxThreads","0");
View Full Code Here

    {
        NetworkServerControl nsctrl = NetworkServerTestSetup.getNetworkServerControl();
        String derbySystemHome = getSystemProperty("derby.system.home");
        nsctrl.setTraceDirectory(derbySystemHome);
      
        nsctrl.trace(true);
        nsctrl.ping();
        assertTrue(fileExists(derbySystemHome+"/Server3.trace"));
        nsctrl.trace(false);
       
        // now try on a directory where we don't have permission
View Full Code Here

        nsctrl.setTraceDirectory(derbySystemHome);
      
        nsctrl.trace(true);
        nsctrl.ping();
        assertTrue(fileExists(derbySystemHome+"/Server3.trace"));
        nsctrl.trace(false);
       
        // now try on a directory where we don't have permission
        // this won't actually cause a failure until we turn on tracing.
        // assume we don't have permission to write to root.
        nsctrl.setTraceDirectory("/");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.