Package org.apache.derby.drda

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


    {
        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

    public void doTestCliServerIsRestrictive() throws Exception {
        NetworkServerControl nsctrl =
                NetworkServerTestSetup.getNetworkServerControl();
        String traceDir = home + "/" + dbName + "_tracefiles_restr";
        nsctrl.setTraceDirectory(traceDir);
        nsctrl.trace(true);
        nsctrl.ping();
        nsctrl.trace(false);

        File traceDirF = new File(traceDir);
View Full Code Here

                NetworkServerTestSetup.getNetworkServerControl();
        String traceDir = home + "/" + dbName + "_tracefiles_restr";
        nsctrl.setTraceDirectory(traceDir);
        nsctrl.trace(true);
        nsctrl.ping();
        nsctrl.trace(false);

        File traceDirF = new File(traceDir);

        checkAccessToOwner(
            traceDirF, true, POSITIVE);
View Full Code Here

    public void doTestNonCliServerIsLax() throws Exception {
        NetworkServerControl nsctrl =
                NetworkServerTestSetup.getNetworkServerControl();
        String traceDir = home + "/" + dbName + "_tracefiles_lax";
        nsctrl.setTraceDirectory(traceDir);
        nsctrl.trace(true);
        nsctrl.ping();
        nsctrl.trace(false);

        File traceDirF = new File(traceDir);
View Full Code Here

                NetworkServerTestSetup.getNetworkServerControl();
        String traceDir = home + "/" + dbName + "_tracefiles_lax";
        nsctrl.setTraceDirectory(traceDir);
        nsctrl.trace(true);
        nsctrl.ping();
        nsctrl.trace(false);

        File traceDirF = new File(traceDir);

        checkAccessToOwner(
            traceDirF, true, NEGATIVE);
View Full Code Here

      startConnection();
      // wait for connection
      joinwait();
      //server.setLogWriter(System.out);
      // set tracing on for the waiting connection
      server.trace(3, true);
      // get properties
      System.out.println("Properties with tracing on");
      p = server.getCurrentProperties();
      p.list(System.out);
      // set tracing on for all connections
View Full Code Here

      // get properties
      System.out.println("Properties with tracing on");
      p = server.getCurrentProperties();
      p.list(System.out);
      // set tracing on for all connections
      server.trace(true);
      // get properties
      System.out.println("Properties with tracing on");
      p = server.getCurrentProperties();
      p.list(System.out);
      joinsignal();
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

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.