Need explanation on output(Threads).

Hi,
I am new to Threads and need an explanation on the
Output got from the program below.
I executed this program below :
/*================================================
MultiThreadDemo.sqlj
===============================================*/
import java.sql.SQLException;
import java.util.Random;
import sqlj.runtime.ExecutionContext;
import oracle.sqlj.runtime.Oracle;
class MultiThreadDemo extends Thread
double raise;
static Random randomizer = new Random();
public static void main(String []args)
try
Oracle.connect(MultiThreadDemo.class,"connect.properties");
double avgStart = calcAvgSal();
MultiThreadDemo t1 = new MultiThreadDemo(250.50);
MultiThreadDemo t2 = new MultiThreadDemo(150.50);
t1.start();
t2.start();
t1.join();
if(t1.isAlive())
     System.out.println(" Thread t1 is Still Alive");
     t2.join();
if(t2.isAlive())
     System.out.println(" Thread t2 is Still Alive");
double avgEnd = calcAvgSal();
System.out.println("Avg Sal Change : "+(avgEnd-avgStart));
catch(Exception e)
System.out.println("Error running the example : "+ e);
static double calcAvgSal() throws SQLException
double avg;
#sql { SELECT AVG(sal) into :avg from emp};
return avg;
MultiThreadDemo(double raise)
this.raise = raise;
public void run()
System.out.println(" Executing run() ");
     try
System.out.println(" Executing try block in run() ");
     //delay();
     ExecutionContext execCtx = new ExecutionContext();
#sql [execCtx] { UPDATE emp set sal = sal + :raise };
int updateCount = execCtx.getUpdateCount();
System.out.println("Give raise of "+ raise+"to "+updateCount+" employees");
catch(SQLException e)
System.err.println("error updating employees : "+ e);
private void delay()
System.out.println(" Executing delay() ");
try
sleep((long)Math.abs(randomizer.nextInt()/10000000));
catch(InterruptedException e)
==========================================================
===========
Output
============
$ java MultiThreadDemo
Executing run()
Executing try block in run()
Executing run()
Executing try block in run()
Give raise of 250.5 to 7 employees
Give raise of 150.5 to 7 employees
Avg Sal Change : 402.0
=============================
Shouldn't the Output be ??:
=============================
executing run()
executing try block in run()
Give raise of 250.5 to 7 employees
executing run()
executing try block in run()
Give raise of 150.5 to 7 employees
Avg Sal Change : 402.0
================================================
Can anyone explain the Output clearly, as I am
new to Using Threads.
Thanks
Sharath

Reply to my own post:
I think the solution lies in using the "synchronized" keyword for the run() method in order to make it a mutex
and get the o/p as desired.

Similar Messages

  • Need help with the threads concept in java

    i need a good explanation for the threads concept in java.Explanation with an example would be better.

    JosAH wrote:
    BIJ001 wrote:
    Java still can't process them in real time because of its garbage collector.So real-time java is not conceivable \qu.e.d
    http://java.sun.com/javase/technologies/realtime/index.jsp
    http://jcp.org/en/jsr/detail?id=282
    Is that implementation ready yet? The first link talks about 'more real time'; that garbage collector really is a burden when it comes to the real ticks ...
    kind regards,
    JosSpoon!

  • Need to configure output type for adobe form

    Hello All,
    I need to configure output type for Adobe Form thru NACE. What would be print program and how do I call my form from that program? and, what would be the FORM routine for that form in NACE?
    I'm little confused, Pls I need your help.
    Thanks in advance,
    Chandra

    Hi,
    Just before few weeks we did this task.
    Say for example if you want to print PO details through ADOBE form instead of normal sapscript layout or standard MEDRUCK, you can follow the following steps.
    1. Design the form in SFP tcode, by passing the necessary inputs through form interface.
    2. Then use tcode tcode NACE and select EF as application and click output types button on the          application tool bar. Select NEU output type and double click processing routines on left side.
    3. Then, in the right side of the screen we can see the calling program and the form (may be sapscript or smartform) whatever used.
    4. For form names we have two options in NACE tcode.
    One is Form and the otherone is PDF/Smartform Form. If you are using adobe form give your form name under PDF/Smartform and also select PDF under the type option in the same screen.
    This worked perfectly for us. But pass the required parameters to the form from the routine used in standard program.
    If any queries please post it.

  • Need help with java thread program

    Hi
    I have an applet which does some painting etc, i need to write a thread which runs in background, and if there is no user activity for 30 min will refresh the screen.
    I have one good thing that all user options go from one program so i know when user does some thing.
    How do i write this thread program?
    1. I need this program to start counter as soon as some activity is done by user
    2. When user does some thing stop this thread
    3. when user completes his action restart the thread with 30 min timer.
    4. when there is no activity for 30 min refresh the screen
    Any help will be really good
    Ashish

    Not sure what the problem is. Your pseudo code looks good to me.
    The only suggestion I would make is that your use a Timer so you don't have to worry about creating your own Thread. You schedule a Timer to fire in 30 minutes. Everytime you have activiity you cancel the timer and reschedule it.

  • Need explanation about adobe products for developers

    I need explanation about what products I need to use for developing dynamic adobe PDF forms..
    Currently I use only LiveCycle Designer ,but I in previous posts I found that I need to use additional products as Acrobat or Extension to designer.
    My question is if I need to devlop dynamic PDF form what exactly products I need that will be cover all developing issues?

    Hi,
    Covering all developer/developing issues is very broad.
    LC Designer is part of the LiveCycle suite. Which components you need from the suite will depend on your environment, your workflow, and how you want to process the data.
    More information here: http://www.adobe.com/products/livecycle/
    If you wanted to create forms and use Reader to interact with the form, then the minimum specification would be:
    LC Designer
    Adobe Reader
    However there would be restrictions in the functionality (eg you could not save the form in Reader as it would not be Reader enabled).
    If you want to Reader enabled the form in Acrobat Standard v9 or Acrobat Pro v8, then you will need Acrobat as well. This will unlock some of the features.
    If you want users with Reader to have full access to all features (as if the form was opened in Acrobat) then you will also need LC Reader Extensions ES2. You would use this to Reader enable the form before you deploy it.
    See summary here:
    Other components in the LC suite provide other functionality such as digital signatures, rights management, etc. You should talk directly with the Adobe sales rep in your geographical location.
    Good luck,
    Niall
    Assure Dynamics

  • Need explanation on prerouting post routing and translation rouitng with examples

    Hi ,
    i need explanation on prerouting post routing and translation rouitng  with examples.can anybody help me out ?
    thanks in advance
    regards
    bala

    Hi,
    prereouting: call comes in, hits ICM, script is run, telling the routing client (PSTN) where to route the call to (so the call is routed before (pre-) connection, or rather, establishment).
    Postrouting: call comes in, is connected and then it hits ICM (so the call is routed after begin connected).
    Translation routing is an interesting hybrid: call comes in, is connected but the party the call is connected to, is being monitored by ICM (so it sends the call away but it keeps an eye on it). When it's necessary, call is transferred to a different destination.
    Examples:
    Prerouting: PSTN -> ICM (script) -> PSTN -> destination phone answers
    Postrouting: PSTN -> call is answered -> ICM -> transfer to destination phone, answered
    Translation routing: PSTN -> call is answered -> ICM transfers to IVR port, then transfers to final destination phone (agent).
    G.

  • Need explanation output command "/opt/SUNWexplo/bin/explorer"

    Dear IT Experts,
    I run Explorer in solaris 8, by executing command "/opt/SUNWexplo/bin/explorer".
    From this command, I got a tar file and a directory.
    If I do not make mistake, I think that the directory contain of system configuration.
    But, I am confused to check it one by one.
    Could anybody tell me what the important things should I Check from the Explorer output?
    So I can make sure that there is no problem in my system.
    Please help..thanks for any suggestion.
    Regards,
    Ferianto

    You would typically check entries in /var/adm/messages as a start. Look mainly for any error messages in that log file.
    Check out the output of :
    /usr/platform/sun4u/sbin/prtdiag -vThis will tell you whether there are warning lights on, failed PSUs, etc.
    Note that for the newer systems such as T2000 servers, the architecture has changed to "sun4v" so it's better to run uname -m :
    /usr/platform/`uname -m`/sbin/prtdiag -vIf you have a multi-NIC setup, check status of each NIC (ifconfig -a) and any errors on the network (netstat -i).
    Check for disk errors using "iostat -En".
    I'm sure others will be volunteering other checks.
    Cheers,
    Erick Ramirez
    Melbourne, Australia

  • Need explanation meaning from output "/var/crash/`hostname'/*"

    Dear IT Experts,
    Oncetime, I run command "ls -al /var/crash/`hostname`/* ".
    This command give me output:
    -rw-r--r-- 1 root root 2 May 8 2007 /var/crash/drserv1/bounds
    -rw-r--r-- 1 root root 784890 Jan 5 2005 /var/crash/drserv1/unix.2
    -rw-r--r-- 1 root root 776755 May 8 2007 /var/crash/drserv1/unix.3
    -rw-r--r-- 1 root root 419938304 Jan 5 2005 /var/crash/drserv1/vmcore.2
    -rw-r--r-- 1 root root 276365312 May 8 2007 /var/crash/drserv1/vmcore.3
    Do anyone can help me what this output mean? What can I do to prevent this "crash" file
    appear anymore? because when I try to access one of those files, I got the strange characters.
    No character can be undestood by people.
    Please help
    Thanks for any response.
    Regards,
    Ferianto

    1. You said that I can delete unix.* and vmcore.* files. How about "bounds" file?
    Can I delete it and What is this file used for?The bounds file is just a counter. On the first crash, "bounds" is 0 so the files are named unix.0 and vmcore.0. The next crash, bounds is incremented to 1 so the files are named unix.1 and vmcore.1. It's best not to touch this file.
    2. You are right that I have no ability or tools to analyze it. Could you
    tell me , is there any tools that we can use? (Maybe we can find the tools using "google" ?) or we must send them to SUN support?The way I understand it, back in the cowboy days the tools used to be available to everyone. Over the years, more and more 3rd party support vendors have popped up and started using the tools that was Sun's bread-and-butter.
    As you can imagine, these tools were developed by Sun and was being used by their competitors to erode their market share so Sun has rightfully withdrawn them from the public arena and has reinforced agreements with customers, i.e. 3rd parties can no longer use explorer to provide support for Sun hosts.
    So the answer to your question is yes, you can only send crash dumps to Sun for analysis. You can only obviously do this if you have a valid support contract.
    3. Can you tell me what should I check if I want to now that my machine is in healty condition,please?I've answered this in your other post on "explorer".
    Welcome to Solaris!
    Cheers,
    Erick Ramirez
    Melbourne, Australia

  • Need formatted EXCEL output, from View Output,Oracle Applications

    To view the report(Normal RDF report,not XML Publisher Report) output in EXCEL, I changed the Profile Options.
    From: System Administrator Responsibility.
    Navigation: Install -> Viewer Options.
    Added the below entry.
    PDF application/vnd.ms-excel Microsoft Excel
    Now when I submit the report, after completing, when clicked to View Output, I can see the list showing Browser and Microsoft Excel.
    I saved the Excel Sheet,but its not formatted. How do I get the formatted Output. As columns are not in proper shape.
    Please do the needful.
    Thanks.

    Hi Abdul;
    Please check below thread's mention metalink note&advice:
    Open Text output of a Report in Excel - Bad format
    Re: Open Text output of a Report in Excel  - Bad format
    Hope it helps
    Regard
    Helios

  • IDOC to Flat File and XML ( Need both the Output)

    Hi ,
    My Scenario is IDOC to File .
    I need o/p in 2 format . ie,    1) Flat File 2 ) XML file
    I have a plan to go with Interface determination , 2 IM and what shd be the condition ?
    or Else  2 Receiver detmination  but condition ?
    How to slove this ?
    Need the Output from Idoc in 2 format ( Flat file and XML file )
    Any Blog , Thread ...Tips...etc
    Regards,
    Jude

    Hi Jude,
    Do like this:
    1. Create two inbound Service Interface (with the same target Message Type)
    2. Create separate Operation mapping with the above service interfaces as target (with the same source service interface)
    3. Create Interface Determination and include these two operation mapping (without any condition)
    4. Create 2 receiver agreement (with two separate communication channel) for each of the target service Inetrface. In one channel use content conversion and the other one will give you normal XML output
    Regards
    Suraj

  • Need some help with threads...

    Hello all,
    I am working on a project at work, and I am not the best programmer in the world. I have been trying to get my head around this for a couple of days and just cannot get it to work.
    I am writing an instrumentation control program that will have three threads. One is the GUI, one will receive control information and set up the hardware, and one will check the hardware status and report it to the GUI periodically. I plan on using the invokeLater() method to communicate the status to the GUI and change the status display in the GUI. Communication from the GUI to the controller thread and from the status thread to the controller thread I had planned on being piped input/output stream as appropriate. I have a control class and a status class that need to be communicated over these piped streams. In some trial code I have been unable to wrap the piped input/output streams with object input/output streams. I really need some help with this. Here is the main thread code:
    package playingwiththreads1;
    import java.io.*;*
    *public class PlayingWithThreads1 {*
    public static void main(String[] args) {*
    * PipedOutputStream outputPipe = new PipedOutputStream();*
    * ObjectOutputStream oos = null;*
    * ReceiverThread rt = new ReceiverThread(outputPipe);*
    // Start the thread -- First try*
    * Thread t = new Thread(rt);*
    t.start();*
    // Wrap the output pipe with an ObjectOutputStream*
    try*
    oos = new ObjectOutputStream(outputPipe);*
    catch (IOException e)*
    System.out.println(e);*
    // Start the thread -- Second try*
    //Thread t = new Thread(rt);*
    //t.start();*
    /** Send an object over the pipe. In reality this object will be a
    class that contains control or status information */
    try
    if (!oos.equals(null))
    oos.writeObject(new String ("Test"));
    catch (IOException e)
    try
    Thread.sleep(5000);
    catch (InterruptedException e)
    I read somewhere that it matters where you start the thread relative to where you wrap piped streams with the object streams. So, I tried the two places I felt were obvious to start the thread. These are noted in the comments. Here is the code for the thread.
    package playingwiththreads1;
    import java.io.*;
    public class ReceiverThread implements Runnable {
    private PipedInputStream inputPipe = new PipedInputStream();
    private ObjectInputStream inputObject;
    ReceiverThread (PipedOutputStream outputPipe)
    System.out.println("Thread initialization - start");
    try
    inputPipe.connect(outputPipe);
    inputObject = new ObjectInputStream(inputPipe);
    catch (IOException e)
    System.out.println(e);
    System.out.println("Thread initialization - complete");
    public void run()
    System.out.println("Thread started");
    try
    if (inputObject.available() > 0)
    System.out.println(inputObject.read());
    catch (IOException e)
    System.out.println(e);
    Through testing I have determined that no matter where I start the thread, the thread never gets past the "inputObject = new ObjectInputStream(inputPipe);" assignment.
    Could someone please help me with this? There are other ways for me to write this program, but this is the one that I would like to make work.
    Many thanks in advance,
    Rob Hix
    Edited by: RobertHix on Oct 6, 2009 3:54 AM

    Thanks for the help, but that did not work. I tried flushing the ObjectOutputStream and it is still hanging when initializing the thread.
    Here is a better look at the code since I was helped to figure out how to insert it:
    The main method:
    package playingwiththreads1;
    import java.io.*;
    public class PlayingWithThreads1 {
        public static void main(String[] args) {
            PipedOutputStream outputPipe = new PipedOutputStream();
            ObjectOutputStream oos = null;
            ReceiverThread rt = new ReceiverThread(outputPipe);
            // Start the thread -- First try
            //Thread t = new Thread(rt);
            //t.start();
            // Wrap the output pipe with an ObjectOutputStream
            try
                oos = new ObjectOutputStream(outputPipe);
                oos.flush();
            catch (IOException e)
                System.out.println(e);
            // Start the thread -- Second try
            Thread t = new Thread(rt);
            t.start();
            /* Send an object over the pipe.  In reality this object will be a
             * class that contains control or status information */
            try
                if (!oos.equals(null))
                    oos.writeObject(new String ("Test"));
                    oos.flush();
            catch (IOException e)
                System.out.pringln(e);
            try
                Thread.sleep(5000);
            catch (InterruptedException e)
    }The thread code:
    package playingwiththreads1;
    import java.io.*;
    public class ReceiverThread implements Runnable {
        private PipedInputStream inputPipe = new PipedInputStream();
        private ObjectInputStream inputObject;
        ReceiverThread (PipedOutputStream outputPipe)
            System.out.println("Thread initialization - start");
            try
                inputPipe.connect(outputPipe);
                inputObject = new ObjectInputStream(inputPipe);
            catch (IOException e)
                System.out.println(e);
            System.out.println("Thread initialization - complete");
        public void run()
            System.out.println("Thread started");
            try
                if (inputObject.available() > 0)
                    System.out.println(inputObject.read());
            catch (IOException e)
                System.out.println(e);
    }Does anyone else have and ideas?

  • Need more precise output

    Precise response needed
        I made a vi to drive a vco circuit .I am varying the frequency from 70 to 148. For some values of frequeny  I am getting the exact respose ie the frequency.I am entering is getting at the output using Ni USB 6009 DAQ card, ie the 12 bit binary generated at DAQ output is sufficent. It have 12 bit digital output pin.I want to make the response more precise 
    I am adding some value
    148.1  1111 1111 1111
    129     1011 1101 1001
    Please help me to solve is issue
     Thanks in advance
    with regards
    DK
    Attachments:
    v to f 150 expresion node B.vi ‏47 KB

    Duplicate Post:http://forums.ni.com/t5/Digital-I-O/2-digit-decimal-to-12-bit-binary/m-p/2584021
    Duplicate Post:http://forums.ni.com/t5/Digital-I-O/Precise-response-needed/m-p/2586339
    Please keep it all in a single thread.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Need help with output one field horizontally please

    I know I have seen some ideas and threads about this, but it is not really what I need. I have a report in CR XI that seems to be on the right path. The problem I am having is one field that needs to be in details could provide multiple results (products and services) which duplicates all the records. Some customers I'll have 3 lines, the next 9 ... depending on how many P&S they have.
    What I have done is moved all fields from the details section to group1 which so far seems fine and left my P&S field in details.
    The output is normal:
    prod1
    prod2
    prod3
    prod4
    etc.....
    What I need is this: prod1, prod2, prod3, prod4, etc.
    Any ideas greatly appreciated.
    In the group header add a formula
    WhilePrintingRecords;
    Global StringVar ProductList;
    ProductList := '';
    in the details
    WhilePrintingRecords;
    Global StringVar ProductList;
    If ProductList  = '' then
       ProductList  :=
    else
         ProductList := ProductList & ', ' & ; ''
    In the group footer
    WhilePrintingRecords;
    Global StringVar ProductList;
    ProductList
    Edited by: Terry Mergl on Apr 20, 2010 9:15 PM

    What you have should do it.  Is there an issue?  Please explain in detail, giving sample data, current results, and expected results.
    Carl

  • Need help with STUCK Threads.  What's causing them?

    In our production environment, we have a soa suite cluster with 3 nodes. All 3 of the servers keep turning up stuck and hogging threads, and eventually they all grind to a halt where I can't even view composite instances through em. There is a bpel process that is using a dbadapter to poll for records every 5 seconds and then performs some service call outs and other dbadapters. This process is generating thousands of instances a day and I think it is the culprit. If I view the logs, I see one of the dbadapters that it calls out to fails occasionally with a PK violation. I looked at the developer's code, and they have no error handling in the process at all. In the logs, there will the a hit for the PK violation, then about 10 minutes later the a STUCK thread gets logged(the configured timeout is 600 seconds, or 10 minutes). Would not handling an error in a BPEL process hog/STUCK a thread? I need to be able to show what code is causing the issue so I can have a resolution path.
    I also see a note in the trace about something holding a lock:
    Holding lock: oracle.jdbc.driver.T4CConnection@1fbc3486[thin lock]....would that be an un-rolled back transaction?
    Here is the dump of the STUCK thread. Any help is greatly appreciated. Thanks!
    <Aug 5, 2011 10:30:02 AM EDT> <Error> <WebLogicServer> <BEA-000337> <[STUCK] ExecuteThread: '64' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "634" seconds working on the request "oracle.soa.management.internal.ejb.impl.FacadeFinderBean_4vacyo_FacadeFinderBeanImpl", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
    Thread-517 "[STUCK] ExecuteThread: '64' for queue: 'weblogic.kernel.Default (self-tuning)'" <alive, in native, suspended, priority=1, DAEMON> {
    jrockit.net.SocketNativeIO.readBytesPinned(SocketNativeIO.java:???)
    jrockit.net.SocketNativeIO.socketRead(SocketNativeIO.java:24)
    java.net.SocketInputStream.socketRead0(SocketInputStream.java:???)
    java.net.SocketInputStream.read(SocketInputStream.java:107)
    oracle.net.nt.MetricsEnabledInputStream.read(TcpNTAdapter.java:553)
    oracle.net.ns.Packet.receive(Packet.java:249)
    oracle.net.ns.DataPacket.receive(DataPacket.java:94)
    oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:168)
    oracle.net.ns.NetInputStream.read(NetInputStream.java:113)
    oracle.net.ns.NetInputStream.read(NetInputStream.java:96)
    oracle.net.ns.NetInputStream.read(NetInputStream.java:81)
    oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:120)
    oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:75)
    oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1081)
    oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1062)
    oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:588)
    oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:70)
    oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:854)
    oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:918)
    oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1252)
    oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3541)
    oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3605)
    ^-- Holding lock: oracle.jdbc.driver.T4CConnection@1fbc3486[thin lock]
    oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1667)
    weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:123)
    org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:887)
    org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:541)
    org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:530)
    org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:521)
    org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:202)
    org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:192)
    org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:254)
    org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelect(DatasourceCallQueryMechanism.java:245)
    org.eclipse.persistence.queries.DataReadQuery.executeNonCursor(DataReadQuery.java:188)
    org.eclipse.persistence.queries.DataReadQuery.executeDatabaseQuery(DataReadQuery.java:141)
    org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:603)
    org.eclipse.persistence.queries.DataReadQuery.execute(DataReadQuery.java:115)
    org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:589)
    org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2898)
    org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1218)
    org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1190)
    org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1176)
    org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:378)
    org.eclipse.persistence.internal.jpa.EJBQueryImpl.getSingleResult(EJBQueryImpl.java:701)
    weblogic.deployment.TransactionalEntityManagerProxyImpl$QueryImpl.getSingleResult(TransactionalEntityManagerProxyImpl.java:232)
    com.collaxa.cube.persistence.dao.impl.jpa.JpaCubeInstanceDaoImpl.getNumberOfInstances(JpaCubeInstanceDaoImpl.java:439)
    oracle.fabric.CubeServiceEngine.getNumberOfComponentInstances(CubeServiceEngine.java:1962)
    oracle.soa.management.internal.ejb.impl.FacadeFinderBeanImpl.getNumberOfComponentInstances(FacadeFinderBeanImpl.java:1618)
    oracle.soa.management.internal.ejb.impl.FacadeFinderBeanImpl.getComponentSnapShot(FacadeFinderBeanImpl.java:1653)
    sun.reflect.GeneratedMethodAccessor5852.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:575)
    com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
    com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    com.bea.core.repackaged.springframework.jee.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:104)
    oracle.security.jps.ee.ejb.JpsAbsInterceptor$1.run(JpsAbsInterceptor.java:88)
    oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:299)
    oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:406)
    oracle.security.jps.wls.JpsWeblogicEjbInterceptor.runJaasMode(JpsWeblogicEjbInterceptor.java:61)
    oracle.security.jps.ee.ejb.JpsAbsInterceptor.intercept(JpsAbsInterceptor.java:81)
    oracle.security.jps.ee.ejb.JpsInterceptor.intercept(JpsInterceptor.java:101)
    sun.reflect.GeneratedMethodAccessor863.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:575)
    com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
    com.bea.core.repackaged.springframework.jee.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:66)
    com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:102)
    com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
    weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:22)
    com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:49)
    com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:86)
    com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:102)
    com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:151)
    $Proxy309.getComponentSnapShot(Unknown Source)
    oracle.soa.management.internal.ejb.impl.FacadeFinderBean_4vacyo_FacadeFinderBeanImpl.getComponentSnapShot(FacadeFinderBean_4vacyo_FacadeFinderBeanImpl.java:1604)
    oracle.soa.management.internal.ejb.impl.FacadeFinderBean_4vacyo_FacadeFinderBeanImpl_WLSkel.invoke(Unknown Source)
    weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:567)
    weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:350)
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:143)
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:425)
    weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:117)
    weblogic.work.ExecuteThread.execute(ExecuteThread.java:198)
    weblogic.work.ExecuteThread.run(ExecuteThread.java:165)
    >
    <Aug 5, 2011 10:30:02 AM EDT> <Notice> <Diagnostics> <BEA-320068> <Watch 'StuckThread' with severity 'Notice' on server 'soa_server1' has triggered at Aug 5, 2011 10:30:02 AM EDT. Notification details:
    WatchRuleType: Log
    WatchRule: (SEVERITY = 'Error') AND (MSGID = 'BEA-000337')
    WatchData: DATE = Aug 5, 2011 10:30:02 AM EDT SERVER = soa_server1 MESSAGE = [STUCK] ExecuteThread: '64' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "634" seconds working on the request "oracle.soa.management.internal.ejb.impl.FacadeFinderBean_4vacyo_FacadeFinderBeanImpl", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
    Thread-517 "[STUCK] ExecuteThread: '64' for queue: 'weblogic.kernel.Default (self-tuning)'" <alive, in native, suspended, priority=1, DAEMON> {
    jrockit.net.SocketNativeIO.readBytesPinned(SocketNativeIO.java:???)
    jrockit.net.SocketNativeIO.socketRead(SocketNativeIO.java:24)
    java.net.SocketInputStream.socketRead0(SocketInputStream.java:???)
    java.net.SocketInputStream.read(SocketInputStream.java:107)
    oracle.net.nt.MetricsEnabledInputStream.read(TcpNTAdapter.java:553)
    oracle.net.ns.Packet.receive(Packet.java:249)
    oracle.net.ns.DataPacket.receive(DataPacket.java:94)
    oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:168)
    oracle.net.ns.NetInputStream.read(NetInputStream.java:113)
    oracle.net.ns.NetInputStream.read(NetInputStream.java:96)
    oracle.net.ns.NetInputStream.read(NetInputStream.java:81)
    oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:120)
    oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:75)
    oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1081)
    oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1062)
    oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:588)
    oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:70)
    oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:854)
    oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:918)
    oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1252)
    oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3541)
    oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3605)
    ^-- Holding lock: oracle.jdbc.driver.T4CConnection@1fbc3486[thin lock]
    oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1667)
    weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:123)
    org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:887)
    org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:541)
    org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:530)
    org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:521)
    org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:202)
    org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:192)
    org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:254)
    org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelect(DatasourceCallQueryMechanism.java:245)
    org.eclipse.persistence.queries.DataReadQuery.executeNonCursor(DataReadQuery.java:188)
    org.eclipse.persistence.queries.DataReadQuery.executeDatabaseQuery(DataReadQuery.java:141)
    org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:603)
    org.eclipse.persistence.queries.DataReadQuery.execute(DataReadQuery.java:115)
    org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:589)
    org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2898)
    org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1218)
    org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1190)
    org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1176)
    org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:378)
    org.eclipse.persistence.internal.jpa.EJBQueryImpl.getSingleResult(EJBQueryImpl.java:701)
    weblogic.deployment.TransactionalEntityManagerProxyImpl$QueryImpl.getSingleResult(TransactionalEntityManagerProxyImpl.java:232)
    com.collaxa.cube.persistence.dao.impl.jpa.JpaCubeInstanceDaoImpl.getNumberOfInstances(JpaCubeInstanceDaoImpl.java:439)
    oracle.fabric.CubeServiceEngine.getNumberOfComponentInstances(CubeServiceEngine.java:1962)
    oracle.soa.management.internal.ejb.impl.FacadeFinderBeanImpl.getNumberOfComponentInstances(FacadeFinderBeanImpl.java:1618)
    oracle.soa.management.internal.ejb.impl.FacadeFinderBeanImpl.getComponentSnapShot(FacadeFinderBeanImpl.java:1653)
    sun.reflect.GeneratedMethodAccessor5852.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:575)
    com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
    com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    com.bea.core.repackaged.springframework.jee.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:104)
    oracle.security.jps.ee.ejb.JpsAbsInterceptor$1.run(JpsAbsInterceptor.java:88)
    oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:299)
    oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:406)
    oracle.security.jps.wls.JpsWeblogicEjbInterceptor.runJaasMode(JpsWeblogicEjbInterceptor.java:61)
    oracle.security.jps.ee.ejb.JpsAbsInterceptor.intercept(JpsAbsInterceptor.java:81)
    oracle.security.jps.ee.ejb.JpsInterceptor.intercept(JpsInterceptor.java:101)
    sun.reflect.GeneratedMethodAccessor863.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:575)
    com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
    com.bea.core.repackaged.springframework.jee.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:66)
    com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:102)
    com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
    weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:22)
    com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:49)
    com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:86)
    com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:102)
    com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:151)
    $Proxy309.getComponentSnapShot(Unknown Source)
    oracle.soa.management.internal.ejb.impl.FacadeFinderBean_4vacyo_FacadeFinderBeanImpl.getComponentSnapShot(FacadeFinderBean_4vacyo_FacadeFinderBeanImpl.java:1604)
    oracle.soa.management.internal.ejb.impl.FacadeFinderBean_4vacyo_FacadeFinderBeanImpl_WLSkel.invoke(Unknown Source)
    weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:567)
    weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:350)
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:143)
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:425)
    weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:117)
    weblogic.work.ExecuteThread.execute(ExecuteThread.java:198)
    weblogic.work.ExecuteThread.run(ExecuteThread.java:165)
    SUBSYSTEM = WebLogicServer USERID = <WLS Kernel> SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '96' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-000337 MACHINE = soaprod TXID = CONTEXTID = f5d0b85a929630a2:6eada0f7:1304e0a2bdc:-7ffb-00000000017e1605 TIMESTAMP = 1312554602698
    WatchAlarmType: AutomaticReset
    WatchAlarmResetPeriod: 600000
    >
    Edited by: Brutus35 on Aug 5, 2011 8:04 AM

    my impression is that you have trouble on the DB,
    monitor the sessions to see if there is some table locked, and increase the number of processes on the DB
    you can use SQLDeveloper for that
    anyway your TX should rollback after some time, check that you have a timeout in place, it's better to rollback a TX than having the entire server crash

  • Calling Bpel Process From a Jsp(Need a string output instead of XML object)

    Hi
    I am calling a BPEL process(Synchrononus) from a JSP page, Where Bpel process calls a java web service.The output from Bpel process is returned as an XML object. I need the output in a string format.Please let me know the steps to get the string output.
    I also executed invokeCreditRatingService.jsp(from samples shipped with SOA Suite) that calls CreditRatingService bpel, but i was getting the following output where the rating value is printed as an XML object.
    Output:-
    BPELProcess CreditRatingService executed!
    Credit Rating is oracle.xml.parser.v2.XMLElement@9511c8
    Please let me know, what changes i need to make to get the string output.I followed all the steps given in "orabpel-Tutorial7-InvokingBPELProcesses.PDF" to execute credit rating jsp.
    We are using SOA Suite 10.1.3.1.0 version.Do I need to make any changes to the code, to make it work with this version.
    Thanks
    Vandana.

    The call payload.get("payload") returns, as you have observed, an XMLElement. You can simply convert the XMLElement into an XML string by using a DOMSerializer implementation. The following code is very useful for this purpose:
    http://javafaq.nu/java-example-code-432.html
    Best,
    Manfred

Maybe you are looking for

  • Hint: Beware when using JDev 10.1.3 EA to deploy to 10.1.2 App server!!

    I've struggled a bit with deploying a War packaged application from JDev 10.1.3 to a version 10.1.2 Application Server, and since I've encountered loads of messages in the various forums talking about "Http -'something' when trying to deploy through

  • Final Cut Pro X and JVC camera

    Can anyone who saw the April preview of Final Cut Pro X tell me if it will contain the necessary codec for my JVC GY - HM100U camera? Many thanks.

  • How to implement server side methods in client side player from main.asc?

    Hi, I am developing video player using RTMP NetConnection and NetStream object but it is giving me below Error. Can you please tell me how can I handle this. I have main.asc file form FMS server side but I don't know how to use it.  Async Error found

  • Will the iphone 5 come to sprint?

    i didnt really know whihc forum this went into. but anyway, i have seen a lot of rumors about the iphone coming to sprint. is that true? thats question 1. question 2 is any idea when its coming out? and question 3 is, im planning to get it within a w

  • Quality of pdfs and colour separations for printing purposes

    Having created a 44 page document in Pages, I have exported it as a pdf file so that it can be commercially printed as an A5 magazine. I have used the 'best' option in exporting it as a pdf, but have no idea if that function conforms to PDF-X1A speci