Hashtable concurrency !!!

Hai....
Hashtable is thread safe. My doubt is if we put different objects in a Hashtable, whether its possible to access different objects from same table at a time.
ie :
Hashtable table = new Hashtable();
MyClass obj1     = new MyClass();
MyClass obj2     = new MyClass();
MyClass obj3     = new MyClass();
table.put( "1", obj1);
table.put( "2", obj2);
table.put( "3", obj3);Can two threads access the table at a time safely ?
Thread--1
table.get("1");
Thread--2
table.get("2");Can thread-1 and Thread-2 run the above code safly ?
Ie : Whether the Hashtable object or objects inside the table is thread safe ?
I think you got my question.
Thanks
Nikhil.k.r

The Ht is threadsafe. That means that any of its methods can be called concurrently with any other of its methods without causing problems.
However:
* It does NOT mean the the objects inside are threadsafe. If two threads call get() at the same time, one will be blocked while until the other's get() completes. But once the get()s have completed, you're not sycned anymore, so those two threads can do whatever they want to the objects retrieved, and ther will be no protection. If you need protected, then apply propert syncing to the obejcts.
* If you're iterating over Ht's keySet(), entrySet() or values() Collection, then you have to sync around the whole iteration like so: synchronized (myHashtable) {
    Set set = entrySet();
    for (Map.Entry entry : set) {
        // do stuff with entry
} Also, you should be using HashMap rather than Hashtable, and Collections.synchronizedMap if you need synchronization.

Similar Messages

  • Performance of synchronized blocks on Linux much worse than on Windows

    Our application is a J2EE application currently deployed in WebLogic 6.1 which utilizes Oracle iFS as a content store. We access the iFS CMS through the api's provided in the cmdsk.jar. Our reference implementation has been Solaris and that's where most of our testing has been done so far. However, we recently began doing performance tests on Linux and ran into a strange problem. We found that we were not getting sufficient throughput and that this was coupled with underutilization of CPU resources on the Application Server (AS) node. With sufficient DB resources, which we had in this case, we expect to see full CPU utilization on the AS tier, so we knew something was wrong.
    A great deal of investigation revealed that all active threads were stuck at the same spot accessing an iFS cache. We found that this cache is implemented as a hashtable and accesses to hashtables are synchronized. However, we were not seeing the same problem on other platforms (Solaris and Windows) with dual CPU machines.
    In order to simplify things, we developed a test program to look at what we felt to be the root cause. This test program, which I will attach, essentially creates a hashtable then a number of threads (as specified by the user). These threads then use the hashtable.get method to access the hashtable concurrently and time how long it takes. The info is then returned at the end of the run.
    We ran a set of tests where we increased the number of threads from 1 to 100. This test was run once with Windows 2000 and once with Red Hat Linux 2.1 (kernel 2.4.9-e.12). The exact same hardware (dual 1.2 GHz PIII) was used in both cases. The results show that we were clearly able to reproduce the behaviour with this simple program. What these results show is that with one thread, access times are exactly the same for Windows and Linux. However, as we increase the number of threads, access times for Linux increase at a much greater rate than Windows. We also see underutilization of CPU resources on Linux while Windows uses all available.
    The first round of tests was run with Sun's JDK 1.3.1. We repeated the testing with 1.4.1 and found that there was no significant difference. I just tried it quickly with 1.4.2 and found the behaviour to be much the same. We also altered the program to use an unsynchronized hashmap instead of a hashtable and, as expected, performance on Linux was much better. CPU was fully utilized during the test.
    In order to determine if this was a problem "in the VM" or "in the kerenel", I tried repeating it with the JRocket VM provided by WebLogic. When running the same test with the JRocket VM, we saw performance roughly equivalent to what we saw with a hashmap and the Sun VM. That is, JRocket did not have the same problem as the Sun VM.
    So, it appears that there is something with the implementation of synchronized blocks in the Sun VM that is problematic, especially when compared to other platforms. It is likely that the problem lies in a combination of how the synchronization is implemention is based on the underlying operating system infrastructure. At this point, we don't really have a way to deal with the problem, aside from deploying multiple WebLogic nodes on the same 2 CPU physical AS node. Changes to the iFS infrastructure would help, but that's beyond our control. I've searched the bug database and have not seen mention of this problem. With the test program, it can be easily reproduced, but I wanted to run it by the folks on this list before submitting a bug.
    Thanks,
    Justin

    # File #1: Driver.java
    import java.io.*;
    import java.util.HashMap;
    import java.util.Hashtable;
    * Created on May 13, 2003
    * @author llai
    * Driver to test the access of hash table on various platforms.
    public class Driver
         public static void main(String[] args)
              * Obtain the following input values:
              * 1. Number of Elements
              *      - The number of elements in the hash table
              * 2. Size of Element
              * - The size of each element in the hash table
              * 3. Number of threads
              * - The number of concurrent threads in the test
              * 4. Focused Access
              * - Determines whether each thread access the same element or a random element
              * 5. Number of Accesses
              * - The number of accesses which each thread will complete before exiting
              * 6. Start offset
              * - The number of accesses at the beginning which will not be timed
              * 7. End offset
              * - The number of accesses at the end which will not be timed.
              * Initialize all input variables.
              * SET DEFAULT VALUES HERE...
              int numberOfElements = 10000;
              int sizeOfElement = 100;
              int numberOfThreads = 25;
              boolean focusedAccess = true;
              int numberOfAccesses = 1000000;
              int startOffset = 100000;
              int endOffset = 100000;
              boolean mapOrTable = false;
              * Input number of elements.
              try
                   BufferedReader in =
                        new BufferedReader(new InputStreamReader(System.in));
                   String tempInput;
                   boolean inputInvalid = true;
                   while (inputInvalid)
                        System.out.print(
                             "Enter a non-negative value for the number of elements to be in the hashtable: ");
                        tempInput = in.readLine();
                        if (tempInput.equals(""))
                             System.out.println("default value used.\n");
                             inputInvalid = false;
                        else
                             try
                                  numberOfElements = Integer.parseInt(tempInput);
                                  if (numberOfElements >= 0)
                                       inputInvalid = false;
                                  else
                                       System.out.println(
                                            "You entered a negative value for the number of elements. Try again.");
                             catch (NumberFormatException nfe)
                                  System.out.println(
                                       "You entered an invalid value for the number of elements. Try again.");
                   * Input size of elements.
                   inputInvalid = true;
                   while (inputInvalid)
                        System.out.print(
                             "Enter the size of each element in the hash table (ie. length of a string): ");
                        tempInput = in.readLine();
                        if (tempInput.equals(""))
                             System.out.println("default value used.\n");
                             inputInvalid = false;
                        else
                             try
                                  sizeOfElement = Integer.parseInt(tempInput);
                                  if (sizeOfElement >= 0)
                                       inputInvalid = false;
                                  else
                                       System.out.println(
                                            "You entered a negative value for the size of elements. Try again.");
                             catch (NumberFormatException nfe)
                                  System.out.println(
                                       "You entered an invalid value for the size of elements. Try again.");
                   * Input number of threads.
                   inputInvalid = true;
                   while (inputInvalid)
                        System.out.print(
                             "Enter the number of concurrent threads in the test: ");
                        tempInput = in.readLine();
                        if (tempInput.equals(""))
                             System.out.println("default value used.\n");
                             inputInvalid = false;
                        else
                             try
                                  numberOfThreads = Integer.parseInt(tempInput);
                                  if (numberOfThreads >= 0)
                                       inputInvalid = false;
                                  else
                                       System.out.println(
                                            "You entered a negative value for the number of threads. Try again.");
                             catch (NumberFormatException nfe)
                                  System.out.println(
                                       "You entered an invalid value for the number of threads. Try again.");
                   * Input focused access option.
                   inputInvalid = true;
                   while (inputInvalid)
                        System.out.print(
                             "Focused access? Determines whether each thread access the same element or a random element (y/n or blank for default): ");
                        String tempFocusedAccess = in.readLine();
                        if (tempFocusedAccess.equals("y"))
                             focusedAccess = true;
                             inputInvalid = false;
                        else if (tempFocusedAccess.equals("n"))
                             focusedAccess = false;
                             inputInvalid = false;
                        else if (tempFocusedAccess.equals(""))
                             System.out.println("default value used.\n");
                             inputInvalid = false;
                        else
                             System.out.println(
                                  "You entered an invalid input for focused access. Try again.");
                   * Input number of accesses.
                   inputInvalid = true;
                   while (inputInvalid)
                        System.out.print(
                             "Enter a non-negative value for the number of accesses each thread will complete: ");
                        tempInput = in.readLine();
                        if (tempInput.equals(""))
                             System.out.println("default value used.\n");
                             inputInvalid = false;
                        else
                             try
                                  numberOfAccesses = Integer.parseInt(tempInput);
                                  if (numberOfAccesses >= 0)
                                       inputInvalid = false;
                                  else
                                       System.out.println(
                                            "You entered a negative value for the number of accesses per thread. Try again.");
                             catch (NumberFormatException nfe)
                                  System.out.println(
                                       "You entered an invalid value for the number of accesses per thread. Try again.");
                   * Input start offset.
                   inputInvalid = true;
                   while (inputInvalid)
                        System.out.print("Enter the start offset: ");
                        tempInput = in.readLine();
                        if (tempInput.equals(""))
                             System.out.println("default value used.\n");
                             inputInvalid = false;
                        else
                             try
                                  startOffset = Integer.parseInt(tempInput);
                                  if (startOffset <= numberOfAccesses
                                       && startOffset >= 0)
                                       inputInvalid = false;
                                  else
                                       System.out.println(
                                            "You entered an invalid input for start offset. Try again.");
                             catch (NumberFormatException nfe)
                                  System.out.println(
                                       "You entered an invalid value for the start offset. Try again.");
                   * Input end offset.
                   inputInvalid = true;
                   while (inputInvalid)
                        System.out.print("Enter the end offset: ");
                        tempInput = in.readLine();
                        if (tempInput.equals(""))
                             System.out.println("default value used.\n");
                             inputInvalid = false;
                        else
                             try
                                  endOffset = Integer.parseInt(tempInput);
                                  if (endOffset <= numberOfAccesses && endOffset >= 0)
                                       inputInvalid = false;
                                  else
                                       System.out.println(
                                            "You entered an invalid input for end offset. Try again.");
                             catch (NumberFormatException nfe)
                                  System.out.println(
                                       "You entered an invalid value for the end offset. Try again.");
                   * Create a Hashtable, or a Hashmap?
                   inputInvalid = true;
                   while (inputInvalid)
                        System.out.print(
                             "Use HashMap or HashTable (enter m for HashMap, t for HashTable)? ");
                        String tempMapTable = in.readLine();
                        if (tempMapTable.equals("m"))
                             mapOrTable = true;
                             inputInvalid = false;
                        else if (tempMapTable.equals("t"))
                             mapOrTable = false;
                             inputInvalid = false;
                        else if (tempMapTable.equals(""))
                             System.out.println("default value used.\n");
                             inputInvalid = false;
                        else
                             System.out.println(
                                  "You entered an invalid input. Try again.");
              catch (IOException i)
                   System.out.println("IOException caught: " + i.getMessage());
              * End of obtaining input section. *****
              * Create a HashTable or HashMap of the size and distribution specified.
              Object hash;
              if (mapOrTable)
                   // create a HashMap
                   hash = new HashMap(numberOfElements);
              else
                   // create a HashTable
                   hash = new Hashtable(numberOfElements);
              char c[] = new char[sizeOfElement];
              for (int i = 0; i < numberOfElements; i++)
                   if (mapOrTable)
                        ((HashMap) hash).put(new Integer(i), new String(c));
                   else
                        ((Hashtable) hash).put(new Integer(i), new String(c));
              c = null; // Explicitly release c.
              * Create the specified number of threads.
              AccessorThread accessor[] = new AccessorThread[numberOfThreads];
              long seed;
              for (int i = 0; i < numberOfThreads; i++)
                   // Have a different seed for creating random number for each thread.
                   seed = System.currentTimeMillis() + 77 * i;
                   accessor[i] =
                        new AccessorThread(
                             hash,
                             numberOfElements,
                             focusedAccess,
                             numberOfAccesses,
                             startOffset,
                             endOffset,
                             seed);
                   // Start the thread.
                   accessor.start();
              * Make main wait for all threads to die before continuing.
              try
                   for (int i = 0; i < numberOfThreads; i++)
                        accessor[i].join();
              catch (InterruptedException ie)
                   System.out.println(
                        "InterruptedException caught: " + ie.getMessage());
              * Threads have now been run, so create a statistical report.
              System.out.println(
                   "The following settings were used for this test: \n"
                        + "Number of elements: "
                        + numberOfElements
                        + "\n"
                        + "Size of elements: "
                        + sizeOfElement
                        + "\n"
                        + "Number of threads: "
                        + numberOfThreads
                        + "\n"
                        + "Focused access: "
                        + focusedAccess
                        + "\n"
                        + "Number of accesses: "
                        + numberOfAccesses
                        + "\n"
                        + "Start offset: "
                        + startOffset
                        + "\n"
                        + "End offset: "
                        + endOffset);
              System.out.print("HashMap or HashTable: ");
              if (mapOrTable)
                   System.out.println("HashMap.\n");
              else
                   System.out.println("HashTable.\n");
              System.out.println("Statistic report: ");
              long avgTime;
              long avgTotalTime = 0;
              for (int i = 1; i <= numberOfThreads; i++)
                   avgTotalTime += accessor[i - 1].getAccessTime();
                   avgTime = accessor[i - 1].getAccessTime() / numberOfAccesses;
                   System.out.println(
                        "Thread "
                             + i
                             + "... "
                             + accessor[i
                             - 1].getStatus()
                             + " Total access time: "
                             + accessor[i
                             - 1].getAccessTime()
                             + " ms. Avg individual access time: "
                             + avgTime
                             + " ms.");
              avgTotalTime = avgTotalTime / numberOfThreads;
              // Make it an average over all threads.
              System.out.println(
                   "\nThe average total access time over all threads: "
                        + avgTotalTime
                        + " ms.");
    File#2: AccessorThread.java
    import java.util.Hashtable;
    import java.util.HashMap;
    import java.util.Random;
    * Created on May 13, 2003
    * @author llai
    * Threaded class that accesses a hashtable a certain number of times
    * and measures the access time for a certain number of accesses.
    public class AccessorThread extends Thread
         private Object hash;
         private int numberOfElements;
         private boolean focusedAccess;
         private int numberOfAccesses;
         private int startOffset;
         private int endOffset;
         private long seed;
         private long totalAccessTime;
         private String status;
         * Constructor
         * @param h the Hashtable or HashMap
         * @param keyToAccess the key to access for this thread
         * @param numberOfAccesses the number of access times
         * @param startOffset the start offset
         * @param endOffset the end offset
         public AccessorThread(
              Object h,
              int numberOfElements,
              boolean focusedAccess,
              int numberOfAccesses,
              int startOffset,
              int endOffset,
              long seed)
              this.hash = h;
              this.numberOfElements = numberOfElements;
              this.focusedAccess = focusedAccess;
              this.numberOfAccesses = numberOfAccesses;
              this.startOffset = startOffset;
              this.endOffset = endOffset;
              this.seed = seed;
              status = "Status: alive.";
         * @return the total access time.
         public long getAccessTime()
              return totalAccessTime;
         * @return the status of the thread.
         public String getStatus()
              return status;
         * @return the seed.
         public long getSeed()
              return seed;
         * Run method, accesses the hashtable at keyToAccess for
         * numberOfAccesses times, and measures the response time for
         * a certain number of those accesses.
         public void run()
              * Begin accessing the table, time only after startOffset accesses,
              * and only up to (numberOfAccesses - endOffset) accesses.
              * Access one value if focusedAccess on.
              * Access random values if focusedAccess off.
              Random numGenerator = new Random(seed);
              if (focusedAccess)
                   Object keyToAccess =
                        new Integer(numGenerator.nextInt(numberOfElements));
                   // Access without timing for the first startOffset accesses.
                   int i;
                   // Check if hash is a HashMap or Hashtable.
                   if (hash instanceof HashMap)
                        for (i = 0; i < startOffset; i++)
                             ((HashMap) hash).get(keyToAccess);
                        // Now start timing for the accesses.
                        long startTime = System.currentTimeMillis();
                        while (i < numberOfAccesses - endOffset)
                             ((HashMap) hash).get(keyToAccess);
                             i++;
                        long stopTime = System.currentTimeMillis();
                        totalAccessTime = stopTime - startTime;
                        // Finish accessing the remainder of endOffset times if endOffset is not >= (numberOfAccesses - startOffset).
                        while (i < numberOfAccesses)
                             ((HashMap) hash).get(keyToAccess);
                             i++;
                   else if (hash instanceof Hashtable)
                        for (i = 0; i < startOffset; i++)
                             ((Hashtable) hash).get(keyToAccess);
                        // Now start timing for the accesses.
                        long startTime = System.currentTimeMillis();
                        while (i < numberOfAccesses - endOffset)
                             ((Hashtable) hash).get(keyToAccess);
                             i++;
                        long stopTime = System.currentTimeMillis();
                        totalAccessTime = stopTime - startTime;
                        // Finish accessing the remainder of endOffset times if endOffset is not >= (numberOfAccesses - startOffset).
                        while (i < numberOfAccesses)
                             ((Hashtable) hash).get(keyToAccess);
                             i++;
              // Or else !focusedAccess, therefore access random values.
              else
                   * Get random keys to access and store in an array of Integer objects.
                   * Limit the array to 1000 integer objects.
                   int numberOfRandomInts = numberOfAccesses;
                   if (numberOfAccesses > 1000)
                        numberOfRandomInts = 1000;
                   Integer keysToAccess[] = new Integer[numberOfRandomInts];
                   for (int q = 0; q < numberOfRandomInts; q++)
                        keysToAccess[q] =
                             new Integer(numGenerator.nextInt(numberOfElements));
                   int i;
                   if (hash instanceof HashMap)
                        for (i = 0; i < startOffset; i++)
                             ((HashMap) hash).get(keysToAccess[i % numberOfRandomInts]);
                        // Now start timing for the accesses.
                        long startTime = System.currentTimeMillis();
                        while (i < numberOfAccesses - endOffset)
                             ((HashMap) hash).get(keysToAccess[i % numberOfRandomInts]);
                             i++;
                        // Stop the timing.
                        long stopTime = System.currentTimeMillis();
                        totalAccessTime = stopTime - startTime;
                        // Finish accessing the remainder of endOffset times if endOffset is not >= (numberOfAccesses - startOffset).
                        while (i < numberOfAccesses)
                             ((HashMap) hash).get(keysToAccess[i % numberOfRandomInts]);
                             i++;
                   else if (hash instanceof Hashtable)
                        for (i = 0; i < startOffset; i++)
                             ((Hashtable) hash).get(keysToAccess[i % numberOfRandomInts]);
                        // Now start timing for the accesses.
                        long startTime = System.currentTimeMillis();
                        while (i < numberOfAccesses - endOffset)
                             ((Hashtable) hash).get(keysToAccess[i % numberOfRandomInts]);
                             i++;
                        // Stop the timing.
                        long stopTime = System.currentTimeMillis();
                        totalAccessTime = stopTime - startTime;
                        // Finish accessing the remainder of endOffset times if endOffset is not >= (numberOfAccesses - startOffset).
                        while (i < numberOfAccesses)
                             ((Hashtable) hash).get(keysToAccess[i % numberOfRandomInts]);
                             i++;
              status = "Status: dead.";
    # File #3: run.sh
    echo Compiling the program...
    javac Driver.java AccessorThread.java
    export CLASSPATH=.
    echo Running the program...
    java Driver

  • Error Involving EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap

    The JVM is crashing and I am getting the following error. I am having a hard time getting started figuring out why this is happening. I am not using this method directly and am having a hard time figuring out what is leading to this. In Eclipse when I use open type the ConcurrentReaderHashMap class does not show up. Does this mean the class is coming from the JVM jar files? I am using java.util.concurrent.ConcurrentHashMap. I am wondering if it is being called from ConcurrentHashMap? When I use the Eclipse open type with ConcurrentHashMap I get two classes java.util.concurrent.ConcurrentHashMap and edu.emory.mathcs.backport.java.util.concurrent from the jar apache-activemq-4.1.1.jar. If I am correct and ConcurrentReaderHashMap is being called from ConcurrentHashMap. How can I figure out which one? I am using activemq, so if it is being called from activemq, there is little I can do from my code without taking on looking at the source from activemq. If it is from java.util.concurrent.ConcurrentHashMap, I may have more direct control. The strange thing about this is from the java doc from ConcurrentHashMap, I get the impression that thread safe iterators is one of the benefits of using ConcurrentHashMap over HashTable or Collections.synchronizedMap. Is this wrong? Any ideas you can provide me would be greatly appreciated. Thanks in Advance! The contents of the hs_err_pid file appears below:
    # An unexpected error has been detected by Java Runtime Environment:
    # SIGSEGV (0xb) at pc=0xb642e40e, pid=10152, tid=2990115744
    # Java VM: Java HotSpot(TM) Client VM (1.6.0_03-b05 mixed mode, sharing)
    # Problematic frame:
    # J EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap$HashIterator.hasNext()Z
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    --------------- T H R E A D ---------------
    Current thread (0x0813a800): JavaThread "DeployerRunnable Thread for dai-core" [_thread_in_Java, id=17757]
    siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0xc99afacf
    Registers:
    EAX=0x499afad0, EBX=0x86e6f328, ECX=0x443b6620, EDX=0x86e6f928
    ESP=0xb23972a0, EBP=0xb23972b8, ESI=0x499afad0, EDI=0x00000019
    EIP=0xb642e40e, CR2=0xc99afacf, EFLAGS=0x00210212
    Top of Stack: (sp=0xb23972a0)
    0xb23972a0: 443b6620 443b6620 b23972a8 86e6e4dc
    0xb23972b0: b23972d0 86e6ea28 b23972fc b5f2718d
    0xb23972c0: 00000000 b23972d0 86e6f910 b5f2718d
    0xb23972d0: 443b6620 00000009 498c47e0 b23972d4
    0xb23972e0: 8583aadb b239731c 858acf40 00000000
    0xb23972f0: 8583ade8 b23972d0 b239731c b2397348
    0xb2397300: b5f26edd 00000000 00000000 00000000
    0xb2397310: 00000000 443b6620 498c47e0 498c1010
    Instructions: (pc=0xb642e40e)
    0xb642e3fe: 66 90 8b 71 0c 83 fe 00 0f 84 67 00 00 00 3b 06
    0xb642e40e: 8b be ff ff ff 7f 83 ff 00 0f 85 a0 00 00 00 3b
    Stack: [0xb2348000,0xb2399000), sp=0xb23972a0, free space=316k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    J EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap$HashIterator.hasNext()Z
    j com.evermind.server.http.HttpApplication.destroyServlets()V+23
    j com.evermind.server.http.HttpApplication.destroy()V+182
    j com.evermind.server.http.HttpApplication.stopCleanUp(Ljava/util/List;)V+10
    j com.evermind.server.http.HttpApplication.componentStop(Ljava/util/List;)V+26
    j com.evermind.server.Application.doStop()V+208
    j com.evermind.server.Application.stop()V+8
    j oracle.oc4j.admin.management.mbeans.J2EEStateManageableObjectBase.stop()V+108
    j oracle.oc4j.admin.management.mbeans.J2EEApplication.stop()V+323
    v ~StubRoutines::call_stub
    V [libjvm.so+0x20bc6d]
    V [libjvm.so+0x30a828]
    V [libjvm.so+0x20bb00]
    V [libjvm.so+0x33156f]
    V [libjvm.so+0x333f6c]
    V [libjvm.so+0x277c28]
    C [libjava.so+0x15224] Java_sun_reflect_NativeMethodAccessorImpl_invoke0+0x34
    J sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    J sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    J sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    J java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    j sun.reflect.misc.Trampoline.invoke(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+3
    j sun.reflect.GeneratedMethodAccessor40.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+40
    J sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    J java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    j sun.reflect.misc.MethodUtil.invoke(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+63
    j javax.management.modelmbean.RequiredModelMBean.invokeMethod(Ljava/lang/String;Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+11
    j javax.management.modelmbean.RequiredModelMBean.invoke(Ljava/lang/String;[Ljava/lang/Object;[Ljava/lang/String;)Ljava/lang/Object;+657
    j oracle.oc4j.admin.jmx.server.mbeans.model.DefaultModelMBeanImpl.invoke(Ljava/lang/String;[Ljava/lang/Object;[Ljava/lang/String;)Ljava/lang/Object;+65
    j com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Ljavax/management/ObjectName;Ljava/lang/String;[Ljava/lang/Object;[Ljava/lang/String;)Ljava/lang/Object;+28
    j com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Ljavax/management/ObjectName;Ljava/lang/String;[Ljava/lang/Object;[Ljava/lang/String;)Ljava/lang/Object;+13
    j oracle.oc4j.admin.jmx.server.state.ApplicationStateFilterMBeanServer.invoke(Ljavax/management/ObjectName;Ljava/lang/String;[Ljava/lang/Object;[Ljava/lang/String;)Ljava/lang/Object;+14
    j oracle.oc4j.admin.internal.ApplicationDeployer.stopApplication()V+45
    j oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(Z)Z+93
    j oracle.oc4j.admin.internal.DeployerBase.execute(Z)Ljava/util/Map;+58
    j oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun()V+47
    j oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run()V+53
    J com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run()V
    j java.lang.Thread.run()V+11
    v ~StubRoutines::call_stub
    V [libjvm.so+0x20bc6d]
    V [libjvm.so+0x30a828]
    V [libjvm.so+0x20b580]
    V [libjvm.so+0x20b60d]
    V [libjvm.so+0x27b845]
    V [libjvm.so+0x384190]
    V [libjvm.so+0x30b719]
    C [libpthread.so.0+0x53cc]
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    =>0x0813a800 JavaThread "DeployerRunnable Thread for dai-core" [_thread_in_Java, id=17757]
    0x08137c00 JavaThread "EventManager::oc4j-128.115.222.7-23943-default" daemon [_thread_blocked, id=17756]
    0x08137000 JavaThread "Thread-102039" [_thread_blocked, id=17754]
    0xb1101400 JavaThread "ActiveMQ Session Task" daemon [_thread_blocked, id=17740]
    0x082d7400 JavaThread "MetricCollector:METRICCOLL50:5" daemon [_thread_blocked, id=17725]
    0x081c8800 JavaThread "RMICallHandler-12" [_thread_blocked, id=17716]
    0x081c8400 JavaThread "RMICallHandler-11" [_thread_blocked, id=17715]
    0x08191400 JavaThread "RMICallHandler-10" [_thread_blocked, id=17701]
    0xb359a800 JavaThread "RMIConnectionThread" [_thread_in_native, id=10419]
    0x080dd800 JavaThread "TimerThread300000" daemon [_thread_blocked, id=10399]
    0x08288400 JavaThread "CacheManager" daemon [_thread_blocked, id=10398]
    0x08268000 JavaThread "RMIConnectionThread" [_thread_in_native, id=10387]
    0xb355e000 JavaThread "EmChartCacheWorker" daemon [_thread_blocked, id=10386]
    0x0811c800 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10328]
    0x0811b800 JavaThread "Thread-93" daemon [_thread_in_native, id=10327]
    0x0810f400 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10326]
    0x08100c00 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10324]
    0xb50bc000 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10322]
    0xb5267400 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10320]
    0x081b6800 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10318]
    0xb5224800 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10314]
    0x081a7c00 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10313]
    0xb35fec00 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10310]
    0x08198c00 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10308]
    0xb4cec800 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10306]
    0xb522e400 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10304]
    0x08188800 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10302]
    0xb4d2e800 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10301]
    0x0816e000 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10298]
    0xb4b4e400 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10297]
    0xb52f8c00 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10294]
    0xb50aa000 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10292]
    0xb4b46800 JavaThread "DestroyJavaVM" [_thread_blocked, id=10153]
    0xb35ffc00 JavaThread "TaskManager" [_thread_blocked, id=10291]
    0x081ce400 JavaThread "Timer-18" [_thread_blocked, id=10288]
    0xb35fd000 JavaThread "Timer-17" [_thread_blocked, id=10287]
    0xb35f1800 JavaThread "Timer-16" [_thread_blocked, id=10286]
    0xb3539400 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10285]
    0xb35acc00 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10282]
    0xb35ba400 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10280]
    0xb3cb7c00 JavaThread "Timer-15" [_thread_blocked, id=10278]
    0xb35cac00 JavaThread "Timer-14" [_thread_blocked, id=10275]
    0xb35ce000 JavaThread "Timer-13" [_thread_blocked, id=10274]
    0xb35b5c00 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10273]
    0xb35bc400 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10271]
    0xb35be800 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10269]
    0xb3997800 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10266]
    0xb359bc00 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10264]
    0xb353d800 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10262]
    0xb39a1400 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10260]
    0xb3996c00 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10258]
    0xb359d400 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10256]
    0xb358c000 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10254]
    0xb3542800 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10252]
    0xb355ec00 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10250]
    0xb359e000 JavaThread "Timer-12" [_thread_blocked, id=10247]
    0xb35a5000 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10246]
    0xb35a0800 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10244]
    0xb35a2000 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10242]
    0xb3596c00 JavaThread "Timer-11" [_thread_blocked, id=10239]
    0xb3596000 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10238]
    0xb359c400 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10236]
    0xb3595800 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10234]
    0xb357fc00 JavaThread "Timer-10" [_thread_blocked, id=10231]
    0xb357f800 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10230]
    0xb357d400 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10228]
    0xb3579000 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10226]
    0xb353f800 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10223]
    0xb3543400 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10221]
    0xb353ec00 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10219]
    0xb3552400 JavaThread "Timer-9" [_thread_blocked, id=10217]
    0xb3550800 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10215]
    0xb355c800 JavaThread "Thread-30" daemon [_thread_in_native, id=10214]
    0xb3544800 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10212]
    0xb3548400 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10209]
    0xb3547800 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10207]
    0xb354f800 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10205]
    0xb354e800 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10203]
    0xb399fc00 JavaThread "Thread-23" daemon [_thread_in_native, id=10200]
    0xb3920000 JavaThread "Timer-8" [_thread_blocked, id=10197]
    0xb391e400 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10196]
    0xb3916000 JavaThread "Thread-19" daemon [_thread_in_native, id=10195]
    0xb3915400 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10194]
    0xb49f1800 JavaThread "ActiveMQ Transport: tcp://dai3/128.115.222.163:61616" [_thread_in_native, id=10192]
    0xb4036800 JavaThread "Timer-7" [_thread_blocked, id=10189]
    0xb5225800 JavaThread "Timer-6" [_thread_blocked, id=10188]
    0xb4d23800 JavaThread "SystemThreadGroup-6" [_thread_in_native, id=10187]
    0xb4014800 JavaThread "SystemThreadGroup-5" [_thread_in_native, id=10186]
    0xb49f8400 JavaThread "SystemThreadGroup-4" [_thread_blocked, id=10185]
    0xb4d27c00 JavaThread "Timer-5" [_thread_blocked, id=10184]
    0xb49ff400 JavaThread "Timer-4" [_thread_blocked, id=10183]
    0xb50e2800 JavaThread "Timer-3" [_thread_blocked, id=10182]
    0xb49ea000 JavaThread "Timer-1" daemon [_thread_blocked, id=10180]
    0xb49a4c00 JavaThread "WorkExecutorWorkerThread-1" daemon [_thread_blocked, id=10179]
    0xb499ec00 JavaThread "Thread-8" daemon [_thread_blocked, id=10178]
    0xb496a400 JavaThread "Timer-0" [_thread_blocked, id=10176]
    0xb4d32c00 JavaThread "AWT-XAWT" daemon [_thread_in_native, id=10175]
    0xb501cc00 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=10174]
    0xb4941c00 JavaThread "RMIServer [0.0.0.0:23943] count:1" [_thread_in_native, id=10173]
    0xb4b4d800 JavaThread "RMIServer [0.0.0.0:23791] count:1" [_thread_in_native, id=10172]
    0xb501ac00 JavaThread "JMSServer[salsa:9127]" [_thread_in_native, id=10171]
    0x0837d800 JavaThread "WsMgmtWorkScheduler" daemon [_thread_blocked, id=10170]
    0x08360400 JavaThread "WsMgmtWorkScheduler" daemon [_thread_blocked, id=10169]
    0x08324400 JavaThread "Timer ServiceThread" [_thread_blocked, id=10168]
    0x08368c00 JavaThread "Scheduler ServiceThread" [_thread_blocked, id=10167]
    0x0835b000 JavaThread "Event ServiceThread" [_thread_blocked, id=10166]
    0x0830a800 JavaThread "LogFlusher" daemon [_thread_blocked, id=10164]
    0x0830dc00 JavaThread "LogFlusher" daemon [_thread_blocked, id=10163]
    0x0830f400 JavaThread "LogFlusher" daemon [_thread_blocked, id=10162]
    0x0808c800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=10159]
    0x0808b000 JavaThread "CompilerThread0" daemon [_thread_blocked, id=10158]
    0x08089c00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=10157]
    0x08081800 JavaThread "Finalizer" daemon [_thread_blocked, id=10156]
    0x08080400 JavaThread "Reference Handler" daemon [_thread_blocked, id=10155]
    Other Threads:
    0x0807f000 VMThread [id=10154]
    0x0808e400 WatcherThread [id=10160]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 3648K, used 1498K [0x442a0000, 0x44690000, 0x49160000)
    eden space 3264K, 34% used [0x442a0000, 0x443b6b80, 0x445d0000)
    from space 384K, 100% used [0x445d0000, 0x44630000, 0x44630000)
    to space 384K, 0% used [0x44630000, 0x44630000, 0x44690000)
    tenured generation total 43488K, used 19246K [0x49160000, 0x4bbd8000, 0x842a0000)
    the space 43488K, 44% used [0x49160000, 0x4a42b9d8, 0x4a42ba00, 0x4bbd8000)
    compacting perm gen total 48640K, used 48465K [0x842a0000, 0x87220000, 0x942a0000)
    the space 48640K, 99% used [0x842a0000, 0x871f4458, 0x871f4600, 0x87220000)
    ro space 8192K, 73% used [0x942a0000, 0x94882560, 0x94882600, 0x94aa0000)
    rw space 12288K, 58% used [0x94aa0000, 0x95197448, 0x95197600, 0x956a0000)
    Dynamic libraries:
    0014e000-00156000 r-xp 00000000 08:01 91357260 /lib/tls/librt-2.3.4.so
    00156000-00157000 r-xp 00007000 08:01 91357260 /lib/tls/librt-2.3.4.so
    00157000-00158000 rwxp 00008000 08:01 91357260 /lib/tls/librt-2.3.4.so
    00158000-00162000 rwxp 00158000 00:00 0
    0028b000-002a1000 r-xp 00000000 08:01 91357186 /lib/ld-2.3.4.so
    002a1000-002a2000 r-xp 00015000 08:01 91357186 /lib/ld-2.3.4.so
    002a2000-002a3000 rwxp 00016000 08:01 91357186 /lib/ld-2.3.4.so
    002a5000-003cb000 r-xp 00000000 08:01 91357199 /lib/tls/libc-2.3.4.so
    003cb000-003cd000 r-xp 00125000 08:01 91357199 /lib/tls/libc-2.3.4.so
    003cd000-003cf000 rwxp 00127000 08:01 91357199 /lib/tls/libc-2.3.4.so
    003cf000-003d1000 rwxp 003cf000 00:00 0
    003d3000-003f4000 r-xp 00000000 08:01 91357212 /lib/tls/libm-2.3.4.so
    003f4000-003f5000 r-xp 00020000 08:01 91357212 /lib/tls/libm-2.3.4.so
    003f5000-003f6000 rwxp 00021000 08:01 91357212 /lib/tls/libm-2.3.4.so
    003f8000-003fa000 r-xp 00000000 08:01 91357214 /lib/libdl-2.3.4.so
    003fa000-003fb000 r-xp 00001000 08:01 91357214 /lib/libdl-2.3.4.so
    003fb000-003fc000 rwxp 00002000 08:01 91357214 /lib/libdl-2.3.4.so
    00501000-0050f000 r-xp 00000000 08:01 91357218 /lib/tls/libpthread-2.3.4.so
    0050f000-00510000 r-xp 0000d000 08:01 91357218 /lib/tls/libpthread-2.3.4.so
    00510000-00511000 rwxp 0000e000 08:01 91357218 /lib/tls/libpthread-2.3.4.so
    00511000-00513000 rwxp 00511000 00:00 0
    00623000-00632000 r-xp 00000000 08:01 91357234 /lib/libresolv-2.3.4.so
    00632000-00633000 r-xp 0000f000 08:01 91357234 /lib/libresolv-2.3.4.so
    00633000-00634000 rwxp 00010000 08:01 91357234 /lib/libresolv-2.3.4.so
    00634000-00636000 rwxp 00634000 00:00 0
    00820000-00827000 r-xp 00000000 08:01 68757852 /usr/X11R6/lib/libXi.so.6.0
    00827000-00828000 rwxp 00006000 08:01 68757852 /usr/X11R6/lib/libXi.so.6.0
    0083b000-00848000 r-xp 00000000 08:01 68759646 /usr/X11R6/lib/libXext.so.6.4
    00848000-00849000 rwxp 0000c000 08:01 68759646 /usr/X11R6/lib/libXext.so.6.4
    00870000-00877000 r-xp 00000000 08:01 68763552 /usr/X11R6/lib/libXrender.so.1.2.2
    00877000-00878000 rwxp 00006000 08:01 68763552 /usr/X11R6/lib/libXrender.so.1.2.2
    008b6000-008be000 r-xp 00000000 08:01 68763554 /usr/X11R6/lib/libXcursor.so.1.0.2
    008be000-008bf000 rwxp 00007000 08:01 68763554 /usr/X11R6/lib/libXcursor.so.1.0.2
    008e3000-009be000 r-xp 00000000 08:01 68758178 /usr/X11R6/lib/libX11.so.6.2
    009be000-009c2000 rwxp 000db000 08:01 68758178 /usr/X11R6/lib/libX11.so.6.2
    00b0a000-00b0e000 r-xp 00000000 08:01 68756642 /usr/X11R6/lib/libXtst.so.6.1
    00b0e000-00b0f000 rwxp 00003000 08:01 68756642 /usr/X11R6/lib/libXtst.so.6.1
    00c3e000-00c50000 r-xp 00000000 08:01 91357258 /lib/libnsl-2.3.4.so
    00c50000-00c51000 r-xp 00011000 08:01 91357258 /lib/libnsl-2.3.4.so
    00c51000-00c52000 rwxp 00012000 08:01 91357258 /lib/libnsl-2.3.4.so
    00c52000-00c54000 rwxp 00c52000 00:00 0
    06000000-06417000 r-xp 00000000 08:01 98304002 /u01/app/java/jdk1.6.0_03/jre/lib/i386/client/libjvm.so
    06417000-06430000 rwxp 00417000 08:01 98304002 /u01/app/java/jdk1.6.0_03/jre/lib/i386/client/libjvm.so
    06430000-0684f000 rwxp 06430000 00:00 0
    08048000-08052000 r-xp 00000000 08:01 98320386 /u01/app/java/jdk1.6.0_03/bin/java
    08052000-08053000 rwxp 00009000 08:01 98320386 /u01/app/java/jdk1.6.0_03/bin/java
    08053000-0877f000 rwxp 08053000 00:00 0
    442a0000-44690000 rwxp 442a0000 00:00 0
    44690000-49160000 rwxp 44690000 00:00 0
    49160000-4bbd8000 rwxp 49160000 00:00 0
    4bbd8000-842a0000 rwxp 4bbd8000 00:00 0
    842a0000-87220000 rwxp 842a0000 00:00 0
    87220000-942a0000 rwxp 87220000 00:00 0
    942a0000-94883000 r-xs 00001000 08:01 98304677 /u01/app/java/jdk1.6.0_03/jre/lib/i386/client/classes.jsa
    94883000-94aa0000 rwxp 94883000 00:00 0
    94aa0000-95198000 rwxp 005e4000 08:01 98304677 /u01/app/java/jdk1.6.0_03/jre/lib/i386/client/classes.jsa
    95198000-956a0000 rwxp 95198000 00:00 0
    956a0000-95779000 rwxp 00cdc000 08:01 98304677 /u01/app/java/jdk1.6.0_03/jre/lib/i386/client/classes.jsa
    95779000-95aa0000 rwxp 95779000 00:00 0
    95aa0000-95aa4000 r-xs 00db5000 08:01 98304677 /u01/app/java/jdk1.6.0_03/jre/lib/i386/client/classes.jsa
    95aa4000-95ea0000 rwxp 95aa4000 00:00 0
    b0b49000-b0b5e000 r-xp 00000000 08:01 98287757 /u01/app/java/jdk1.6.0_03/jre/lib/i386/libdcpr.so
    b0b5e000-b0b71000 rwxp 00014000 08:01 98287757 /u01/app/java/jdk1.6.0_03/jre/lib/i386/libdcpr.so
    b0f00000-b0f50000 rwxp b0f00000 00:00 0
    b0f50000-b1000000 ---p b0f50000 00:00 0
    b1100000-b11fd000 rwxp b1100000 00:00 0
    b11fd000-b1200000 ---p b11fd000 00:00 0
    b1226000-b122b000 r-xs 0002f000 08:01 98533404 /u01/app/oc4j/oc4j-10.1.3.3.0/j2ee/home/applications/dai-core/dai-core-pre1.1/WEB-INF/lib/dai-core-pre1.1.jar
    b122b000-b122d000 r-xs 0001a000 08:01 98533399 /u01/app/oc4j/oc4j-10.1.3.3.0/j2ee/home/applications/dai-core/dai-core-pre1.1/WEB-INF/lib/commons-modeler-2.0.1.jar
    b122d000-b122f000 r-xs 0000a000 08:01 98533396 /u01/app/oc4j/oc4j-10.1.3.3.0/j2ee/home/applications/dai-core/dai-core-pre1.1/WEB-INF/lib/commons-codec-1.3.jar
    b122f000-b1233000 r-xs 00031000 08:01 98533394 /u01/app/oc4j/oc4j-10.1.3.3.0/j2ee/home/applications/dai-core/dai-core-pre1.1/WEB-INF/lib/ciacCommmon-1.1.jar
    b1233000-b1234000 r-xs 00000000 08:01 98533393 /u01/app/oc4j/oc4j-10.1.3.3.0/j2ee/home/applications/dai-core/dai-core-pre1.1/WEB-INF/lib/ciac-bloomdex.jar
    b1234000-b1236000 r-xs 00001000 08:01 98533414 /u01/app/oc4j/oc4j-10.1.3.3.0/j2ee/home/applications/dai-core/dai-core-pre1.1/WEB-INF/lib/slf4j-api-1.1.0.jar
    b1236000-b1241000 r-xs 00073000 08:01 98533409 /u01/app/oc4j/oc4j-10.1.3.3.0/j2ee/home/applications/dai-core/dai-core-pre1.1/WEB-INF/lib/jsp-api-2.1.jar
    b1241000-b1242000 r-xs 00001000 08:01 98533415 /u01/app/oc4j/oc4j-10.1.3.3.0/j2ee/home/applications/dai-core/dai-core-pre1.1/WEB-INF/lib/slf4j-log4j12-1.1.0.jar
    b1242000-b1249000 r-xs 00053000 08:01 98533410 /u01/app/oc4j/oc4j-10.1.3.3.0/j2ee/home/applications/dai-core/dai-core-pre1.1/WEB-INF/lib/log4j-1.2.14.jar
    b1249000-b124e000 r-xs 00040000 08:01 98533397 /u01/app/oc4j/oc4j-10.1.3.3.0/j2ee/home/applications/dai-core/dai-core-pre1.1/WEB-INF/lib/commons-httpclient-3.0.1.jar
    b124e000-b1265000 r-xs 00112000 08:01 98533418 /u01/app/oc4j/oc4j-10.1.3.3.0/j2ee/home/applications/dai-core/dai-core-pre1.1/WEB-INF/lib/xercesImpl-2.8.1.jar
    b1265000-b1268000 rwxp b1265000 00:00 0
    b1268000-b12b6000 rwxp b1268000 00:00 0
    b12b6000-b12b9000 rwxp b12b6000 00:00 0
    b12b9000-b1307000 rwxp b12b9000 00:00 0
    b1307000-b130a000 ---p b1307000 00:00 0
    b130a000-b1358000 rwxp b130a000 00:00 0
    b1358000-b135b000 rwxp b1358000 00:00 0
    b135b000-b13a9000 rwxp b135b000 00:00 0
    b13a9000-b13ac000 rwxp b13a9000 00:00 0
    b13ac000-b13fa000 rwxp b13ac000 00:00 0
    b13fa000-b13fd000 rwxp b13fa000 00:00 0
    b13fd000-b144b000 rwxp b13fd000 00:00 0
    b144b000-b144e000 rwxp b144b000 00:00 0
    b144e000-b149c000 rwxp b144e000 00:00 0
    b149c000-b149f000 rwxp b149c000 00:00 0
    b149f000-b14ed000 rwxp b149f000 00:00 0
    b14ed000-b14f0000 ---p b14ed000 00:00 0
    b14f0000-b153e000 rwxp b14f0000 00:00 0
    b153e000-b1541000 ---p b153e000 00:00 0
    b1541000-b158f000 rwxp b1541000 00:00 0
    b158f000-b1592000 ---p b158f000 00:00 0
    b1592000-b15e0000 rwxp b1592000 00:00 0
    b15e0000-b15e3000 rwxp b15e0000 00:00 0
    b15e3000-b1631000 rwxp b15e3000 00:00 0
    b1631000-b1634000 ---p b1631000 00:00 0
    b1634000-b1682000 rwxp b1634000 00:00 0
    b1682000-b1685000 rwxp b1682000 00:00 0
    b1685000-b16d3000 rwxp b1685000 00:00 0
    b16d3000-b16d6000 ---p b16d3000 00:00 0
    b16d6000-b1724000 rwxp b16d6000 00:00 0
    b1724000-b1727000 rwxp b1724000 00:00 0
    b1727000-b1775000 rwxp b1727000 00:00 0
    b1775000-b1778000 ---p b1775000 00:00 0
    b1778000-b17c6000 rwxp b1778000 00:00 0
    b17c6000-b17c9000 ---p b17c6000 00:00 0
    b17c9000-b1817000 rwxp b17c9000 00:00 0
    b1817000-b181a000 rwxp b1817000 00:00 0
    b181a000-b1868000 rwxp b181a000 00:00 0
    b1868000-b186b000 rwxp b1868000 00:00 0
    b186b000-b18b9000 rwxp b186b000 00:00 0
    b18b9000-b18bc000 ---p b18b9000 00:00 0
    b18bc000-b190a000 rwxp b18bc000 00:00 0
    b190a000-b190d000 ---p b190a000 00:00 0
    b190d000-b195b000 rwxp b190d000 00:00 0
    b195b000-b195e000 rwxp b195b000 00:00 0
    b195e000-b19ac000 rwxp b195e000 00:00 0
    b19ac000-b19af000 rwxp b19ac000 00:00 0
    b19af000-b19fd000 rwxp b19af000 00:00 0
    b19fd000-b1a00000 ---p b19fd000 00:00 0
    b1a00000-b1a4e000 rwxp b1a00000 00:00 0
    b1a4e000-b1a51000 rwxp b1a4e000 00:00 0
    b1a51000-b1a9f000 rwxp b1a51000 00:00 0
    b1a9f000-b1aa2000 ---p b1a9f000 00:00 0
    b1aa2000-b1af0000 rwxp b1aa2000 00:00 0
    b1af0000-b1af3000 rwxp b1af0000 00:00 0
    b1af3000-b1b41000 rwxp b1af3000 00:00 0
    b1b41000-b1b44000 ---p b1b41000 00:00 0
    b1b44000-b1b92000 rwxp b1b44000 00:00 0
    b1b92000-b1b95000 rwxp b1b92000 00:00 0
    b1b95000-b1be3000 rwxp b1b95000 00:00 0
    b1be3000-b1be6000 ---p b1be3000 00:00 0
    b1be6000-b1c34000 rwxp b1be6000 00:00 0
    b1c34000-b1c37000 rwxp b1c34000 00:00 0
    b1c37000-b1c85000 rwxp b1c37000 00:00 0
    b1c85000-b1c88000 ---p b1c85000 00:00 0
    b1c88000-b1cd6000 rwxp b1c88000 00:00 0
    b1cd6000-b1cd9000 ---p b1cd6000 00:00 0
    b1cd9000-b1d27000 rwxp b1cd9000 00:00 0
    b1d27000-b1d2a000 rwxp b1d27000 00:00 0
    b1d2a000-b1d78000 rwxp b1d2a000 00:00 0
    b1d78000-b1d7b000 rwxp b1d78000 00:00 0
    b1d7b000-b1dc9000 rwxp b1d7b000 00:00 0
    b1dc9000-b1dcc000 ---p b1dc9000 00:00 0
    b1dcc000-b1e1a000 rwxp b1dcc000 00:00 0
    b1e1a000-b1e1d000 ---p b1e1a000 00:00 0
    b1e1d000-b1e6b000 rwxp b1e1d000 00:00 0
    b1e6b000-b1e6e000 rwxp b1e6b000 00:00 0
    b1e6e000-b1ebc000 rwxp b1e6e000 00:00 0
    b1ebc000-b1ebf000 ---p b1ebc000 00:00 0
    b1ebf000-b1f0d000 rwxp b1ebf000 00:00 0
    b1f0d000-b1f10000 rwxp b1f0d000 00:00 0
    b1f10000-b1f5e000 rwxp b1f10000 00:00 0
    b1f5e000-b1f61000 rwxp b1f5e000 00:00 0
    b1f61000-b1faf000 rwxp b1f61000 00:00 0
    b1faf000-b1fb2000 ---p b1faf000 00:00 0
    b1fb2000-b2022000 rwxp b1fb2000 00:00 0
    b2022000-b2100000 ---p b2022000 00:00 0
    b2111000-b2114000 ---p b2111000 00:00 0
    b2114000-b2162000 rwxp b2114000 00:00 0
    b2162000-b2165000 ---p b2162000 00:00 0
    b2165000-b21b3000 rwxp b2165000 00:00 0
    b21b3000-b21b6000 ---p b21b3000 00:00 0
    b21b6000-b2204000 rwxp b21b6000 00:00 0
    b2204000-b2207000 rwxp b2204000 00:00 0
    b2207000-b2255000 rwxp b2207000 00:00 0
    b2255000-b2258000 ---p b2255000 00:00 0
    b2258000-b22a6000 rwxp b2258000 00:00 0
    b22a6000-b22a9000 rwxp b22a6000 00:00 0
    b22a9000-b22f7000 rwxp b22a9000 00:00 0
    b22f7000-b22fa000 ---p b22f7000 00:00 0
    b22fa000-b2348000 rwxp b22fa000 00:00 0
    b2348000-b234b000 ---p b2348000 00:00 0
    b234b000-b2399000 rwxp b234b000 00:00 0
    b2399000-b239c000 ---p b2399000 00:00 0
    b239c000-b23ea000 rwxp b239c000 00:00 0
    b23ea000-b23ed000 rwxp b23ea000 00:00 0
    b23ed000-b243b000 rwxp b23ed000 00:00 0
    b243b000-b243e000 ---p b243b000 00:00 0
    b243e000-b248c000 rwxp b243e000 00:00 0
    b248c000-b248f000 ---p b248c000 00:00 0
    b248f000-b24dd000 rwxp b248f000 00:00 0
    b24dd000-b24e0000 ---p b24dd000 00:00 0
    b24e0000-b252e000 rwxp b24e0000 00:00 0
    b252e000-b2531000 ---p b252e000 00:00 0
    b2531000-b257f000 rwxp b2531000 00:00 0
    b257f000-b2582000 ---p b257f000 00:00 0
    b2582000-b25d0000 rwxp b2582000 00:00 0
    b25d0000-b25d3000 ---p b25d0000 00:00 0
    b25d3000-b2621000 rwxp b25d3000 00:00 0
    b2621000-b2624000 ---p b2621000 00:00 0
    b2624000-b2672000 rwxp b2624000 00:00 0
    b2672000-b2675000 ---p b2672000 00:00 0
    b2675000-b26c3000 rwxp b2675000 00:00 0
    b26c3000-b26c6000 rwxp b26c3000 00:00 0
    b26c6000-b2714000 rwxp b26c6000 00:00 0
    b2714000-b2717000 ---p b2714000 00:00 0
    b2717000-b2765000 rwxp b2717000 00:00 0
    b2765000-b2768000 ---p b2765000 00:00 0
    b2768000-b27b6000 rwxp b2768000 00:00 0
    b27b6000-b27b9000 ---p b27b6000 00:00 0
    b27b9000-b2807000 rwxp b27b9000 00:00 0
    b2807000-b280a000 ---p b2807000 00:00 0
    b280a000-b2858000 rwxp b280a000 00:00 0
    b2858000-b285b000 ---p b2858000 00:00 0
    b285b000-b28a9000 rwxp b285b000 00:00 0
    b28a9000-b28ac000 ---p b28a9000 00:00 0
    b28ac000-b28fa000 rwxp b28ac000 00:00 0
    b28fa000-b28fd000 ---p b28fa000 00:00 0
    b28fd000-b294b000 rwxp b28fd000 00:00 0
    b294b000-b294e000 ---p b294b000 00:00 0
    b294e000-b299c000 rwxp b294e000 00:00 0
    b299c000-b299f000 ---p b299c000 00:00 0
    b299f000-b29ed000 r

    I found ConcurrentReaderHashMap in one of the jar files included with oc4j, j2ee/home/lib/concurrent.jar. So, it looks like it comes from one of the jars for Oracle's oc4j implementation. This is an error that occurs intermittently when stopping oc4j or when reinstalling an application. So, it looks like it is an error that I should report to Oracle. Correct? Or is there something in my code that is likely causing this error? I am running this under the 1.6.0_03 JVM. Is there an incompatibility in the oswego package with 1.6?

  • A question about concurrency and static getter methods

    Hello
    I have a class with some static methods. they just return a reference and doesnt apply any changes.
    something like this:
    public class FieldMapper {
            private static Map<Class,Map<String,String>> fieldMap = new HashMap<Class,Map<String,String>>();
            public static getFields(Class clazz){
                  return fieldMap.get(clazz);
    }my question is, let's consider many users connect to my server and each has its own session, now assume one user want to use FieldMapper.getFields(User.class) and another is going to call FieldMapper.getFields(Employee.class) at same time or a bit milli seconds after, and this method is not synchronized, is there any conflict in calling the method? would this method return wrong reference to the first invocation?
    in genereal, may the concurrency make problem on reading resources? or just on changing resources?
    Thank you very much in advance.

    To publish an object safely, both the reference to the object and the object's state must be made visible to other threads at the same time. A properly constructed object can be safely published by:
    Initializing an object reference from a static initializer;
    Storing a reference to it into a volatile field or AtomicReference;
    Storing a reference to it into a final field of a properly constructed object; or
    Storing a reference to it into a field that is properly guarded by a lock. The internal synchronization in thread-safe collections means that placing an object in a thread-safe collection, such as a Vector or synchronizedList, fulfills the last of these requirements. If thread A places object X in a thread-safe collection and thread B subsequently retrieves it, B is guaranteed to see the state of X as A left it, even though the application code that hands X off in this manner has no explicit synchronization.
    Now in the case you have specified you are using HashMap. Which is not designed to be threadsafe as opposed to HashTable or concurrentHashMap. In such a case I would advise against using this. The concurrency problem is caused by race conditions on mutable objects, whether it is reading or writing. If it is mutable, it is susceptible to race conditions. IMHO
    &spades;

  • Need to call OAF API from JAVA concurrent program

    Hi Gurus,
    I am trying invoke an OAF Application method which generate the Batch ID. I am trying the invoke the same from JAVA Concurrent program. Below is teh code used,
    package oracle.apps.ego.item.cp;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import oracle.apps.ego.item.common.server.EgoBatchHeader;
    import oracle.apps.ego.item.itemimport.server.EgoImportBatchHeaderAMImpl;
    import oracle.apps.fnd.cp.request.CpContext;
    import oracle.apps.fnd.cp.request.JavaConcurrentProgram;
    import oracle.apps.fnd.cp.request.LogFile;
    import oracle.apps.fnd.cp.request.OutFile;
    import oracle.apps.fnd.cp.request.ReqCompletion;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.ApplicationModuleCreateException;
    import oracle.jbo.ApplicationModuleHome;
    import oracle.jbo.JboContext;
    import oracle.jbo.domain.Number;
    import oracle.jdbc.internal.OracleCallableStatement;
    public class XX_EGO_BATCH_CREATE implements JavaConcurrentProgram {
    static LogFile log = null;
    public void runProgram(CpContext ctx){
    //Obtain the reference to the Output file for Concurrent Prog
    OutFile out = ctx.getOutFile();
    EgoBatchHeader v_header = new EgoBatchHeader();
    //Obtain the reference to the Log file for Concurrent Prog
    log = ctx.getLogFile();
    log.writeln("Batch Number Creation", 0);
    ApplicationModule am = null;
    try{
    //Write your logic here
    log.writeln("Batch Number Creation", 0);
    log.writeln("definition of batch num",0);
    Number batch_num;
    Number ssid = new Number(10000);
    String jdbcUrl =
    "jdbc:oracle:thin:apps/[email protected]:10201:ARERP4";
    ApplicationModule am_Member = null;
    log.writeln("Before Calling Create method",0);
    am_Member =
    create("oracle.apps.ego.item.itemimport.server.EgoImportBatchHeaderAMImpl",
    jdbcUrl);
    log.writeln("assigning ssid"+ssid,0);
    EgoImportBatchHeaderAMImpl bheader = new EgoImportBatchHeaderAMImpl();
    log.writeln("bheader object is :"+bheader,0);
    log.writeln("calling getBatchObjectForCreate"+bheader,0);
    v_header = bheader.getBatchObjectForCreate(ssid);
    //System.out.println("v_header is :" + v_head);
    log.writeln("calling createBatch"+v_header,0);
    batch_num = bheader.createBatch(v_header);
    log.writeln("Batch Number is :"+batch_num ,0);
    out.writeln("This will be printed to the Output File");
    log.writeln("This will be printed to the Log File", 0);
    //Request the completion of this Concurrent Prog
    //This step will signal the end of execution of your Concurrent Prog
    ctx.getReqCompletion().setCompletion(ReqCompletion.NORMAL,"Completed.");
    //Handle any exceptional conditions
    catch(Exception e){
    log.writeln("Exception2 occurred here !!"+e,0);
    log.writeln("calling createBatch"+v_header,0);
    public static ApplicationModule create(String amDefName,
    String jdbcConnStr) throws ApplicationModuleCreateException, Exception {
    ApplicationModule am = null;
    try {
    OracleCallableStatement conn = null;
    // Setup the hashtable of JNDI initialization parameters
    log.writeln("inside create method .. ",0);
    Hashtable env = new Hashtable(2);
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    JboContext.JBO_CONTEXT_FACTORY);
    env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_LOCAL);
    // Create an JNDI initial context
    Context ic;
    ic = new InitialContext(env);
    // Lookup a home interface (factory) for the AppModule by name
    ApplicationModuleHome home =
    (ApplicationModuleHome)ic.lookup(amDefName);
    if(home==null){
    log.writeln("home is null... .",0);
    }else{
    log.writeln("home is not null"+home,0);
    // Create an instance of the AppModule using the home/factory
    am = home.create();
    if(am!=null){
    log.writeln("am is not null"+am,0);
    }else{
    log.writeln("am is null",0);
    // Connect the application module to the database
    am.getTransaction().connect(jdbcConnStr);
    } catch (NamingException ex) {
    log.writeln("NamingException occurred here !!"+ex.getMessage(),0);
    ex.printStackTrace();
    throw new ApplicationModuleCreateException(ex);
    }catch(Exception ex){
    log.writeln("Exception occurred here !!"+ex.getMessage(),0);
    ex.printStackTrace();
    throw new Exception(ex);
    return am;
    I am not able to call the web server and facing issues. Please let me know if you can help me to get a solution to this.
    Thanks in advance
    Veerendra

    Hi Zafar,
    I got an error saying :
    Batch Number Creation
    Batch Number Creation
    definition of batch num
    Before Calling Create method
    inside create method ..
    home is not nulloracle.jbo.server.ApplicationModuleHomeImpl@11d2572
    Jul 9, 2008 5:04:21 AM oracle.adf.share.config.ADFConfigFactory findOrCreateADFConfig
    INFO: oracle.adf.share.config.ADFConfigFactory No META-INF/adf-config.xml found
    Exception occurred here !!JBO-25002: Definition oracle.apps.ego.item.itemimport.server.EgoImportBatchHeaderAMImpl of type ApplicationModule not found
    oracle.jbo.NoDefException: JBO-25002: Definition oracle.apps.ego.item.itemimport.server.EgoImportBatchHeaderAMImpl of type ApplicationModule not found
         at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:441)
         at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:358)
         at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:340)
         at oracle.jbo.server.MetaObjectManager.findMetaObject(MetaObjectManager.java:700)
         at oracle.jbo.server.ApplicationModuleDefImpl.findDefObject(ApplicationModuleDefImpl.java:232)
         at oracle.jbo.server.ApplicationModuleImpl.createRootApplicationModule(ApplicationModuleImpl.java:401)
         at oracle.jbo.server.ApplicationModuleHomeImpl.create(ApplicationModuleHomeImpl.java:91)
         at oracle.apps.ego.item.cp.XX_EGO_BATCH_CREATE.create(XX_EGO_BATCH_CREATE.java:139)
         at oracle.apps.ego.item.cp.XX_EGO_BATCH_CREATE.runProgram(XX_EGO_BATCH_CREATE.java:57)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
    Exception2 occurred here !!java.lang.Exception: oracle.jbo.NoDefException: JBO-25002: Definition oracle.apps.ego.item.itemimport.server.EgoImportBatchHeaderAMImpl of type ApplicationModule not found
    calling [email protected]9c

  • Java.util.concurrent.ConcurrentHashMap

    All,
    I prefer to use the java.util.ConcurrentHashMap over a Hashtable but there are some points regarding this structure that are not very clear to me.
    From java.util.concurrent: Class ConcurrentHashMap:
    "A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updates. This class obeys the same functional specification as Hashtable, and includes versions of methods corresponding to each method of Hashtable.
    *+However, even though all operations are thread-safe, retrieval operations do not entail locking, and there is not any support for locking the entire table in a way that prevents all access. This class is fully interoperable with Hashtable in programs that rely on its thread safety but not on its synchronization details. Iterators are designed to be used by only one thread at a time."+ *
    Also from: Java API: Package java.util.concurrent, we read:
    "The "Concurrent" prefix used with some classes in this package is a shorthand indicating several differences from similar "synchronized" classes. For example java.util.Hashtable and Collections.synchronizedMap(new HashMap()) are synchronized. But ConcurrentHashMap is "concurrent". A concurrent collection is thread-safe, but not governed by a single exclusion lock. In the particular case of ConcurrentHashMap, it safely permits any number of concurrent reads as well as a tunable number of concurrent writes. "Synchronized" classes can be useful when you need to prevent all access to a collection via a single lock, at the expense of poorer scalability. In other cases in which multiple threads are expected to access a common collection, "concurrent" versions are normally preferable. And unsynchronized collections are preferable when either collections are unshared, or are accessible only when holding other locks."
    Based on above, is this correct of I say:
    When using a structure like Hashtable, all the methods or operations are synchronized,
    meaning if one thread is accessing the Hashtable (by get(), put(),... or other methods on this structure), it owns the lock and all other threads will lock out until the thread that owns the lock releases the lock; which means only one thread can access the hash table at a time; which can cause performance issues.
    We need to use a synchronized block or method only of two threads modify a "shared resource", if they do not modify a shared resource, we do not need to use the synchronization.
    On the other hand, the methods of ConcurrentHashMap are not synchronized; so multiple threads can access the ConcurrentHashMap at the same time. But isn't the ConcurrentHashMap itself the "shared resource" that threads are accessing? Should we use it only if the threads are reading from map and not writing to it? And then if threads also write to the structure, then it looks like its better to not to use the ConcurrentHashMap, rather use the regular HashMap with the synchronized wrapper?
    Any help is greatly appreciated.

    We need to use a synchronized block or method only of two threads modify a "shared resource", if they do not modify a shared resource, we do not need to use the synchronization. Actually, you need to synchronize access to the shared resource for both readers and writers. If one thread is updating an unsynchronized HashMap, and a concurrent thread tries to read that map, it may be in an inconsistent state. When synchronizing on the map, the reader will be blocked until the writer completes.
    What you don't need to do is prevent multiple readers from accessing the map, if there's no writer. However, a synchronized map or HashTable will single-thread reads as well as writes.
    On the other hand, the methods of ConcurrentHashMap are not synchronized; so multiple threads can access the ConcurrentHashMap at the same time. But isn't the ConcurrentHashMap itself the "shared resource" that threads are accessing? No, it's actually synchronized at a finer level. Without getting into the details of HashMap implementation, an object's hashcode is used to identify a linked list of hashmap entries. The only time that you have a concurrency issue is when a reader and writer are accessing the same list. So the ConcurrentHashMap locks only the list that's being updated, and allows readers (and writers!) to access the other bucket lists. Plus, it allows two readers to proceed concurrently.

  • JMS Provider Responsibilities For Concurrent Message Delivery

    Hi,
    (This question pertains to the JMS api, outside a j2ee container)
    Is it JMS-provider dependent on how concurrent message delivery is implemented? In other words, the code below sets up multiple consumers (on a topic), each with their own unique session and MessageListener and then a separate producer (with its own session) sends a message to the topic and I observer that only (4) onMessage() calls can execute concurrently. When one onMessage() method exits, that same thread gets assigned to execute another onMessage().
    The only thing I could find on the matter in the spec was section in 4.4.15 Concurrent Message Delivery and it's pretty vague.
    It's really important because of the acknowledgment mode. If it turns out that I need to delegate the real work that would be done in the onMessage() to another thread that I must manage (create, pool, etc), then once the onMessage() method completes (i.e., after it does the delegation to another thread), the message is deemed successfully consumed and will not be re-delivered again (and that's a problem if the custom thread fails for any reason). Of course, this assumes I'm using AUTO_ACKNOWLEDGE as the acknowledgment mode (which seems to make sense since using CLIENT_ACKNOWLEDGE mode will automatically acknowledge the receipt of all messages that have been consumed by the corresponding session and that's not good).
    My JMS Provider is WL 9.1 and the trival sample code I'm using as my test follows below. I also show the ouput from running the example.
    thanks for any help or suggestions,
    mike
    --- begin TopicExample.java ---
    import java.io.*;
    import java.util.*;
    import javax.naming.*;
    import javax.jms.*;
    import javax.rmi.PortableRemoteObject;
    class TopicExample {
    public final static String JMS_PROVIDER_URL = "t3://localhost:8001";
    public final static String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory";
    public final static String JMS_FACTORY="CConFac";
    public final static String TOPIC="CTopic";
    public final static int NUM_CONSUMERS = 10;
    public static void main(String[] args) throws Exception {
    InitialContext ctx = getInitialContext(JMS_PROVIDER_URL);
    ConnectionFactory jmsFactory;
    Connection jmsConnection;
    Session jmsReaderSession[] = new Session[10];
    Session jmsWriterSession;
    TextMessage jmsMessage;
    Destination jmsDestination;
    MessageProducer jmsProducer;
    MessageConsumer jmsConsumer[] = new MessageConsumer[10];
    MessageListener ml;
    try
    // Create connection
    jmsFactory = (ConnectionFactory)
    PortableRemoteObject.narrow(ctx.lookup(JMS_FACTORY), ConnectionFactory.class);
    jmsConnection = jmsFactory.createConnection();
    // Obtain topic
    jmsDestination = (Destination) PortableRemoteObject.narrow(ctx.lookup(TOPIC), Destination.class);
    // Reader session and consumer
    for (int i=0; i<NUM_CONSUMERS; i++)
    jmsReaderSession[i] = jmsConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    jmsConsumer[i] = jmsReaderSession.createConsumer(jmsDestination);
    jmsConsumer[i].setMessageListener(
    new MessageListener()
    public void onMessage(Message msg) {
    try {
    String msgText;
    if (msg instanceof TextMessage) {
    msgText = ((TextMessage)msg).getText();
    } else {
    msgText = msg.toString();
    System.out.println("JMS Message Received: "+ msgText );
    System.out.println("press <return> to exit onMessage");
    char c = getChar();
    System.out.println("Exiting onMessage");
    } catch (JMSException jmse) {
    System.err.println("An exception occurred: "+jmse.getMessage());
    // Writer session and producer
    jmsWriterSession = jmsConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    jmsProducer = jmsWriterSession.createProducer(jmsDestination);
    jmsMessage = jmsWriterSession.createTextMessage();
    jmsMessage.setText("Hello World from Java!");
    jmsConnection.start();
    jmsProducer.send(jmsMessage);
    char c = '\u0000';
    while (!((c == 'q') || (c == 'Q'))) {
    System.out.println("type q then <return> to exit main");
    c = getChar();
    for (int i=0; i<NUM_CONSUMERS; i++)
    jmsReaderSession[i].close();
    jmsWriterSession.close();
    jmsConnection.close();
    System.out.println("INFO: Completed normally");
    } finally {
    protected static InitialContext getInitialContext(String url)
    throws NamingException
    Hashtable<String,String> env = new Hashtable<String,String>();
    env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
    env.put(Context.PROVIDER_URL, url);
    return new InitialContext(env);
    static public char getChar()
    char ch = '\u0000';
    try {
    ch = (char) System.in.read();
    System.out.flush();
    } catch (IOException i) {
    return ch;
    --- end code --
    Running the example:
    prompt>java TopicExample
    JMS Message Received: Hello World from Java!
    JMS Message Received: Hello World from Java!
    press <return> to exit onMessage
    press <return> to exit onMessage
    JMS Message Received: Hello World from Java!
    press <return> to exit onMessage
    JMS Message Received: Hello World from Java!
    press <return> to exit onMessage
    type q then <return> to exit main
    [you see, only 4 onMessage() calls execute concurrently. Now I press <return>]
    Exiting onMessage
    JMS Message Received: Hello World from Java!
    press <return> to exit onMessage
    [now once the thread executing the onMessage() completes, the JMS providor assigns it to execute another onMessage() until all 10 onMessage() exections complete).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I am too facing the same issue. but in my case I start getting this problem when the message size is about 1 MB itself.
    Any help is appraciated.
    Regards,
    ved

  • ConcurrentHashMap VS. HashTable

    Hi all,
    I need to use a thread-safe map and am not sure if I can safely use java.util.concurrent.ConcurrentHashMap instead of HashTable w/o external synchronization. The Java docs says:
    "A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updates. This class obeys the same functional specification as Hashtable, and includes versions of methods corresponding to each method of Hashtable.
    *+However, even though all operations are thread-safe, retrieval operations do+ +not+ +entail locking, and there is+ +not+ +any support for locking the entire table in a way that prevents all access. This class is fully interoperable with+ **+Hashtable+** +in programs that rely on its thread safety but not on its synchronization details.+*
    *+Retrieval operations (including+ **+get+**+) generally do not block, so may overlap with update operations (including+ **+put+** +and+ **+remove+**+). Retrievals reflect the results of the most recently+ +completed+ +update operations holding upon their onset. For aggregate operations such as+ **+putAll+** +and+ **+clear+**+, concurrent retrievals may reflect insertion or removal of only some entries. Similarly, Iterators and Enumerations return elements reflecting the state of the hash table at some point at or since the creation of the iterator/enumeration+*.
    They do +not+ throw [ConcurrentModificationException|http://java.sun.com/javase/6/docs/api/java/util/ConcurrentModificationExceptio
    *+However, iterators are designed to be used by only one thread at a time.+*"
    I do use iterators on my map; and it will be used by many threads at the same time; so does that mean I need to externally "synchronize" my map?
    The parts in bold and italic made me not sure about using the ConcurrentHashMap...

    JavaFunda wrote:
    So can anybody give a example where we hashtable can not be replace by ConcusrrentHashMapPersonally, other than Peter's first suggestion, I can't think of a single one. I believe that EJP's post (other than line 3) was aimed at why you might prefer a HashMap ( not Hashtable) over CHM; and he's dead right.
    Winston

  • Why is NumberFormat.cachedLocaleData still a Hashtable?

    Looking at JDK 6, NumberFormat.getInstance(Locale) is a bottleneck at high concurrency, because it hits a synchronized block calling cacheLocaleData.get(locale). The latter is a Hashtable - shouldn't it be a ConcurrentMap by now?
    Not sure what LocaleServiceProviderPool is but it appears to not have providers so the executions does hit cacheLocalData.get() on every invocation. The problem is many web frameworks rely on MessageFormat or NumberFormat.getInstance() to convert presentation data String<>Int and so this method may get called 100s of times per page render (imagine rendering a table of formatted numbers).
    Is the workaround to 'new' DecimalFormat directly and put it on a ThreadLocal (to avoid calling NumberFormat.getInstance())?
    private static final Hashtable cachedLocaleData = new Hashtable(3);
        private static NumberFormat getInstance(Locale desiredLocale,
                                               int choice) {
            // Check whether a provider can provide an implementation that's closer
            // to the requested locale than what the Java runtime itself can provide.
            LocaleServiceProviderPool pool =
                LocaleServiceProviderPool.getPool(NumberFormatProvider.class);
            if (pool.hasProviders()) {
                NumberFormat providersInstance = pool.getLocalizedObject(
                                        NumberFormatGetter.INSTANCE,
                                        desiredLocale,
                                        choice);
                if (providersInstance != null) {
                    return providersInstance;
            /* try the cache first */
            String[] numberPatterns = (String[])cachedLocaleData.get(desiredLocale);
            if (numberPatterns == null) { /* cache miss */
                ResourceBundle resource = LocaleData.getNumberFormatData(desiredLocale);
                numberPatterns = resource.getStringArray("NumberPatterns");
                /* update cache */
                cachedLocaleData.put(desiredLocale, numberPatterns);
            }

    nikita_bludevil wrote:
    Is the workaround to 'new' DecimalFormat directly and put it on a ThreadLocal (to avoid calling NumberFormat.getInstance())?I would use a ThreadLocal

  • Singleton Instance variables concurrency

    Below I have code from a class that is used for caching data from a database. The class is implemented as a singleton.
    My question deals with the method getCacheObj(). Does getCacheObj() return a copy of the reference to cacheObj or does it return the actual cacheObj variable itself?
    Specifically I am concerned about a concurrency issue when the methods refreshCache() and getCacheObj() are called simultaneously. What would happen in the following situation:
    Thread 1 calls findActiveByWebsiteArea() which calls getCacheObj(). getCacheObj() returns the cacheObj for processing down the line in a jsp or other java object. Prior to thread 1 finishing the processing with cacheObj, thread 2 calls refreshCache() which resets cacheObj. Is it possible for thread 2 to clash with thread 1?
    public class NewsPeer extends AncestorCachePeer {
    // object that will house the cached data
    protected static NewsPeer cacheObj = null;
    // attributes for the instantiated cache object
    private Hashtable newsByWebsiteArea = null;
    private NewsPeer() {
    // private constructor to enforce a singleton
    public static void refreshCache() throws Exception {
    // reset the cache object so a fresh retrieve will be performed
    // the next time the cache is accessed
    synchronized (cacheObj) {
    cacheObj = null;
    private static NewsPeer getCacheObj() throws Exception {
    synchronized (cacheObj) {
    if (cacheObj == null) {
    cacheObj = new NewsPeer();
    cacheObj.retrieveCache();
    return cacheObj;
    public static List findActiveByWebsiteArea(String websiteareaId) throws Exception{
    // get item from cache obj
    return (List) getCacheObj().newsByWebsiteArea.get(websiteareaId);
    private void retrieveCache() throws Exception {
    // code to populate newsByWebsiteArea on cacheObj
    }

    1) Do I really need to have a singleton to house the
    cached data, or is it kosher to have the static
    variable newsByWebsiteArea on the class
    itself?That IS a singleton. You have exactly one instance of something. That's what a singleton is. It's true that you don't have any instances of NewsPeer, but you do have exactly one instance of the things you're interested in.
    2) Will my code require synchronized methods for
    findActiveByWebsiteArea() and
    findActiveByLocation()? I don't want to have
    issues inside these methods while the
    refreshCache() method is running.Yes.
    3) If I have other non-synchronized static
    methods in this class, will the thread calling the
    non-synchronized methods have to wait until the
    synchronized methods are finished executing?No. Only synchronized methods or blocks respect the locks held by other synchronized methods or blocks.
    If so, would it be a better idea to go back to synchronizing
    blocks of code instead of methods to ensure maximum
    efficiency?Your earlier examples synchronized on the entire method's code. I don't understand why you would think that would work differently than just synchronizing the method itself. The lock is held for exactly the same code.
    Now if the critical block was only part of the method, you might want to synchronize on that. But in your case it isn't.
    However: you actually have two independent objects there. So you could do something like this: public class NewsPeer extends AncestorCachePeer {
        // attributes for the instantiated cache object
        private static Hashtable newsByWebsiteArea = new Hashtable();
        private static Hashtable newsByLocation = new Hashtable();
        static {
            try {
                refreshCache();
            } catch (Exception e) {
                e.printStackTrace();
        public static List findActiveByWebsiteArea(String websiteareaId) throws Exception{
            synchronized(newsByWebsiteArea) {
            // get item from cache obj
            return (List) newsByWebsiteArea.get(websiteareaId);
        public static List findActiveByLocation(String locationId) throws Exception{
            synchronized(newsByLocation) {
            // get item from cache obj
            return (List) newsByLocation.get(locationId);
        public static void refreshCache() throws Exception {
            // retrieve items that will be cached
            synchronized(newsByWebsiteArea) {
            newsByWebsiteArea.clear();
            // additional code to populate newsByWebsiteArea
            synchronized(newsByLocation) {
            newsByLocation.clear();
             // additional code to populate newsByLocation
        }That way the two "find" methods don't block each other. (Note that I changed your code slightly so you don't create new objects in the refresh() method. That's because the revised code synchronizes on the objects in question, so creating new objects would lead to synchronization failures.
    Or as stefan.schulz suggests, you could use Java 5 synchronization tools to improve this. I don't know much about them but I'm pretty sure there's something that lets readers share the data without blocking and only blocks when writers are active. That's probably worth looking into.

  • Unexpected error occurred :concurrent access to HashMap attempted

    While runnig the ALBPM 5.7 we got this error. This looks like the ALBPM workflow engine is using HashMap in a unsynchronized way. is this a known issue and is there a work around for this?
    This error happened shortly after a possible blip in the database server, with exception message which said:
    Message:
    The connectivity to the BEA AquaLogic™ BPM Server database has been successful restablished.
    Any thoughts/insight/past experience....
    Looks like we should be using Hashtable instead of a HashMap (or atleast a Synchronized HashMap)
    This is best done at creation time, to prevent accidental unsynchronized access to the map:
    Map m = Collections.synchronizedMap(new HashMap(...));
    See Exception message below
    Message:
    An unexpected error occurred while running an automatic item.
    Details: Connector [ffmaeng_ENGINE_DB_FUEGOLABS_ARG:SQL:Oracle (ALI)] caused an exception when getting a resource of type [0].
    Detail:Connector [ffmaeng_ENGINE_DB_FUEGOLABS_ARG:SQL:Oracle (ALI)] caused an exception when getting a resource of type [0].
    Caused by: concurrent access to HashMap attempted by Thread[ET(49),5,Execution Thread Pool]
    fuego.connector.ConnectorException: Connector [ffmaeng_ENGINE_DB_FUEGOLABS_ARG:SQL:Oracle (ALI)] caused an exception when getting a resource of type [0].
    Detail:Connector [ffmaeng_ENGINE_DB_FUEGOLABS_ARG:SQL:Oracle (ALI)] caused an exception when getting a resource of type [0].
    at fuego.connector.ConnectorException.exceptionOnGetResource(ConnectorException.java:95)
    at fuego.connector.ConnectorTransaction.getResource(ConnectorTransaction.java:285)
    at fuego.connector.JDBCHelper.getConnection(JDBCHelper.java:43)
    at fuego.server.service.EngineConnectorService.getConnection(EngineConnectorService.java:260)
    at fuego.server.service.EngineConnectorService.getEngineConnection(EngineConnectorService.java:160)
    at fuego.transaction.TransactionAction.getEngineHandle(TransactionAction.java:180)
    at fuego.server.execution.EngineExecutionContext.getEngineHandle(EngineExecutionContext.java:352)
    at fuego.server.execution.EngineExecutionContext.persistInstances(EngineExecutionContext.java:1656)
    at fuego.server.execution.EngineExecutionContext.persist(EngineExecutionContext.java:1010)
    at fuego.transaction.TransactionAction.beforeCompletion(TransactionAction.java:133)
    at fuego.connector.ConnectorTransaction.beforeCompletion(ConnectorTransaction.java:654)
    at fuego.connector.ConnectorTransaction.commit(ConnectorTransaction.java:330)
    at fuego.transaction.TransactionAction.commit(TransactionAction.java:303)
    at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:470)
    at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:540)
    at fuego.transaction.TransactionAction.start(TransactionAction.java:213)
    at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:118)
    at fuego.server.execution.DefaultEngineExecution.executeAutomaticWork(DefaultEngineExecution.java:58)
    at fuego.server.execution.EngineExecution.executeAutomaticWork(EngineExecution.java:42)
    at fuego.server.execution.ToDoItem.executeAutomaticWork(ToDoItem.java:264)
    at fuego.server.execution.ToDoItem.run(ToDoItem.java:531)
    at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:754)
    at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:734)
    at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:140)
    at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:132)
    at fuego.fengine.ToDoQueueThread$PrincipalWrapper.processBatch(ToDoQueueThread.java:432)
    at fuego.component.ExecutionThread.work(ExecutionThread.java:818)
    at fuego.component.ExecutionThread.run(ExecutionThread.java:397)
    Caused by: java.util.ConcurrentModificationException: concurrent access to HashMap attempted by Thread[ET(49),5,Execution Thread Pool]
    at java.util.HashMap.onExit(HashMap.java:226)
    at java.util.HashMap.transfer(HashMap.java:690)
    at java.util.HashMap.resize(HashMap.java:676)
    at java.util.HashMap.addEntry(HashMap.java:1049)
    at java.util.HashMap.put(HashMap.java:561)
    at fuego.lang.cache.CacheStatistic.lock(CacheStatistic.java:246)
    at fuego.lang.cache.TimedMultiValuatedCache.getLocked(TimedMultiValuatedCache.java:282)
    at fuego.lang.cache.TimedPool.get(TimedPool.java:80)
    at fuego.connector.impl.BaseJDBCPooledConnector.getConnection(BaseJDBCPooledConnector.java:140)
    at fuego.connector.impl.BaseJDBCConnector.getResource(BaseJDBCConnector.java:222)
    at fuego.connector.ConnectorTransaction.getResource(ConnectorTransaction.java:280)
    ... 26 more

    Hi BalusC,
    I forgot to tell one thing, the exception what I mentioned is coming very rarely. The application is in Production and they getting this Exception once in 3 months. Is there any way to re-produce the same exception number of times to check whether it has been fixed or not after installing the updates as you said. If you have any information regarding this exception please send me.
    Thank You.

  • Concurrent Access to Cache Mechanism

    Below I have code from an object that is used for caching data from a database. My question deals with the method getCacheObj(). Does getCacheObj() return a copy of the reference to cacheObj or does it return the actual cacheObj variable itself?
    Specifically I am concerned about a concurrency issue when the methods refreshCache() and getCacheObj() are called simultaneously. What would happen in the following situation:
    Thread 1 calls findActiveByWebsiteArea() which calls getCacheObj(). getCacheObj() returns the cacheObj for processing down the line in a jsp or other java object. Prior to thread 1 finishing the processing with cacheObj, thread 2 calls refreshCache() which resets cacheObj. Is it possible for thread 2 to clash with thread 1?
    public class NewsPeer extends AncestorCachePeer {
        // object that will house the cached data
        protected static NewsPeer cacheObj = null;
        // attributes for the instantiated cache object
        private Hashtable newsByWebsiteArea = null;
        private NewsPeer() {
            // private constructor to enforce a singleton
        public static void refreshCache() throws Exception {
            // reset the cache object so a fresh retrieve will be performed
            // the next time the cache is accessed
            synchronized (cacheObj) {
                cacheObj = null;
        private static NewsPeer getCacheObj() throws Exception {
            synchronized (cacheObj) {
                if (cacheObj == null) {
                    cacheObj = new NewsPeer();
                    cacheObj.retrieveCache();
                return cacheObj;
        public static List findActiveByWebsiteArea(String websiteareaId) throws Exception{
            // get item from cache obj
            return (List) getCacheObj().newsByWebsiteArea.get(websiteareaId);
        private void retrieveCache() throws Exception {
            // code to populate newsByWebsiteArea on cacheObj
    }

    I feel it's not a good idea to make your lock object null somewhere ...
    for example, let us say refreshCache() method acquired the lock.
    but before it performs CacheObj = null, it gets descheduled, and another thread, runs getCacheObj() and since it
    cannot get the cacheObj, it waits on cacheObj's queue, and now the previous thread resumes, which makes cacheObj null.
    It will be better if you can have a separate lockObject.
    This is my suggestions and I may be wrong. So let us wait for the experts to give some more suggestions..

  • Selection criteria for hasmap/hashtable

    Apart from synchronization and non-null key value restriction , are there any other criterion to select hashtable over hashmap?
    what are the cases where one should prefer one of them for storing key-value pairs?

    Hashtable's synchronization is mostly useless. A transaction to a hashtable is atomic for one method call on that Hashtable object. Most scenarios this doesnt help any bit. If the table holds plenty of records, treating them as one giant structure and making it thread safe is very inefficient. It is like locking the whole DB table every time you read or Write data. In DB jargon, it is like always reading at transaction isolation "serialization".
    You could write some work around solutions with HashMap, but it is not required anymore.
    Concurrent HashMap partitions the data. Abstracting the details of it, it allows concurrent updates. And reads are totally off the hook.

  • HashTable class not shared ?

    Hi Forte users,
    I am puzzled by the fact that the the Forte 'HashTable' class
    is not declared as shared in the Forte documentation.
    I assume the internals of this class use a mutex for
    update operations, but I would like to be sure I do not
    take any risk of memory corrupting by allowing concurrent
    access to this class.
    Has anyone used a HashTable in a concurrent access
    environment ?
    Thanks,
    Vincent Figari
    You don't need to buy Internet access to use free Internet e-mail.
    Get completely free e-mail from Juno at http://www.juno.com
    Or call Juno at (800) 654-JUNO [654-5866]

    peter schlaeger (guest) wrote:
    : I got Class not found: oracle.net.asst.container.NetApplication
    : when starting netasst
    : Can anyone help ?
    : Thanks
    : Peter
    Install the patch and read the fine manual.
    null

  • Trouble with Hashtable and FormProcessor

    The JavaDocs specify that a hashtable can be used to pass all of the data in to the FormProcessor. However, one of the fields in my hashtable is an address fields, which consists of several lines containing carriage returns. When merged with the PDF template, the carriage returns all appear as symbols in the final document and all of the data is on one line. If I pass the entire XML data as a ByteArrayInputStream, the carriage returns are processed correctly. Unfortunately using the input stream doesn't allow me to override specific variables with global values located further down in the XML data. Any thoughts as to how I can still use a Hashtable, but correct the carriage return issue?
    Thanks!
    KH

    Hi Tim,
    We recently upgraded to 5.6.2 just to implement the BurstInvoice feature using emails.
    We ran into all sorts of issues.I followed your demo and did the exact sequence of steps starting from
    1)Uploaded the ldt for the concurrent program
    2)Embeded the java concurrent request into the after report trigger using Oracle Reports buider
    3)Copied the Invoicebatch.xml and the bursting xml to our directories.
    4)Deployed the java file XMLPReportBurst and compiled it.
    5)However I just made one change instead of passing them as stream I passed them as strings with the paths the reason being there was a major issue while passing them as streams.I have uploaded all my files there.
    I also logged a tar 6305989.993.
    It would be great if you could help us with the same.
    thanks
    Raj.

Maybe you are looking for