Hibernate how to  disable system.outs.....

Hi
I am using hibernate to conect to mySQL database, but I am getting a bunch of system.outs that slow down the process.
is there anyyway tor emove this system outs form there
I am suing netbeans and javax.persistence
example:
[TopLink Config]: 2007.10.16 03:56:38.125--ServerSession(1760304)--Connection(19157736)--Connected: jdbc:mysql://localhost:3306/eece419_colibri
User: root@localhost
Database: MySQL Version: 5.0.45-community-nt
Driver: MySQL-AB JDBC Driver Version: mysql-connector-java-3.1.14 ( $Date: 2006-10-18 17:40:15 +0200 (Wed, 18 Oct 2006) $, $Revision: 5888 $ )
[TopLink Config]: 2007.10.16 03:56:38.125--ServerSession(1760304)--Connection(29310343)--connecting(DatabaseLogin(
platform=>MySQL4Platform
user name=> "root"
datasource URL=> "jdbc:mysql://localhost:3306/eece419_colibri"
[TopLink Config]: 2007.10.16 03:56:38.125--ServerSession(1760304)--Connection(30472956)--Connected: jdbc:mysql://localhost:3306/eece419_colibri
User: root@localhost
Database: MySQL Version: 5.0.45-community-nt
Driver: MySQL-AB JDBC Driver Version: mysql-connector-java-3.1.14 ( $Date: 2006-10-18 17:40:15 +0200 (Wed, 18 Oct 2006) $, $Revision: 5888 $ )
[TopLink Config]: 2007.10.16 03:56:38.125--ServerSession(1760304)--Connection(17680053)--connecting(DatabaseLogin(
platform=>MySQL4Platform
user name=> "root"
datasource URL=> "jdbc:mysql://localhost:3306/eece419_colibri"
[TopLink Config]: 2007.10.16 03:56:38.140--ServerSession(1760304)--Connection(12122347)--Connected: jdbc:mysql://localhost:3306/eece419_colibri
User: root@localhost
Database: MySQL Version: 5.0.45-community-nt
Driver: MySQL-AB JDBC Driver Version: mysql-connector-java-3.1.14 ( $Date: 2006-10-18 17:40:15 +0200 (Wed, 18 Oct 2006) $, $Revision: 5888 $ )
[TopLink Config]: 2007.10.16 03:56:38.140--ServerSession(1760304)--Connection(31332340)--connecting(DatabaseLogin(
platform=>MySQL4Platform
user name=> "root"
datasource URL=> "jdbc:mysql://localhost:3306/eece419_colibri"
[TopLink Config]: 2007.10.16 03:56:38.140--ServerSession(1760304)--Connection(5218268)--Connected: jdbc:mysql://localhost:3306/eece419_colibri
User: root@localhost
Database: MySQL Version: 5.0.45-community-nt
Driver: MySQL-AB JDBC Driver Version: mysql-connector-java-3.1.14 ( $Date: 2006-10-18 17:40:15 +0200 (Wed, 18 Oct 2006) $, $Revision: 5888 $ )
[TopLink Config]: 2007.10.16 03:56:38.140--ServerSession(1760304)--Connection(25699763)--connecting(DatabaseLogin(
platform=>MySQL4Platform
user name=> "root"
datasource URL=> "jdbc:mysql://localhost:3306/eece419_colibri"
[TopLink Config]: 2007.10.16 03:56:38.156--ServerSession(1760304)--Connection(33539718)--Connected: jdbc:mysql://localhost:3306/eece419_colibri
thanks !!

First, read the documentation of Toplink how to configure their logger.
Second, it look like that you're creating a new session everytime on every query? That is very expensive. Your code logic might need a review.

Similar Messages

  • How to disable (grey-out) the ticks of a JSlider?

    Hi everyone,
    In my GUI, I have a JSlider that I want to be disabled (greyed out)
    because it should be only actived on my application next version.
    (It is important though to have it to preserve GUI appearence).
    Problem is that I was unable to greyout the ticks even though
    already managed to grey out the slider and the number labels.
    Right now, it is pretty uggly to have a partial disabled slider,
    because due to ticks not being disabled.
    Questions:
    1) Does anyone have an idea of how to do it?
    A small part of my code is shown below:
    JSlider dynSl = new JSlider();
    dynSl.setMajorTickSpacing(1);
    dynSl.setValue(0); //Default
    dynSl.setMaximum(7);
    dynSl.setMinimum(0);
    dynSl.setPaintLabels(true);
    dynSl.setPaintTicks(true);
    dynSl.setFont(new java.awt.Font("Dialog", 0, 9));
    dynSl.setSnapToTicks(true);
    dynSl.setEnabled(false);
    // small code just to put the numbers of the slider smaller
    Enumeration enum = dynSl.getLabelTable().elements();
    while (enum.hasMoreElements()) {
    JLabel elem = (JLabel)enum.nextElement();
    elem.setFont(new Font("Dialog",0,8));
    elem.setEnabled(false);
    2) If not possible, how do I change the colour of a JSlider (including
    the Ticks)?
    My idea is to change Slider's colour to the same grey colour one used
    to disable it, making at the end the slider look as if it was disabled.
    Thanks in advance,
    Jorge

    Hi again,
    Thanks for the help.
    I was trying to avoid not having the ticks at all but it seems to be
    the best choise because I could not solve the problem of greying out
    them.
    I did some more troubleshooting though and for my surprise, if I use
    the same code alone, i.e, a simple frame with just the slider it works
    fine. I even thought that it was related with having Windows LnF as
    opposed to Metal (Java) LnF, but that was not the problem.
    The only thing it comes to mind, is that there may be some problem by including the slider on a GridBagLayout !?!?!?
    Anyway,
    What has no simple solution, solved is! :-)
    Jorge

  • How to capture System.out, done by another program

    Hi All,
    My application runs other application in back. How can I capture system.out.println() written by another application & display via dialog box.
    Like :execl() or execv() function in C runtime library. Where every printf() message printed to passed buffer.
    Thank you,
    Avin Patel

    You can create an InputStream from a started process. Then read all the bytes from the inputstream and write them to an outputstream (like System.out)
    Process p = Runtime.getRuntime().exec(COMMAND);
    InputStream is = p.getErrorStream();   //Or another stream
    int[] buffer = new int[128];
    while((read = is.read(buffer)) != -1){
    System.write.out(buffer, 0, read);
    }

  • How to disable (grey out) button in report

    Hi,
    Can any one; pls help how to disable button (grey out) on some specific condition.
    I have a report of 2 pages; In first page it displays few records; once click on specific record control goes to next page 2; And here i have button (template based button); Once click on this it perform pl/sql procedure.
    My requirement is: The button should disable (should not hide) when moves from page 1 to page 2 based on some specific returned values in page 2.
    I have return code in button conditions (Condition type = PL/SQL Function Body Returning a Boolean)
    Sample code is:
    if :value1 = 'disable_test_value' then
    return false;
    else
    return true;
    end if;
    The above code is working fine with button completely disappers if the :value1 = 'disable_test_value' (which is suppossed to be as we gave return false).
    My question is: Is there any way; we can still show button (but button disabled or grey out; so that no action can perform on this button )? And also show some text message in other text field when button is disabled?
    Thanks!!
    UK

    I have an example: http://apex.oracle.com/pls/otn/f?p=27168:1 using theme #2. You need to use a theme that has a "grayed-out" alternate button template.
    To accomplish this I:
    1) Created one item named P1_VALUE1 to contain the condition as to whether the button should be enable ("enable_test_value") or disabled ("disable_test_value").
    2) Created an enable button with a "Button Style" of "Template Based Button" with "Button Template" value of "Button". I had the "Condition" type of "PL/SQL Function Body Returning a Boolean" to be:
    if :p1_value1 = 'disable_test_value' then
    return false;
    else
    return true;
    end if;I had the "URL Target" to be: javascript:alert('Performing function ...');
    3) Create a disabled button with "Button Style" of "Template Based Button" with "Button Template" value of "Button, Alternate 3". I had the "Condition" type of "PL/SQL Function Body Returning a Boolean" to be:
    if :p1_value1 != 'disable_test_value' then
    return false;
    else
    return true;
    end if;I had the "URL Target" to be: javascript:alert('Performing function ...');
    Mike

  • How to view System.out.print() messages for adapters in OIM 9.0.3

    I have created an adaptor for OIM from a java jar file. When that adaptor executes after some updates on tables it produces some execptions/error.
    I can not see the details of these exceptions as I do not know where is the standard output located when adapter is executed via OIM.
    Where cen I see output from my code lines that contain: System.out.println()?
    thanks

    I am not sure if logging is enabled as OIM was installed previously by another person - how can I check if it is enabled and how to use log4j in this case?
    OIM Design Console window shows no messages comming from my System.out.print() statements.
    /br
    Djeno

  • How to get System.out msg displayed in logs

    Running SJSWSEE6.1 SP5 on Solaris
    How do I get the System.out.println messages to display in the Web Server 6.1 error/access log??
    Thanks..

    Hi,
    In your server.xml, check that the properties 'logstderr' and 'logstdout' are set to 'true'. The messages will then appear in the errors log file.
    <LOG file="<path to errors file>" loglevel="info" logtoconsole="true"
    usesyslog="false" createconsole="false" logstderr="true" logstdout="true" logvsid="false"/>
    Also, see docs at http://docs.sun.com/source/817-6248/crsrvrx.html
    Hope this helps.

  • How to replace System.out.println() using templates

    can you give the complete code for my problem which is given below.
    package include;
    public class P
    public static cout(int a)
    System.out.println( a);
    public static cout(int a,int b)
    System.out.println(a + b);
    // like this i need to write to accept parameters from the class. which is importing this package
    for some more examples
    public static cout(int a,String s)
    System.out.printn(a +s);
    and many more type i.e. all types of arrangements of datatypes
    the above is the package called "include" Now Iam Importing the package in the class Hello:
    import include.P;
    public class Hello
    public static void main(String args[])
    int i=10;
    float f=12.23;
    String s="hello";
    P.cout(i,f); //cout is the static method of package(include) class " P"
    P.cout("welcome",s)
    // like this I want to send any type and any no of arguments as the System.out.println()
    will handle.
    My aim is to replace the System.out.println() with P.cout() which can be achieve in my idea by calling the static method ( such as cout() ) which internally use System.out.println() method. I am facing problem in achieving this because we donot know which type and how many parameters he will send .
    My task is we have to create a method which will accept any no.of arguments and is of any type.I think this can be done BY USING TEMPLATES.
    So please understand my problem and send me reply.I am waiting for your reply.
    thank you.

    Although I am not sure why you are doing this, if you really are trying to code a replacement for System.out.println then:
    out is a PrintStream and the println methods of PrintStream have the following signatures:
    void println()
    Terminate the current line by writing the line separator string.
    void println(boolean x)
    Print a boolean and then terminate the line.
    void println(char x)
    Print a character and then terminate the line.
    void println(char[] x)
    Print an array of characters and then terminate the line.
    void println(double x)
    Print a double and then terminate the line.
    void println(float x)
    Print a float and then terminate the line.
    void println(int x)
    Print an integer and then terminate the line.
    void println(long x)
    Print a long and then terminate the line.
    void println(Object x)
    Print an Object and then terminate the line.
    void println(String x)
    Print a String and then terminate
    So you should only need to create corresponding methods.

  • How to disable an out of the box disable User process task  from resource?

    How should I disable the out of the box disable User process task that is assigned to a particular resource? If I disable this disable User process task, when the user is provisioned to the same resource will I be able to stop this disable User process from running?
    My requirement: I need to disable the disable user process task from three resources x, y and z. Whenever a user is provisioned to one of these resources I should stop this disable user process task an out of the box process task from running. How can this be accomplished?? Please help me out on how to configureto remove the process task in the OIM Admin console to stop the process task.

    You can avoid the disable task from triggering by removing the Disable Process Or Access to Application from the task effect drop down in the process task. But this task is triggered once the user is disabled. But still I didn't understand the exact scenario.
    By the way the disable task is triggered when the user gets disabled and not when the user is provisioned.
    Edited by: vindla on Aug 1, 2011 10:26 PM

  • Tomcat Java Servlets, how to log System.out.println() messages

    I have recently installed a new (x86) Mac OS Xserve, and am porting some Java application Servlets from an existing older Mac OSX server. All the servlets were working (I am connecting via port 9006). I have carefully used the old JDK 1.4 compiler, edited my server.xml (for port 9006) and web.xml files, etc. The Tomcat example servlets work fine, and all my (other) servlets work fine, with one exception, where I get the typically vague "java.io.IOException: Server returned HTTP response code: 500" message.
    Trouble is, I cannot get the Java System.out.prinln statements to go to the Tomcat/logs/ log files (they are all there and updating with Tomcat HttpServlet messages), in order to properly debug.
    Is there a server.xml value somewhere I can make the change?
    On another minor (possibly related) point, does anyone know what the path info ='null' means in the Tomcat access log? e.g.,
    StandardContext[/my_servlets]: Mapped to servlet 'myServlet' with servlet path '/myServlet' and path info 'null'
    It is the only other suspicious message I get in all the logs.
    One other point: my java application that fails uses threads. All the individual classes that use the threads work when run interactively, but as soon as I call them from final Serlet class that extends HttpServlet, I get a null pointer exception. Is there something unique about the Tomcat 4.1 threading that could be causing it?
    I want to avoid upgrading to Tomcat 5 at this point, if I can avoid it. My applications are modest in scope, and the last time I upgraded to Tomcat 5, it took me days to get it working properly, and I lost all access to it from the Server Admin application.

    I have found a solution: Via the Tomcat Admin web page I set the Context field "Swallow Output" to "true".

  • How to disable system keys like alt+ctrl+delete...

    Hi,
    I was wondering if there is any way to disable system keys like alt+ctrl+delete and windows logo key etc... I would like it to get disabled when ever my java application is visible and I want it in pure java.
    Thanks,
    regards,
    Jay

    Thanks for all your replies but hey I've seensome
    program ( downloaded from google ) do suchthing.
    What they do is some kinda image thing appearsin
    the
    full screen mode and do all the tasks what I'veopt
    for. So, I'm confused what is being done in
    those
    programs.
    Even if it is doable (Ctrl, Alt Delete I don't
    think
    will be, Windows Key should be) It will not via
    Java,
    but JNI. So you would be better off hunting overthe
    MSDN.137256 speaks the truth. Ctrl-Alt-Delete is a
    HARDWARE interrupt caught by the OS. In modern
    Windows it launches a widget that can be used to
    shutdown, logoff or run task manager. I have many
    doubts about what the OP is saying.
    All hail Sun.Indeed 3021. CAD is active even when Windows isn't. I experienced this recently, and never want to again.
    All hail Sun. We love you ...

  • How to disable system triggers?

    I'm in the process of applying patchset 8.1.7.4 and the documentation here says to disable system triggers by setting the systemtrig_enabled_ to false in the pfile. The problem is that I cannot find this parameter in the pfile!! Is this normal?

    put this line in the pfile and bounce the db and start it. If you dont get any errors while starting up db then you can go ahed with the process.

  • FI Validation Exit: how to disable system standard message "Correct the..."

    Hi,
        I had setup a FI validation exit. In the source code of this validation, I raise an error message, if any. For example:
        LOOP AT t_messages_return.
          MESSAGE ID t_messages_return-id TYPE  t_messages_return-type
                     NUMBER t_messages_return-number
                     WITH t_messages_return-message_v1
                             t_messages_return-message_v2
                             t_messages_return-message_v3
                             t_messages_return-message_v4.
        ENDLOOP.
       The validation is working fine, and it's not allowing user to continue document posts while error exists. The problem is that between my custom message error display and system come back to input screen, there's a popup raised by standard code:
      "Correct the error reported before on the next screen".
       User doesn't want this message being displayed, since it's an Information Message (like i000). Is there any way to disable this message ? It's raised by standard code just after my custom message code...
    Thanks
    Rodrigo

    Is the user exit used in defining validation step in Tx:GGB0?
    It's not good practice to issue error message in validation user exits, because document postig transactions are used in BDC sessions by SAP standard FI programs.
    Instead of raising error in user exit, set B_RESULT = B_FALSE and issue generic message in message part of validation.
    Check the validation definition in GGB0, message you are gettinin might be defined in the validation, removing it might not show the message.
    Regards
    Sridhar

  • How to suppress System.out's from clientgen?

    Hi,
    I'm using WebLogic 9.2.2 with Ant 1.6. I have this task when building my web application:
         <target name="gen-web-svc-client">
              <clientgen wsdl="${PROVISIONING_SERVICE_WSDL_URL}" destDir="${srcDir}" packageName="com.myco.regui.provisioning.client" serviceName="ProvisioningAccountService" classpath="${java.class.path}" >
              </clientgen>     
         </target>
    The client generates and works fine. Minor problem is that when it is run, there is some output sent to standard out and I was wondering if anyone knows how to suppress it? Below is an example of what I see ...
    <WSEE>Preparing to Send -> [Name:[{http://bea.com/2004/06/soap/workarea/}WorkContext]
    Content:[<java version="1.5.0_11" class="java.beans.XMLDecoder">
    <string>weblogic.app.RoutingEngine</string>
    <int>214</int>
    <string>weblogic.workarea.StringWorkContext</string>
    <string>v1.0.1</string>
    <string></string>
    </java>]]<WorkAreaClientHandler.handleRequest:31>
    Thanks for any help, - Dave

    Same problem about a year later. Did you ever find a soluton to suppress the stdout messages? The following message comes out 5 to 10 times a second, not sure if it's related to Ant or not.
    <Aug 3, 2010 2:00:03 PM MDT> <Notice> <Stdout> <000000> <<WSEE>Preparing to Send -> [Name:[{http://bea.com/200
    4/06/soap/workarea/}WorkContext]
    Content:[<java version="1.5.0_22" class="java.beans.XMLDecoder">
    <string></string>
    </java>]]<WorkAreaClientHandler.handleRequest:31>>

  • How to disable system proxy server settings

    If I want to use URL.openStream() to get an InputStream to a remote file, but don't want the JVM to use the system proxy settings to do the connection, what shall I do?
    I saw a piece of code as follows
    System.setProperty("http.proxyHost","i.do.not.exist.fiction");
    System.setProperty("http.proxyPort","80");
    but this doesn't work in Java 1.4.0_01
    Instead of trying connecting to a valid remote host without using a proxy (presumably because the supplied proxy cannot be found), the JVM actually throws a FileNotFoundException although the remote file is there (and can be accessed by, say, Internet Explorer).

    Ok. Your changing the http proxy to something that is valid, although the server does not exists. Try setting the "http.proxyHost" property to null.
    You can find more information in:
    http://java.sun.com/j2se/1.4/docs/guide/net/properties.html
    Bye.

  • System.out.println()'s inside implementation

    Hello,
    We all know the System.out.prinltn() API. But I want to know the inside implementation of System.out.println() API. Where can I get this implementation?
    Furthermore, can anyone explain concretely about how to implement System.out.println()? Can you tell me in a great detail?
    JohnWen604
    21-June-2005

    I just cannot understand what is the magic behind
    d that one API can control the hardware(i.e. control
    the screen to print one "simple" sentance). Do youIt's called "native OS methods". And you're not controlling anything, the graphics driver does. You're just asking the OS to ask the driver to ask the graphics card to send the appropriate signals.
    think that is just just the magic of our grand new
    computer? So If I can fully understand how the
    hardware is controlled by the Application Program, I
    will be more sensible in writing software. Just likeI doubt that. The more sensible way would be to stick to a useful level of abstraction and good design.
    you know the IC's inner structure if you want to be
    an qualified Electronic Engineer. Do
    you think so?No.
    Besides, from some OS books I know that
    w that Application program written in Java will
    become some OS commands that is ready for going
    through the OS's command processor. I just do not
    understand how that primitive Java code is written
    which is OS command and can tell hardware(screen) to
    print something. Do you know what that primitive Java
    code is?-- The primitive Java code that is a OS
    command to tell screen to print something. The
    primitive java code 's examples are "+", "for",
    "while", "private". The primitive java code does not
    mean API.No. It's called "instructions".
    What you said about setOut0(), I think
    setOut0() is simply an API. Do you know the
    implementation of this setout0() API? There must be
    implementation and there must be the primitive Java
    code. Do you agree with me?No. It's N-A-T-I-V-E. No Java code. Nowhere. Just C++ or whatever.

Maybe you are looking for

  • I have a QP card 101 and I want to standardize HSB in photoshop CS5.1. How do I do this?

    I need help standardizing the QP 101 card in my photo. The values for QPcard 101 are the following: Dark Gray: 35, 0, 0 Mid Gray: 48, 0, 0 White: 95, 0, 0

  • Error Code 39

    I have a computer with a code 39 error and need some help. The CD and DVD rom was not working in my computer when the os starts the device manager sees drives but is unable to access it. Can anyone help me?

  • Help on ABAP HR

    Hi, i learned ABAP HR can any body help me materials regardign this any body having specifications regardsing ABAP HR it will be more helpfull to this id <b><REMOVED BY MODERATOR></b> Message was edited by:         Alvaro Tejada Galindo

  • I need to talk to a real person NOW!

    I am showing $50 in my account balance, which is my monthly fee, but for some reason it is saying my monthly unlimited plan has expired. I have been trying to get a real person on the phone for over an hour now to no avail. 611, even if I push 0's, e

  • What's the best camcorder for mac and quicktime or youtube?

    Aloha all, Instead of iSight,,,, what is the best camcorder compatible for mac and transfering video to powerbook G4 and PPC G5 Quad and for use with youtube and or CitizenTube.... ? I have a Canon SD 500 this should be enough because only can down l