Multithread App !

Hi Friends,
I have a multithreaded app that refers stock price and suggest end user upon the availability, as of now it was running as a Swing app. we are thinking of porting it on web. So how can a end user access this Stock price screener using webservices ?
Here are my challenges :
1. I cannot deploy it in J2ee Webserver as they are managed environment.
2. We have not yet migrated to jdk1.6 ( WE WILL DO THAT NEXT YR DEPENDING HOW THE PRODUCT IS PERFORMING)
So how can this be acheived in a strict(ideal) j2ee environment.
My boss is strict about J2ee standard, I donot know how to implement this in budget n time ??
I am really scratching my head about the same for an hour n so I have not find a decent answer on web also. Is it that violting the basic rule of j2ee is the only way out. ("don't sponge a thread in a managed environment" ). I know there are software that are running thread with in like log4j but they have special grant to run not my application.
thks.s.das

EJP wrote:
I would have failed you in the interview for the garrulous verbosity of writing Boolean.TRUE.equals, which can be completely omitted, and Boolean.FALSE.equals, which can be replaced by !.Students learn what in the books, and lot of java books I see using the same style:
http://books.google.com/books?id=DXYZZVlWOAkC&pg=PA286&dq=Boolean.TRUE.equals%28&hl=en&sa=X&ei=i31sT8jdJonh0QH01-jyBg&ved=0CDIQ6AEwAA#v=onepage&q=Boolean.TRUE.equals%28&f=false
http://books.google.com/books?id=ppNBCdxxW5AC&pg=PA439&dq=Boolean.TRUE.equals%28&hl=en&sa=X&ei=i31sT8jdJonh0QH01-jyBg&ved=0CD8Q6AEwAg#v=onepage&q=Boolean.TRUE.equals%28&f=false
Here is more serious mistakes, looks like the book author doesn't understand the difference between Boolean and boolean, Integer and int:
http://books.google.com/books?id=FPxif81mgYoC&pg=PA219&dq=Boolean.TRUE.equals%28&hl=en&sa=X&ei=i31sT8jdJonh0QH01-jyBg&ved=0CDgQ6AEwAQ#v=onepage&q=Boolean.TRUE.equals%28&f=false
When you code wrong, you make something wrong for your application, When you teach wrong, you make lot of wrongs .... :D

Similar Messages

  • Transactions in Multithreaded app

    Is it safe to use the same java.sql.Connection instance all over multithreaded app? Is transaction session associated with a thread? Or one Connection keeps just one transaction session for all threads?
    Any help's appreciated.

    Is it safe to use the same java.sql.Connection
    instance all over multithreaded app?Yes, providing your access/uses is thread safe, i.e. syncronised.
    Is transaction
    session associated with a thread?No a connection.
    Or one Connection
    keeps just one transaction session for all threads?Yes.
    A transactions should be autonomous, if all threads use the same transaction, it would be pointless using transactions in the first place.
    Any help's appreciated.Checkout these link, your should
    http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/bmp.html
    http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/jdbc.html
    http://developer.java.sun.com/developer/technicalArticles/xml/metadata/

  • IO performance of multithreaded app

    In a multithreaded app there are N threads. These threads produce some data and write to disk. The data is written on disk in following two ways:
    1. Each thread is writing data to a different file.(All files are on same disk)
    2. All threads write data to a single file.
    After running some tests the results show that 2nd case takes 20% more time than 1st.
    I want to know the actual reason the this, whether there is some parallel io happening, or some other reason.
    Vinit.

    Hi Vinit,
    Assuming that you have set thread councurrency level to a proper value, a simple reason is that writing to a file involves locking the corresponding inode. So if all your threads are writing to the same file , there is a chance that the LWPs corresponding to your user threads sleep inside the kernel for the lock on the inode . This will reduce the performance.
    BTW , you didn't give your machine configuration ..
    Thanks,
    Prajeesh

  • SIGSEGV in multithreaded app with OCI( on Linux

    I have got a SIGSEGV in OCI9. Application is multithreaded.
    OS Linux. Distribution SLES8. Libc version 2.2.5.
    Oracle 9.2.0.5
    Application is heavy multithreaded. SIGSEGV occures very rarely. But always in the same place.
    Connect code:
    static void oracle_init() {
    ILock l(m_env);
    if (counter++ <= 0)
    (void)OCIInitialize(OCI_DEFAULT, 0, NULL, NULL, NULL);
    ctor {
    oracle_init();
    (void)OCIEnvInit(&env, OCI_DEFAULT, 0, NULL);
    (void)OCIHandleAlloc(env, (void **)&err, OCI_HTYPE_ERROR, 0, NULL);
    connect {
    checkerr(err, OCILogon(env, err, &ctx, (text *)const_cast<char *>(user.c_str()), user.len(), (text *)const_cast<char *>(password.c_str()), pass
    word.len(), (text *)const_cast<char *>(db.c_str()), db.len()));
    /u/app/oracle/product/9.2.0/lib/libclntsh.so.9.0(nlolgobj+0x50f) [0x4044a22d]
    /u/app/oracle/product/9.2.0/lib/libclntsh.so.9.0(nnfun2a+0x243) [0x403bc7e3]
    /u/app/oracle/product/9.2.0/lib/libclntsh.so.9.0(nnfsn2a+0x66) [0x403bc310]
    /u/app/oracle/product/9.2.0/lib/libclntsh.so.9.0(niqname+0x18a) [0x40365a1a]
    /u/app/oracle/product/9.2.0/lib/libclntsh.so.9.0(kwfnran+0x11f) [0x402d5df7]
    /u/app/oracle/product/9.2.0/lib/libclntsh.so.9.0(kwfcinit+0x177) [0x402a9155]
    /u/app/oracle/product/9.2.0/lib/libclntsh.so.9.0(kpuatch+0x834) [0x4014f7d2]
    /u/app/oracle/product/9.2.0/lib/libclntsh.so.9.0(kpulon+0x1bc) [0x4015009e]
    /u/app/oracle/product/9.2.0/lib/libclntsh.so.9.0(OCILogon+0xd1) [0x401e2167]
    Any ideas? Maybe I should initialise OCI with other flags?

    OCIInitialize should be called with mode OCI_THREADED instead of OCI_DEFAULT.

  • JNI_CreateJavaVM fails in Multithreaded app.

    Hello,
    when i call JNI_CreateJavaVM in a multithreaded application, I ll get the error:
    "ERROR: Could not find the pthread library (2). Are you running a supported Linux
    distribution?"
    So, given the following program, everyhing works okay:
    ----code---
    #include "jni.h"
    #include <stdio.h>
    #include <stdlib.h>
    #include <pthread.h>
    void jnicall()
    JNIEnv *env;
    JavaVM *jvm;
    jint res;
    jclass cls;
    jmethodID mid;
    jstring jstr;
    jclass stringClass;
    jobjectArray args;
    JavaVMInitArgs vm_args;
    JavaVMOption options[1];
    options[0].optionString = "-Djava.class.path=.";
    vm_args.version = 0x00010002;
    vm_args.options = options;
    vm_args.nOptions = 1;
    vm_args.ignoreUnrecognized = JNI_TRUE;
    res = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);
    if (res < 0) {
    fprintf(stderr, "Can't create Java VM\n");
    exit(1);
    cls = env->FindClass("Hello");
    if (cls == NULL) {
    goto destroy;
    mid = env->GetStaticMethodID(cls, "main", "([Ljava/lang/String;)V");
    if (mid == NULL) {
    goto destroy;
    jstr = env->NewStringUTF(" from C!");
    if (jstr == NULL) {
    goto destroy;
    stringClass = env->FindClass("java/lang/String");
    args = env->NewObjectArray(1, stringClass, jstr);
    if (args == NULL) {
    goto destroy;
    env->CallStaticVoidMethod(cls, mid, args);
    destroy:
    if (env->ExceptionOccurred()) {
    env->ExceptionDescribe();
    jvm->DestroyJavaVM();
    int main()
    jnicall();
    ---code---
    But when I replace main with something like
    ---code---
    int main()
    pthread_t thread;
    if (0 != pthread_create(&thread, NULL, (void*(*)(void*))jnicall, NULL))
    fprintf(stderr, "Cannot create thread");
    exit(1);
    ---code---
    Really strange is that is does not matter, how i use pthread functions: even if
    i call the jnicall function directly from main but start a different thread using
    pthread_create, i get this method too:
    ---code---
    int main()
    pthread_t thread;
    jnicall();
    if (0 != pthread_create(&thread, NULL, (void*(*)(void*))some_other_thread_without_jni,
    NULL))
    fprintf(stderr, "Cannot create thread");
    exit(1);
    ---code---
    My system is a Suse Linux Enterprise Server 8.0 (wth United Linux 1.0) (kernel
    2.4.19, glibc is 2.2.5); the Jrockit stuff is JRockit 8.1 SP 2
    Any ideas?
    TIA,
    Johannes

    Try checking that the environment variable LD_ASSUME_KERNEL=2.2.5 is not
    set.
    From the release notes at:
    http://edocs.bea.com/wljrockit/docs81/relnotes/relnotes.html#1041981
    Best Regards,
    Josefin Hallberg
    BEA WebLogic JRockit
    Customer Centric Engineering
    "Johannes Hampel" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hello,
    when i call JNI_CreateJavaVM in a multithreaded application, I ll getthe error:
    "ERROR: Could not find the pthread library (2). Are you running asupported Linux
    distribution?"
    So, given the following program, everyhing works okay:
    ----code---
    #include "jni.h"
    #include <stdio.h>
    #include <stdlib.h>
    #include <pthread.h>
    void jnicall()
    JNIEnv *env;
    JavaVM *jvm;
    jint res;
    jclass cls;
    jmethodID mid;
    jstring jstr;
    jclass stringClass;
    jobjectArray args;
    JavaVMInitArgs vm_args;
    JavaVMOption options[1];
    options[0].optionString = "-Djava.class.path=.";
    vm_args.version = 0x00010002;
    vm_args.options = options;
    vm_args.nOptions = 1;
    vm_args.ignoreUnrecognized = JNI_TRUE;
    res = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);
    if (res < 0) {
    fprintf(stderr, "Can't create Java VM\n");
    exit(1);
    cls = env->FindClass("Hello");
    if (cls == NULL) {
    goto destroy;
    mid = env->GetStaticMethodID(cls, "main", "([Ljava/lang/String;)V");
    if (mid == NULL) {
    goto destroy;
    jstr = env->NewStringUTF(" from C!");
    if (jstr == NULL) {
    goto destroy;
    stringClass = env->FindClass("java/lang/String");
    args = env->NewObjectArray(1, stringClass, jstr);
    if (args == NULL) {
    goto destroy;
    env->CallStaticVoidMethod(cls, mid, args);
    destroy:
    if (env->ExceptionOccurred()) {
    env->ExceptionDescribe();
    jvm->DestroyJavaVM();
    int main()
    jnicall();
    ---code---
    But when I replace main with something like
    ---code---
    int main()
    pthread_t thread;
    if (0 != pthread_create(&thread, NULL, (void*(*)(void*))jnicall,NULL))
    fprintf(stderr, "Cannot create thread");
    exit(1);
    ---code---
    Really strange is that is does not matter, how i use pthread functions:even if
    i call the jnicall function directly from main but start a differentthread using
    pthread_create, i get this method too:
    ---code---
    int main()
    pthread_t thread;
    jnicall();
    if (0 != pthread_create(&thread, NULL,(void*(*)(void*))some_other_thread_without_jni,
    NULL))
    fprintf(stderr, "Cannot create thread");
    exit(1);
    ---code---
    My system is a Suse Linux Enterprise Server 8.0 (wth United Linux 1.0)(kernel
    2.4.19, glibc is 2.2.5); the Jrockit stuff is JRockit 8.1 SP 2
    Any ideas?
    TIA,
    Johannes

  • Connection pooling in multithreaded app results in occasional "Closed Statement" exc"

    Hi there,
    I'm writing a CORBA servant, which amongst all calls in a stored procedure. I'm using connection pooling (just by example) from multiple threads and use grabbed connection to prepare an SP statement, execute it, and close both statement and connection (to return it to the pool). My stress tests run fine for the most part but once in a while throws out "Closed Statement" exception when trying to excecute the prepared statement.
    The reference platform is Solaris7, thin driver 8.1.6 for Java2, jdk 1.2.2, Oracle 8.1.5 (backend), ORBacus 3.3 (external application orb).
    Do you guys have any "multithreaded" statements as far as pooling concerned? Let me know if you need code, schema, anything at all. Any recommendations are greatly appreciated too, like "don't use prepared statements, don't use pooling from multiple threads, download upgrade, etc". Thanks ahead.
    Yours,
    -Evgeni

    Dear Oracle JDBC Development Team,
    First of all, I object to your comment "Please don't spread wrong information.". I do not spread wrong information. That is why I wrote in my previous email, "it isn't thread safe (as far as my tests have shown)". My statement is thus conditional on MY testing. I recognise the fact that I could be wrong. Hence, the conditional clause.
    As for the claim that OracleConnectionCacheImpl is thread safe - well, since it is your software then all I can do is believe you. However, I repeatedly get a java.util.EmptyStackException from calls to oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection() when running my test WITHOUT using the "synchronized" clause on the OracleConnectionCacheImpl object.
    This, of course, could be due to the fact that my test is faulty. I don't know. I can't see the fault in any case. If you can help me with this then I would be more than grateful.
    In any case, when I use the "synchronized" statement on OracleConnectionCacheImpl then this error disappears in a multithreaded environment.
    Another interesting thing my test showed was that the JDBC driver seems to hang under heavy workload. Again, I could be WRONG. It could be my test that causes the problem, however, it is very hard to pinpoint the problem.
    I would really appreciate help with this, if you have time, as we are using OracleConnectionCacheImpl in a major Internet billing system. If you wish to help then please send me an email to [email protected] (or [email protected]) and I will then send you my source code for the test.
    In any case, I will word my messages with even more care in future!
    regards,
    Alexander Day
    null

  • Threads - Multithreaded app. - How to cancel one and start another?

    I've searched through the forums for some direction on this but have been unsuccessful in finding anything I could use yet.
    What I am trying to accomplish is the following:
    1. I have a multithreaded application
    2. User can enter login information and then initiate the login thread by clicking the login button
    3. Login button turns into a Cancel button during login attempt
    4. If user changes their mind, they can initiate the cancel login thread by clicking the cancel button
    How can I stop the login thread and start the cancel thread? Reading through the API (1.3.1), it seems that necessary methods have been depreciated. Could anyone offer me any insight/examples?
    Thanks,
    KJ

    Have a boolean variable in the login thread which is checked at various points through the process and set to true when login starts. When the user clicks cancel, set it to false, then the login thread will end itself next time it checks the boolean.

  • PatternSyntaxException when calling String.replaceAll in multithreaded app

    Dear,
    Someone ever encountered or knows of problems when invoking String.replaceAll in a multithreaded application (JDK 1.4.2)?
    I have an application that invokes replaceAll on a String and that runs just fine when only a single thread is active, but once multiple threads execute the same code, each on its own String instance, the following stack is produced (more often than not).
    java.util.regex.PatternSyntaxException: Unknown character category {Digit} near index 9
    ^\p{Digit}
    ^
    at java.util.regex.Pattern.error(Unknown Source)
    at java.util.regex.Pattern.familyError(Unknown Source)
    at java.util.regex.Pattern.retrieveCategoryNode(Unknown Source)
    at java.util.regex.Pattern.family(Unknown Source)
    at java.util.regex.Pattern.sequence(Unknown Source)
    at java.util.regex.Pattern.expr(Unknown Source)
    at java.util.regex.Pattern.compile(Unknown Source)
    at java.util.regex.Pattern.<init>(Unknown Source)
    at java.util.regex.Pattern.compile(Unknown Source)
    at java.lang.String.replaceAll(Unknown Source)
    The 1.4.2 source code seems to use a static HashMap (java.util.regex.Pattern#retrieveCategoryNode) to store some read only data, but it looks like the initialization of that HashMap in an multi threaded environment is not 'locked'. Could that be the/an issue? Anybody any thoughts?
    Thanks,
    Peter

    I ran peter's program on a hyperthreaded Intel P4 box and XP Pro. XP reports that there are 2 processors.
    I used 1.4.2_06 and 1.5.0_01, with both -client and -server options.
    The program was run with numThreads 10 and loadPattern 0 and 1.
    The program was run 50 times for each of the configurations. Only one resulted in failures, as follows:
    Java version     cli/svr          Pgm Parms   # Failures      
    1.5.0_01     -client          10, 0          0
                        10, 1          0
              -server          10, 0          0
                        10, 1          0
    1.4.2_06     -client          10, 0          10
                        10, 1          0
              -server          10, 0          0
                        10, 1          0
    Of the 10 failures, 1 reported 3 errors, 2 reported 2 errors, and 7 reported 1 error.
    The triple-error report is below:
    "C:\Program Files\Java\jdk1.4.2_06\bin\java.exe" -client PatternProblem 10 0
    Thread-7:Unknown character category {Digit} near index 9
    ^\p{Digit}
             ^
    Thread-5:Unknown character category {Digit} near index 9
    ^\p{Digit}
             ^
    Thread-3:Unknown character category {Digit} near index 9
    ^\p{Digit}
             ^
    Note that this wording is not the same as peter encountered. The thread number varied,
    apparently randomly, from 0 to 8

  • JDO Logging with MultiThreaded apps

    I am having a HUGE problem w/ JDO displaying every SQL INFO statement to
    the screen. I have my log4j.properties file setup as follows
    log4j.rootCategory=ERROR, console
    log4j.category.com.solarmetric.kodo.impl.jdbc.SQL=ERROR, console
    log4j.category.com.solarmetric.kodo.impl.jdbc.JDBC=ERROR, console
    log4j.category.com.solarmetric.kodo.impl.jdbc.Schema=ERROR, console
    log4j.category.com.solarmetric.kodo.Performance=ERROR, console
    log4j.category.com.solarmetric.kodo.MetaData=ERROR, console
    log4j.category.com.solarmetric.kodo.Enhance=ERROR, console
    log4j.category.com.solarmetric.kodo.Query=ERROR, console
    log4j.category.com.solarmetric.kodo.Runtime=ERROR, console
    log4j.appender.console=org.apache.log4j.ConsoleAppender
    And this works fine for a single threaded application, however if that
    application spawns any threads, those threads write everything imaginable
    to the screen, as though I had everything in my log4j.properties set to
    =INFO.
    This is really, really annoying for debugging purposes, I have no idea
    where to go with this
    And yes my kodo.properties file has multithreaded=true
    I am also using JUnit to run these tests, FYI
    Thanks in advance for any help

    We are spawning these threads within our application and we see the same
    behavior when launched from the command line.
    Here is my logging.properties:
    # Specify the handlers to create in the root logger
    # (all loggers are children of the root logger)
    # The following creates two handlers
    handlers=java.util.logging.ConsoleHandler, java.util.logging.FileHandler
    # Set the default logging level for the root logger
    ..level=ALL
    # Set the default logging level for new ConsoleHandler instances
    java.util.logging.ConsoleHandler.level=ERROR
    # Set the default logging level for new FileHandler instances
    java.util.logging.FileHandler.level=ALL
    # Set the default formatter for new ConsoleHandler instances
    java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
    # Set the default logging level for all Kodo logs to ERROR
    com.solarmetric.kodo.impl.jdbc.SQL.level=ERROR
    com.solarmetric.kodo.impl.jdbc.JDBC.level=ERROR
    com.solarmetric.kodo.impl.jdbc.Schema.level=ERROR
    com.solarmetric.kodo.Performance.level=ERROR
    com.solarmetric.kodo.MetaData.level=ERROR
    com.solarmetric.kodo.Enhance.level=ERROR
    com.solarmetric.kodo.Query.level=ERROR
    com.solarmetric.kodo.Runtime.level=ERROR
    Here is my log4j.properties:
    log4j.rootCategory=ERROR, console
    log4j.category.com.solarmetric.kodo.impl.jdbc.SQL=ERROR, console
    log4j.category.com.solarmetric.kodo.impl.jdbc.JDBC=ERROR, console
    log4j.category.com.solarmetric.kodo.impl.jdbc.Schema=ERROR, console
    log4j.category.com.solarmetric.kodo.Performance=ERROR, console
    log4j.category.com.solarmetric.kodo.MetaData=ERROR, console
    log4j.category.com.solarmetric.kodo.Enhance=ERROR, console
    log4j.category.com.solarmetric.kodo.Query=ERROR, console
    log4j.category.com.solarmetric.kodo.Runtime=ERROR, console
    log4j.appender.console=org.apache.log4j.ConsoleAppender
    And yet, I still get this output( from just a few seconds of runtime)
    sed=209;params={(long)21102}]
    Jun 30, 2003 3:35:20 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] begin rollback
    Jun 30, 2003 3:35:20 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] end rollback 0ms Jun 30, 2003
    3:35:20 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] return
    [com.solarmetric.datasource.
    PoolConnection@19da967[identityHashCode:16658781,wrapped:com.solarmetric.dat
    asou
    rce.PreparedStatementCache$CacheAwareConnection@19da967[identityHashCode:595
    8617
    ,wrapped:oracle.jdbc.driver.OracleConnection@19da967]:
    [requests=643;size=10;max
    =70;hits=632;created=11;redundant=0;overflow=0;new=11;leaked=0;unavailable=0
    to [com.solarmetric.datasource.DataSourceImpl$SortablePool[min=3; max=10;
    size=3 ; taken=2]] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] get
    [com.solarmetric.datasource.Poo
    lConnection@19da967[identityHashCode:16658781,wrapped:com.solarmetric.dataso
    urce
    ..PreparedStatementCache$CacheAwareConnection@19da967[identityHashCode:595861
    7,wr
    apped:oracle.jdbc.driver.OracleConnection@19da967]:
    [requests=643;size=10;max=70
    ;hits=632;created=11;redundant=0;overflow=0;new=11;leaked=0;unavailable=0]]]
    fro m [com.solarmetric.datasource.DataSourceImpl$SortablePool[min=3; max=10;
    size=3; taken=1]] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] executing statement <2622421>:
    [reu sed=210;params={(long)21103}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] begin rollback
    Jun 30, 2003 3:35:20 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] end rollback 0ms Jun 30, 2003
    3:35:20 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] return
    [com.solarmetric.datasource.
    PoolConnection@19da967[identityHashCode:16658781,wrapped:com.solarmetric.dat
    asou
    rce.PreparedStatementCache$CacheAwareConnection@19da967[identityHashCode:595
    8617
    ,wrapped:oracle.jdbc.driver.OracleConnection@19da967]:
    [requests=644;size=10;max
    =70;hits=633;created=11;redundant=0;overflow=0;new=11;leaked=0;unavailable=0
    to [com.solarmetric.datasource.DataSourceImpl$SortablePool[min=3; max=10;
    size=3 ; taken=2]] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] get
    [com.solarmetric.datasource.Poo
    lConnection@19da967[identityHashCode:16658781,wrapped:com.solarmetric.dataso
    urce
    ..PreparedStatementCache$CacheAwareConnection@19da967[identityHashCode:595861
    7,wr
    apped:oracle.jdbc.driver.OracleConnection@19da967]:
    [requests=644;size=10;max=70
    ;hits=633;created=11;redundant=0;overflow=0;new=11;leaked=0;unavailable=0]]]
    fro m [com.solarmetric.datasource.DataSourceImpl$SortablePool[min=3; max=10;
    size=3; taken=1]] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] executing statement <2622421>:
    [reu sed=211;params={(long)21104}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] begin rollback
    Jun 30, 2003 3:35:20 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] end rollback 0ms Jun 30, 2003
    3:35:20 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] return
    [com.solarmetric.datasource.
    PoolConnection@19da967[identityHashCode:16658781,wrapped:com.solarmetric.dat
    asou
    rce.PreparedStatementCache$CacheAwareConnection@19da967[identityHashCode:595
    8617
    ,wrapped:oracle.jdbc.driver.OracleConnection@19da967]:
    [requests=645;size=10;max
    =70;hits=634;created=11;redundant=0;overflow=0;new=11;leaked=0;unavailable=0
    to [com.solarmetric.datasource.DataSourceImpl$SortablePool[min=3; max=10;
    size=3 ; taken=2]] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:14008569; T:26117441; D:23582715 ] executing statement <18423897>:
    [re used=212;params={(long)22155}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:14008569; T:26117441; D:23582715 ] executing statement <10141941>:
    [re used=211;params={(long)22205}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:14008569; T:26117441; D:23582715 ] executing statement <18423897>:
    [re used=213;params={(long)22156}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:14008569; T:26117441; D:23582715 ] executing statement <10141941>:
    [re used=212;params={(long)22206}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:14008569; T:26117441; D:23582715 ] executing statement <18423897>:
    [re used=214;params={(long)22157}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:14008569; T:26117441; D:23582715 ] executing statement <10141941>:
    [re used=213;params={(long)22207}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:14008569; T:26117441; D:23582715 ] executing statement <18423897>:
    [re used=215;params={(long)22158}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:14008569; T:26117441; D:23582715 ] executing statement <10141941>:
    [re used=214;params={(long)22208}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:14008569; T:26117441; D:23582715 ] executing statement <18423897>:
    [re used=216;params={(long)22159}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:14008569; T:26117441; D:23582715 ] executing statement <10141941>:
    [re used=215;params={(long)22209}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] get
    [com.solarmetric.datasource.Poo
    lConnection@19da967[identityHashCode:16658781,wrapped:com.solarmetric.dataso
    urce
    ..PreparedStatementCache$CacheAwareConnection@19da967[identityHashCode:595861
    7,wr
    apped:oracle.jdbc.driver.OracleConnection@19da967]:
    [requests=655;size=10;max=70
    ;hits=644;created=11;redundant=0;overflow=0;new=11;leaked=0;unavailable=0]]]
    fro m [com.solarmetric.datasource.DataSourceImpl$SortablePool[min=3; max=10;
    size=3; taken=1]] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] executing statement <2622421>:
    [reu sed=212;params={(long)21105}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] begin rollback
    Jun 30, 2003 3:35:20 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] end rollback 0ms Jun 30, 2003
    3:35:20 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] return
    [com.solarmetric.datasource.
    PoolConnection@19da967[identityHashCode:16658781,wrapped:com.solarmetric.dat
    asou
    rce.PreparedStatementCache$CacheAwareConnection@19da967[identityHashCode:595
    8617
    ,wrapped:oracle.jdbc.driver.OracleConnection@19da967]:
    [requests=656;size=10;max
    =70;hits=645;created=11;redundant=0;overflow=0;new=11;leaked=0;unavailable=0
    to [com.solarmetric.datasource.DataSourceImpl$SortablePool[min=3; max=10;
    size=3 ; taken=2]] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] get
    [com.solarmetric.datasource.Poo
    lConnection@19da967[identityHashCode:16658781,wrapped:com.solarmetric.dataso
    urce
    ..PreparedStatementCache$CacheAwareConnection@19da967[identityHashCode:595861
    7,wr
    apped:oracle.jdbc.driver.OracleConnection@19da967]:
    [requests=656;size=10;max=70
    ;hits=645;created=11;redundant=0;overflow=0;new=11;leaked=0;unavailable=0]]]
    fro m [com.solarmetric.datasource.DataSourceImpl$SortablePool[min=3; max=10;
    size=3; taken=1]] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] executing statement <2622421>:
    [reu sed=213;params={(long)21106}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] begin rollback
    Jun 30, 2003 3:35:20 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] end rollback 0ms Jun 30, 2003
    3:35:20 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] return
    [com.solarmetric.datasource.
    PoolConnection@19da967[identityHashCode:16658781,wrapped:com.solarmetric.dat
    asou
    rce.PreparedStatementCache$CacheAwareConnection@19da967[identityHashCode:595
    8617
    ,wrapped:oracle.jdbc.driver.OracleConnection@19da967]:
    [requests=657;size=10;max
    =70;hits=646;created=11;redundant=0;overflow=0;new=11;leaked=0;unavailable=0
    to [com.solarmetric.datasource.DataSourceImpl$SortablePool[min=3; max=10;
    size=3 ; taken=2]] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] get
    [com.solarmetric.datasource.Poo
    lConnection@19da967[identityHashCode:16658781,wrapped:com.solarmetric.dataso
    urce
    ..PreparedStatementCache$CacheAwareConnection@19da967[identityHashCode:595861
    7,wr
    apped:oracle.jdbc.driver.OracleConnection@19da967]:
    [requests=657;size=10;max=70
    ;hits=646;created=11;redundant=0;overflow=0;new=11;leaked=0;unavailable=0]]]
    fro m [com.solarmetric.datasource.DataSourceImpl$SortablePool[min=3; max=10;
    size=3; taken=1]] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] executing statement <2622421>:
    [reu sed=214;params={(long)21107}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] begin rollback
    Jun 30, 2003 3:35:20 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] end rollback 0ms Jun 30, 2003
    3:35:20 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] return
    [com.solarmetric.datasource.
    PoolConnection@19da967[identityHashCode:16658781,wrapped:com.solarmetric.dat
    asou
    rce.PreparedStatementCache$CacheAwareConnection@19da967[identityHashCode:595
    8617
    ,wrapped:oracle.jdbc.driver.OracleConnection@19da967]:
    [requests=658;size=10;max
    =70;hits=647;created=11;redundant=0;overflow=0;new=11;leaked=0;unavailable=0
    to [com.solarmetric.datasource.DataSourceImpl$SortablePool[min=3; max=10;
    size=3 ; taken=2]] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] get
    [com.solarmetric.datasource.Poo
    lConnection@19da967[identityHashCode:16658781,wrapped:com.solarmetric.dataso
    urce
    ..PreparedStatementCache$CacheAwareConnection@19da967[identityHashCode:595861
    7,wr
    apped:oracle.jdbc.driver.OracleConnection@19da967]:
    [requests=658;size=10;max=70
    ;hits=647;created=11;redundant=0;overflow=0;new=11;leaked=0;unavailable=0]]]
    fro m [com.solarmetric.datasource.DataSourceImpl$SortablePool[min=3; max=10;
    size=3; taken=1]] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] executing statement <2622421>:
    [reu sed=215;params={(long)21108}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] begin rollback
    Jun 30, 2003 3:35:20 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] end rollback 0ms Jun 30, 2003
    3:35:20 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] return
    [com.solarmetric.datasource.
    PoolConnection@19da967[identityHashCode:16658781,wrapped:com.solarmetric.dat
    asou
    rce.PreparedStatementCache$CacheAwareConnection@19da967[identityHashCode:595
    8617
    ,wrapped:oracle.jdbc.driver.OracleConnection@19da967]:
    [requests=659;size=10;max
    =70;hits=648;created=11;redundant=0;overflow=0;new=11;leaked=0;unavailable=0
    to [com.solarmetric.datasource.DataSourceImpl$SortablePool[min=3; max=10;
    size=3 ; taken=2]] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] get
    [com.solarmetric.datasource.Poo
    lConnection@19da967[identityHashCode:16658781,wrapped:com.solarmetric.dataso
    urce
    ..PreparedStatementCache$CacheAwareConnection@19da967[identityHashCode:595861
    7,wr
    apped:oracle.jdbc.driver.OracleConnection@19da967]:
    [requests=659;size=10;max=70
    ;hits=648;created=11;redundant=0;overflow=0;new=11;leaked=0;unavailable=0]]]
    fro m [com.solarmetric.datasource.DataSourceImpl$SortablePool[min=3; max=10;
    size=3; taken=1]] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] executing statement <2622421>:
    [reu sed=216;params={(long)21109}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] begin rollback
    Jun 30, 2003 3:35:20 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] end rollback 0ms Jun 30, 2003
    3:35:20 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] return
    [com.solarmetric.datasource.
    PoolConnection@19da967[identityHashCode:16658781,wrapped:com.solarmetric.dat
    asou
    rce.PreparedStatementCache$CacheAwareConnection@19da967[identityHashCode:595
    8617
    ,wrapped:oracle.jdbc.driver.OracleConnection@19da967]:
    [requests=660;size=10;max
    =70;hits=649;created=11;redundant=0;overflow=0;new=11;leaked=0;unavailable=0
    to [com.solarmetric.datasource.DataSourceImpl$SortablePool[min=3; max=10;
    size=3 ; taken=2]] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:14008569; T:26117441; D:23582715 ] executing statement <18423897>:
    [re used=217;params={(long)22160}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:14008569; T:26117441; D:23582715 ] executing statement <10141941>:
    [re used=216;params={(long)22210}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:14008569; T:26117441; D:23582715 ] executing statement <18423897>:
    [re used=218;params={(long)22161}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:14008569; T:26117441; D:23582715 ] executing statement <10141941>:
    [re used=217;params={(long)22211}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:14008569; T:26117441; D:23582715 ] executing statement <18423897>:
    [re used=219;params={(long)22162}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:14008569; T:26117441; D:23582715 ] executing statement <10141941>:
    [re used=218;params={(long)22212}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:14008569; T:26117441; D:23582715 ] executing statement <18423897>:
    [re used=220;params={(long)22163}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:14008569; T:26117441; D:23582715 ] executing statement <10141941>:
    [re used=219;params={(long)22213}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:14008569; T:26117441; D:23582715 ] executing statement <18423897>:
    [re used=221;params={(long)22164}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:14008569; T:26117441; D:23582715 ] executing statement <10141941>:
    [re used=220;params={(long)22214}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] get
    [com.solarmetric.datasource.Poo
    lConnection@19da967[identityHashCode:16658781,wrapped:com.solarmetric.dataso
    urce
    ..PreparedStatementCache$CacheAwareConnection@19da967[identityHashCode:595861
    7,wr
    apped:oracle.jdbc.driver.OracleConnection@19da967]:
    [requests=670;size=10;max=70
    ;hits=659;created=11;redundant=0;overflow=0;new=11;leaked=0;unavailable=0]]]
    fro m [com.solarmetric.datasource.DataSourceImpl$SortablePool[min=3; max=10;
    size=3; taken=1]] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] executing statement <2622421>:
    [reu sed=217;params={(long)21110}] Jun 30, 2003 3:35:20 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] begin rollback
    Jun 30, 2003 3:35:20 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] end rollback 15ms Jun 30, 2003
    3:35:20 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] return
    [com.solarmetric.datasource.
    PoolConnection@19da967[identityHashCode:16658781,wrapped:com.solarmetric.dat
    asou
    rce.PreparedStatementCache$CacheAwareConnection@19da967[identityHashCode:595
    8617
    ,wrapped:oracle.jdbc.driver.OracleConnection@19da967]:
    [requests=671;size=10;max
    =70;hits=660;created=11;redundant=0;overflow=0;new=11;leaked=0;unavailable=0
    to [com.solarmetric.datasource.DataSourceImpl$SortablePool[min=3; max=10;
    size=3 ; taken=2]]
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 11.157 sec Jun
    30, 2003 3:35:21 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] get
    [com.solarmetric.datasource.Poo
    lConnection@19da967[identityHashCode:16658781,wrapped:com.solarmetric.dataso
    urce
    ..PreparedStatementCache$CacheAwareConnection@19da967[identityHashCode:595861
    7,wr
    apped:oracle.jdbc.driver.OracleConnection@19da967]:
    [requests=671;size=10;max=70
    ;hits=660;created=11;redundant=0;overflow=0;new=11;leaked=0;unavailable=0]]]
    fro m [com.solarmetric.datasource.DataSourceImpl$SortablePool[min=3; max=10;
    size=3; taken=1]] Jun 30, 2003 3:35:21 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] executing statement <2622421>:
    [reu sed=218;params={(long)21111}] Jun 30, 2003 3:35:21 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] begin rollback
    Jun 30, 2003 3:35:21 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] end rollback 0ms Jun 30, 2003
    3:35:21 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] return
    [com.solarmetric.datasource.
    PoolConnection@19da967[identityHashCode:16658781,wrapped:com.solarmetric.dat
    asou
    rce.PreparedStatementCache$CacheAwareConnection@19da967[identityHashCode:595
    8617
    ,wrapped:oracle.jdbc.driver.OracleConnection@19da967]:
    [requests=672;size=10;max
    =70;hits=661;created=11;redundant=0;overflow=0;new=11;leaked=0;unavailable=0
    to [com.solarmetric.datasource.DataSourceImpl$SortablePool[min=3; max=10;
    size=3 ; taken=2]] Jun 30, 2003 3:35:21 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] get
    [com.solarmetric.datasource.Poo
    lConnection@19da967[identityHashCode:16658781,wrapped:com.solarmetric.dataso
    urce
    ..PreparedStatementCache$CacheAwareConnection@19da967[identityHashCode:595861
    7,wr
    apped:oracle.jdbc.driver.OracleConnection@19da967]:
    [requests=672;size=10;max=70
    ;hits=661;created=11;redundant=0;overflow=0;new=11;leaked=0;unavailable=0]]]
    fro m [com.solarmetric.datasource.DataSourceImpl$SortablePool[min=3; max=10;
    size=3; taken=1]] Jun 30, 2003 3:35:21 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] executing statement <2622421>:
    [reu sed=219;params={(long)21112}] Jun 30, 2003 3:35:21 PM
    com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] begin rollback
    Jun 30, 2003 3:35:21 PM com.solarmetric.datasource.DataSourceImpl log
    INFO: [ C:27109735; T:26117441; D:23582715 ] end rollback 0ms
    "Patrick Linskey" <[email protected]> wrote in message
    news:[email protected]...
    Are you spawning the threads, or is JUnit forking off to start the
    threads?
    I suspect that you are using junit to create the threads, and the
    classpath that the junit task is seeing does not have log4j.properties in
    the classpath.
    Can you ensure that the log4j.properties file is in the classpath that the
    threads that are logging are using?
    Alternately, configure the apace commons logging framework to use their
    built-in simple logger and configure the simple logger via its
    system-properties-based configuration capabilities.
    -Patrick
    On Fri, 27 Jun 2003 20:56:39 +0000, Damian Bradicich wrote:
    I am having a HUGE problem w/ JDO displaying every SQL INFO statement to
    the screen. I have my log4j.properties file setup as follows
    log4j.rootCategory=ERROR, console
    log4j.category.com.solarmetric.kodo.impl.jdbc.SQL=ERROR, console
    log4j.category.com.solarmetric.kodo.impl.jdbc.JDBC=ERROR, console
    log4j.category.com.solarmetric.kodo.impl.jdbc.Schema=ERROR, console
    log4j.category.com.solarmetric.kodo.Performance=ERROR, console
    log4j.category.com.solarmetric.kodo.MetaData=ERROR, console
    log4j.category.com.solarmetric.kodo.Enhance=ERROR, console
    log4j.category.com.solarmetric.kodo.Query=ERROR, console
    log4j.category.com.solarmetric.kodo.Runtime=ERROR, console
    log4j.appender.console=org.apache.log4j.ConsoleAppender
    And this works fine for a single threaded application, however if that
    application spawns any threads, those threads write everything
    imaginable
    to the screen, as though I had everything in my log4j.properties set to
    =INFO.
    This is really, really annoying for debugging purposes, I have no idea
    where to go with this
    And yes my kodo.properties file has multithreaded=true
    I am also using JUnit to run these tests, FYI
    Thanks in advance for any help--
    Patrick Linskey
    SolarMetric Inc.

  • Multitheaded app slower using libmtmalloc library

    Hi everyone.
    I am running a Java app (1.6.0_21) application on Solaris 5.10 (amd64):
    % uname -a
    SunOS frecrdqa 5.10 Generic_144489-17 i86pc i386 i86pc
    ex16067@frecrdqa:/home/ex16067 {106}
    % isainfo -v
    64-bit amd64 applications
    aes sse4.2 ssse3 popcnt tscp cx16 sse2 sse fxsr mmx cmov amd_sysc cx8
    tsc fpu 0x800000
    32-bit i386 applications
    aes sse4.2 ssse3 popcnt tscp cx16 sse2 sse fxsr mmx cmov sep cx8 tsc
    fpu 0x800000
    It is a multithreaded app and I am trying to improve performance of memory allocation using libmtmalloc,
    by setting LD_PRELOAD=/usr/lib/libmtmalloc.so
    However, the application runs a 50% slower when using libmtmalloc, and I see nothing obvious for this.
    Any idea on what could I investigate to know why libmtmalloc makes my app go slower?
    Many thanks,
    Angel

    Probably because the JVM your Java code is running under already manages multithreaded memory allocation quite well.
    By adding in libmtmalloc you made that management double-layered.
    Don't guess. Use a profiler that shows where your app is spending all its time.

  • Good book  on multithreading

    Could any one please give me suggestion on good book on multi threading with good theory. I have basic idea on Multithreading, so i would like to improve myseld on the same. Its better to give the name of the book and what the special in them.,
    I would like to prefer a book more on Multithreading with swing.
    Hope i would get good suggestion.
    thx
    lemuria.

    Surely, there are excellent books about Threads and Concurrency, but I�m gonna tell you something: everything I know about threads I learnt by researching on the internet, reading free articles and the API docs, but mainly by coding. Of course, I don�t know everything, but I think my level of understanding is good enough for what my job requires from me.
    My suggestion: to learn Threads, take a good IDE, like eclipse or netbeans, or any other that you can put breakpoints. Because if you just watch your multithreaded application running, you cannot notice in details what is really going on. Doubt those rules about Threads, see for yourself if they are really true, by putting breakpoints in strategic points of your code. When you debug your multithreaded app with breakpoints, you are able to do some things. Try breaking those laws about Threads, related to synchronization, locking, notification, etc, by executing your code line-by-line. Be curious, read articles, and check for yourself the truth about Threads.
    It�s just a suggestion. Actually, I told you my experience, the way I used to learn about Threads. Perhaps it is not the best way to learn, but for me it worked very well. Certainly if I had read a good book about Threads, I would have learnt in a shorter period, but I decided to follow the hard path of learning. So, my final suggestion is: buy a good book, and try to see for yourself the threads in action in details, like I described above.

  • How can I build multithread appliccations with forms?

    good afternoon.
    I wish to know how I can build multithread apps with forms. Is it possible? ...
    thanks forward...

    Hi Craig:
    thank you very much. To solve the mystery : ) :
    I want to drive a stepper motor with a specific frequency. To get the current degree value of the motor I would like to measure the current time (from the beginning of the move on). (With a formula I get the degree value out of the time)
    Concurrently I would like to get data from a torque sensor and from a pressure sensor. That's why I asked you about the time and the table. The measurement should start with the movement of the motor. How can I do that? Right now I have different block diagrams (different while loops) (see attachment) and I would like to put them in one.
    I haven't done the block diagram for the pressure sensor yet, so there is only the one for the torque sensor and the one for the motor.
    I also would like to set a mark in the table when the voltage value of an analog input gets under a specific threshold value. Is that possible?
    I'm sorry, I'm a novice in LabVIEW. But maybe you can help me.
    Thank you very much!
    Steffi
    Attachments:
    motor.vi ‏238 KB
    sensor.vi ‏59 KB

  • Java Swing apps cause Windows 2K to hang

    I have an IBM clone machine running a P4 and Windows 2k that hangs whenever I try to exit out of a window in a Java swing app. Whether the window is the main application window or a menu window instantiated by the application to be a child of the main window, does not matter. It hangs regardless. I have tried multithreaded apps and they do not cause my windows machine to hang. Neither do simple swing apps. But any multithreaded swing app causes it to hang. JEdit causes it. Forte causes it. I am running Java 1.4.1. Thanks for any help in this.

    Freezes under Java 1.4.1 with Windows
    Posted on Dec 14, 2002 - 02:57 PM by slava
    Installation This is turning into a FAQ, so I thought I'd post it on the community site. A lot of people have complained that jEdit can hard freeze their windows system after upgrading to Java 1.4.1. If you experience this, the problem is not with jEdit, but with your video driver. Updating the driver to the latest version should solve the problem; downgrading to Java 1.4.0 might also work.
    http://community.jedit.org/modules.php?op=modload&name=news&file=article&sid=190&mode=thread&order=0&thold=0

  • Problem with StatelessConnectionPool and Threads on Windows XP

    I am trying to use a StatelessConnectionPool in a multithreaded app under Windows using 10g. The problem is that when my application is exiting and I go to terminate the StatelessConnectionPool, I get an access violation inside Environment::terminateStatlessConnectionPool.
    A short program that demonstrates the problem is at the end of this post. One thing I have noticed is that by calling terminateConnection inside the thread instead of releaseConnection the problem goes away. However, performance really degrades. Thanks in advance.
    #include <windows.h>
    #include <occi.h>
    #include "RegisterDataMappings.h"
    #include "Consumers.h"
    #include "Thread.h"
    using namespace oracle::occi;
    Environment* env = NULL;
    StatelessConnectionPool* connPool = NULL;
    //Derived from opur Thread class
    class TestThread : public Thread
    public:
         TestThread(void){}
    protected:
         //get an object 10 times, sleeping every 500 msecs in between
         virtual DWORD run(void)
              printf("Thread 0x%08x Enter...\n", GetCurrentThreadId());
              Sleep(500);
              int i = 0;
              while(i < 10)
                   try
                        Connection* conn = connPool->getConnection();
                        Statement* stmt = conn->createStatement("select Ref(c) from consumers c where pid = 7038878582");
                        ResultSet* rs = stmt->executeQuery();
                        if(rs->next())
                             Ref<Consumers> consumer = rs->getRef(1);
                             printf("Thread 0x%08x #%d - %.0f\n", GetCurrentThreadId(), i+1, (double)consumer->getconsumerid());
                        stmt->closeResultSet(rs);
                        conn->terminateStatement(stmt);
                        connPool->releaseConnection(conn);
                        //connPool->terminateConnection(conn);
                        Sleep(500);
                        ++i;
                   catch(SQLException& sql)
                        printf("Oracle exception: %s\n", sql.getMessage().c_str());
              printf("Thread 0x%08x Leave...\n", GetCurrentThreadId());
              return 0;
    //Helper function to create a connection
    void createConnection(void)
         env = Environment::createEnvironment((Environment::Mode)(Environment::OBJECT|Environment::THREADED_MUTEXED));
         RegisterDataMappings(env);
         connPool = env->createStatelessConnectionPool("user", "pass", "orcldev", 10, 10, 0, StatelessConnectionPool::HOMOGENEOUS);
    //Helper function to terminate a connection
    void terminateConnection(void)
         env->terminateStatelessConnectionPool(connPool);
         Environment::terminateEnvironment(env);
    int main(int argc, char* argv[])
         try
              //Connect to the database
              createConnection();
              //Create 10 threads and wait for them to complete
              const int numThreads = 10;
              HANDLE handles[numThreads];
              for(int i = 0; i < numThreads; i++)
                   TestThread* thread = new TestThread;
                   thread->start();
                   handles[i] = thread->getThreadHandle();
              WaitForMultipleObjects(numThreads, handles, TRUE, INFINITE);
              //Clean up
              terminateConnection();
         catch(SQLException& sql)
              printf("SQLException caught: %s\n", sql.getMessage().c_str());
         return 0;

    When I search MetaLink for bug 4183098, it says there's nobug 4183098. Any information on this?

  • How to use a variable between interfaces or class?

    Hello All;
    Far by now I can say that the forum is very helpful for me. Thanks for all the people who have the time and generosity to help our problems. Thank you.
    Unfortunately I have a problem <Again :( >
    I want to use a variable in two different *.java files.
    Is it possible?
    The Variable i want to use is; int CiftSayisi
    The variable is declared in the CamCalib.Java under a button's Action Listener.
    Here is the code;
    public void actionPerformed(ActionEvent arg0) {
                        ImagePair.main(null);
                        String[] ImPath = list.getItems();                                           //Storing Items in an Array
                        Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();                     //Dimensions of the Screen Storing in an object
                        int ScreenHeight = dim.height;                                           //Definition ScreenHeight
                        int ScreenWidth = dim.width;                                          //Definition ScreenWidth
                        // System.out.println(ScreenHeight);                                                    //Testing of the Dimensions
                        // System.out.println(ScreenWidth);                                                     //Testing of the Dimensions
                        int CiftSayisi = ImPath.length -1 ;
                        if (CiftSayisi == 0){
                             System.out.println("Added Images do not Construct a Pair");
                        else {
    }Now i want to use it in another java file which is ImagePair.Java in the loading part of the interface;
                 setType(Type.UTILITY);
              setTitle("Image Pair Selection");
              setResizable(false);
              setAlwaysOnTop(true);
              setBounds(100, 100, 450, 68);
              contentPane = new JPanel();
              contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
              setContentPane(contentPane);
              contentPane.setLayout(null);
              textField = new JTextField();
              textField.setBounds(61, 11, 22, 20);
              textField.setEditable(false);
              textField.setEnabled(false);
              contentPane.add(textField);
              textField.setColumns(2);I have a text field in here that i need to fill with the value of CiftSayisi
    Any help please?
    ömer kaya
    METU-GGIT
    Edited by: Ömer K. on Apr 10, 2012 12:43 AM

    I didn't bother reading the code, since you didn't format it.
    But to answer your question (if I understand it correctly), yes, it is possible to pass variables between different object instances (not from an interface specifically, since interfaces don't have members). The simplest way to pass the variable as an argument to a method or constructor. If these aren't available, you could create a static global variable, though in a multithreaded app you'd have to synchronize access.

Maybe you are looking for

  • How to hide/disable Spotlight on a client by using Workgroup Manager

    Dear Apple Pro's I'm looking for a script or Policy whatever to hide/disable spotlight on a client. Iam using WGM for policy's to disable some applications, but I can not find an option disable spotlight on a client. I hide a lot directory's systemfi

  • Applying comments to multiple photos

    My apologies if this is already answered someplace; I couldn't find it when I tried searching. I'm trying to add identical comments for 169 photos at once; I have them all selected, but then the comments field is hidden in the information tab. Is the

  • What is the amount of DVDs that an iMac DVD Burner can burn? (or MTBF)

    What is the amount of DVDs that an iMac DVD Burner can burn (DVD burner life time)? (or MTBF)

  • CS5 64 bit and 32 bit versions

    Sorry if this has been asked before, but I didn't find anything when I searched. I've just bought a new 64 bit PC and intend to upgrade from CS3 to CS5. However, my laptop is 32 bit. My question is, does CS5 come with both 64 bit and 32 bit on the sa

  • Need CSS help

    I'm relatively new to CSS and stumbling around.  Can someone look at this page and tell me how to get the "more" boxes lined up in the top four white boxes? http://www.fbcwentzville.com/new_site_2010/index_new.html Would I use a relative position and