Is the DocumentProcessor thread capable?

Hi everyone,
I'd like to know if the DocumentProcessor is thread capable?
I'm using the BI Publisher 10.1.3.2 APIs to burst mutiple input files at a time. If I keep my program single threaded, everything goes fines. But if I spawn a couple of threads at the same time, it sometimes goes fine or I sometimes get a bunch of :
[092407_104518081][][EXCEPTION] java.io.FileNotFoundException: null\65.xml
     at oracle.apps.xdo.template.pdf.util.FormUtil.createURL(Unknown ...
[092407_104518097][][EXCEPTION] java.lang.NullPointerException
     at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:200)...
[092407_104518097][][EXCEPTION] Error while generating the Document...
[092407_104518097][][EXCEPTION] java.io.FileNotFoundException: null\67.xml (Le chemin d'accès spécifié est introuvable)...
etc etc...
If I wait a couple of milliseconds before spawning each thread, then everything goes fine. Is there a way that each thread can Interfere with another thread? Is the document processor doing some I/O actions involving the same temporary documents or whatsoever?
I've tried to specify a different temporary folder for each thread but I still get those errors. My threads are using the same control file, the same RTF templates but different xml inputs files. Every delivery is a PDF file written in the same folder but with a unique name.
Where am I doing something wrong?!
Thank you,
Guillaume

Thanks for your reply,
Actually, all the exceptions are being thrown by the document processor. The code is as simple as this:
import java.util.Properties;
import oracle.apps.xdo.batch.DocumentProcessor;
public class Burst extends Thread {
private String m_FichierControle = null;
private String m_FichierDonnees = null;
private String m_DossierTemporaire = null;
private ProprieteBean[] m_ProprietesUtilisateur = null;
public Burst(String FichierControle, String FichierDonnees,
String DossierTemporaire,
ProprieteBean[] ProprietesUtilisateur) {
m_FichierControle = FichierControle;
m_FichierDonnees = FichierDonnees;
m_DossierTemporaire = DossierTemporaire;
m_ProprietesUtilisateur = ProprietesUtilisateur;
this.start();
public void run() {
long start = System.currentTimeMillis();
try {
DocumentProcessor dp =
new DocumentProcessor(m_FichierControle, m_FichierDonnees,
m_DossierTemporaire);
if (m_ProprietesUtilisateur != null &&
m_ProprietesUtilisateur.length > 0) {
Properties prop = new Properties();
for (int j = 0; j < m_ProprietesUtilisateur.length; j++) {
prop.put("user-variable:" +
m_ProprietesUtilisateur[j].getAttribut(),
m_ProprietesUtilisateur[j].getValeur());
dp.setConfig(prop);
dp.process();
} catch (Exception e) {
System.err.println(e);
System.out.println("Temps d'exécution burst: " +
(System.currentTimeMillis() - start) + " ms.");
I'm running this by calling :
Burst test1 = new Burst(paramsSet1...);
Burst test2 = new Burst(paramsSet2...);
Burst test3 = new Burst(paramsSet3...);
I'm bad at Threading but I don't see why these would interfere with each other. I'm 75% sure its the Document Processor that is kinda locking files when parsing the RTF or whatsoever... Where am I wrong again :( What threading law am I breaking here ;)
Thank you,

Similar Messages

  • XML Publisher 5.6.2 is the FOProcessor thread capable?

    I keep getting a class not found error when I make my app multi-threaded (see my log file).
    I made sure I was exporting my libraries and also tried registering the class for name, and even instantiated it and in still can't find. This only happens when I make it threaded, otherwise it works just fine, no issues at all.
    This is the class it can't find: oracle.apps.xdo.template.rtf.XSLTFunctions
    Here's the sample call:
    public void foProcessorEngine()
    try
    log4jLogger.info("before foProcessorEngine");
    FOProcessor processor = new FOProcessor();
    processor.setData(getOutputDirectory() + getFileName() + ".xml");
    processor.setTemplate(getOutputDirectory() + getFileName() +".xsl");
    processor.setOutput(getOutputDirectory()+ getFileName() + getFileExt());
    processor.setOutputFormat(FOProcessor.FORMAT_EXCEL);
    oracle.apps.xdo.template.rtf.XSLTFunctions ike = new oracle.apps.xdo.template.rtf.XSLTFunctions();
    processor.generate();
    log4jLogger.info("after foProcessorEngine ");
    catch (XDOException e)
    log4jLogger.error("foProcessorEngine - "+ e, e );
    catch (Exception e)
    log4jLogger.error("generic exception - foProcessorEngine - "+ e, e );
    START OF LOG
    INFO 04-May-2007 12:28:50 - Starting Portal...
    INFO 04-May-2007 12:28:52 - P_CUSTOMER_NUMBER0005276WH020
    INFO 04-May-2007 12:28:52 - P_END_DATE01-JAN-2007
    INFO 04-May-2007 12:28:52 - P_START_DATE01-JAN-2005
    INFO 04-May-2007 12:28:52 - P_DEBUGDBMS
    INFO 04-May-2007 12:28:52 - REGMETVREGMET.rtf
    INFO 04-May-2007 12:28:52 - OUTPUT FORMAT .xls
    INFO 04-May-2007 12:28:52 - Before thread time 1178299732173
    INFO 04-May-2007 12:28:52 - After thread time 1178299732174
    INFO 04-May-2007 12:28:52 - output format value .xls
    INFO 04-May-2007 12:28:52 - file extension .xls
    INFO 04-May-2007 12:28:52 - The file name is VREGMET_188557147
    INFO 04-May-2007 12:28:52 - start of dataEngine
    INFO 04-May-2007 12:28:59 - end of dataEngine
    INFO 04-May-2007 12:28:59 - start of rtfConverter
    INFO 04-May-2007 12:29:04 - end of rtfConverter
    INFO 04-May-2007 12:29:04 - before foProcessorEngine
    INFO 04-May-2007 12:29:04 - data file directory /tmp/reports/VREGMET_188557147.xml
    INFO 04-May-2007 12:29:04 - template file directory /tmp/reports/VREGMET_188557147.xsl
    INFO 04-May-2007 12:29:05 - output file directory /tmp/reports/VREGMET_188557147.xls
    INFO 04-May-2007 12:29:05 - output format 4
    ERROR 04-May-2007 12:29:08 - foProcessorEngine - oracle.apps.xdo.XDOException
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at oracle.apps.xdo.common.xml.XSLT10gR1.invokeProcessXSL(XSLT10gR1.java:586)
    at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:383)
    at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:201)
    at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:161)
    at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1015)
    at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:968)
    at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:209)
    at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1561)
    at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:951)
    at com.valspar.regulatory.portal.common.utility.XMLPublisherUtility.foProcessorEngine(XMLPublisherUtility.java:168)
    at com.valspar.regulatory.portal.common.utility.XMLPublisherUtility.run(XMLPublisherUtility.java:94)
    at java.lang.Thread.run(Thread.java:534)
    Caused by: oracle.xdo.parser.v2.XPathException: Extension function error: Class not found 'oracle.apps.xdo.template.rtf.XSLTFunctions'
    at oracle.xdo.parser.v2.XSLStylesheet.flushErrors(XSLStylesheet.java:1526)
    at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:517)
    at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:485)
    at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:264)
    at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:150)
    at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:187)
    ... 16 more
    Thanks,
    Ike

    Thanks for responding Tim. I'm going to close my SR. One of the portal developers this morning at valspar figured it out. I tested it and it worked!
    Here's the fix:
    Change the setting for the OC4J option -userThreads that should allow programs to spawn threads.

  • HT4847 I have a new iphone and cannot delete the backup from icloud.  It says that it is in use.  I have read some of the other threads and it only seems to be haphazard solutions. Is there a definite way to fix this? I am not able to change icloud accoun

    I have a new iphone and cannot delete the backup from icloud.  It says that it is in use.  I have read some of the other threads and it only seems to be haphazard solutions. Is there a definite way to fix this? I am not able to change icloud accounts.

    Follow the steps in wjosten's post here: https://discussions.apple.com/message/13356770#13356770 (for Windows, substitute Outlook in step 2).

  • The background thread running lazy writer encountered an I/O error

    Hi I have a test server which has thrown the following error
    File system error: A system error occurred while attempting to read or write to a file store. The system might be under memory pressure or low on disk space. Physical file: \\?\F:\MSAS11.DEPLOYAS\OLAP\Data\Prod_KCube.0.db\DIM Flags And Types.0.dim\3.Flag
    Types Key.khstore. Logical file: . GetLastError code: 8. File system error: The background thread running lazy writer encountered an I/O error. Physical file: \\?\F:\MSAS11.DEPLOYAS\OLAP\Data\Prod_KCube.0.db\DIM Flags And Types.0.dim\3.Flag Types Key.khstore.
    Logical file: . Errors in the OLAP storage engine: An error occurred while processing the 'Facts' partition of the 'Main Facts' measure group for the 'Prod_Cube' cube from the Prod_KCube database.
    The cube sits on a not very well maintained server which is used by various users (it is a test server) with the following specs
    Intel(R) Xenon(R) CPU x5690 @3.47GHz
    24GB Ram
    64 Bit operating system.
    The Cube data and logs are on separate drives and have plenty data but the C drive (where SQL Server is installed) only has3.5Gb of space left.
    It's a fairly big cube and I've managed to get it running by processing dimensions and facts bit by bit but errors when processed all together.
    What could be causing the errors above?

    Hi aivoryuk,
    According to your description, you get the lazy writing error when processing partitions. Right?
    In this scenario, the issue may cause by low memory for SSAS and lack of disk space. Please consider configure
    Server Properties (Memory Page) and increase
    memory setting for SSAS. If the .cub file is located in C drive, please reserve more disk space.
    Please refer to a similar thread below:
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/21bf84c5-f89a-464a-a5f1-2649fae5eb1e/while-processing-large-cubes-various-file-system-errors-the-background-thread-running-lazy-writer?forum=sqlanalysisservices
    Best Regards,
    Simon Hou
    TechNet Community Support

  • How can I use the same thread to display time in both JPanel & status bar

    Hi everyone!
    I'd like to ask for some assistance regarding the use of threads. I currently have an application that displays the current time, date & day on three separate JLabels on a JPanel by means of a thread class that I created and it's working fine.
    I wonder how would I be able to use the same thread in displaying the current time, date & day in the status bar of my JFrame. I'd like to be able to display the date & time in the JPanel and JFrame synchronously. I am developing my application in Netbeans 4.1 so I was able to add a status bar in just a few clicks and codes.
    I hope somebody would be able to help me on this one. A simple sample code would be greatly appreciated.
    Thanks in advance!

    As you're using Swing, using threads directly just for this kind of purpose would be silly. You might as well use javax.swing.Timer, which has done a lot of the work for you already.
    You would do it something like this...
        ActionListener timerUpdater = new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                // DateFormat would be better, but this is an example.
                String timeString = new Date().toString();
                statusBar.setText(timeString);
                someOtherLabel.setText(timeString);
        new Timer(1000, timerUpdater).start();That code will update the time once a second. If you aren't going to display seconds, you might as well increase the delay.
    The advantage of using a timer over using an explicit thread, is that multiple Swing timers will share a single thread. This way you don't blow out your thread count. :-)

  • Multiple threads but they are using the same thread ID

    I'm a newbie in Java programming. I have the following codes, please take a look and tell me what wrong with my codes: server side written in Java, client side written in C. Please help me out, thanks for your time.
    Here is my problem: why my server program assigns the same thread ID for both threads???
    .Server side: start server program
    .Client side: set auto startup in /etc/rc.local file in a different machine, so whenever this machine boots up, the client program will start automatically.
    ==> here is the result with 2 clients, why they always come up the same thread ID ????????
    Waiting for client ...
    Server thread 1024 running
    Waiting for client ...
    Server thread 1024 running
    But if I do like this, they all work fine:
    .Server side: start server program
    .Client side: telnet or ssh to each machine, start the client program
    ==> here is the result:
    Waiting for client ...
    Server thread 1024 running
    Waiting for client ...
    Server thread 1025 running
    server.java file:
    import java.io.*;
    import java.net.*;
    import java.awt.*;
    import java.util.Hashtable;
    import java.util.Enumeration;
    import java.util.regex.Pattern;
    import java.util.Date;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.text.*;
    public class Server extends Frame implements Runnable
    private ServerThread clients[] = new ServerThread[50];
    private ServerSocket server = null;
    private Thread thread = null;
    private int clientCount = 0;
    //some variables over here
    public Server(int port)
    //GUI stuffs here
    //network stuff
    try
    System.out.println("Binding to port " + port + ", please wait ...");
    server = new ServerSocket(port);
    System.out.println("Server started: " + server);
    start();
    catch(IOException ioe)
    System.out.println("Can not bind to port " + port + ": " + ioe.getMessage());
    public boolean action(Event e, Object arg)
    //do something
    return true;
    public synchronized void handle(int ID, String input)
    //do something
    public synchronized void remove(int ID)
    int pos = findClient(ID);
    if (pos >= 0)
    //remove a client
    ServerThread toTerminate = clients[pos];
    System.out.println("Removing client thread " + ID + " at " + pos);
    if (pos < clientCount-1)
    for (int i = pos+1; i < clientCount; i++)
    clients[i-1] = clients;
    clientCount--;
    try
    {  toTerminate.close(); }
    catch(IOException ioe)
    {  System.out.println("Error closing thread: " + ioe); }
    toTerminate.stop();
    private void addThread(Socket socket)
    if (clientCount < clients.length)
    clients[clientCount] = new ServerThread(this, socket);
    try
    clients[clientCount].open();
    clients[clientCount].start();
    clientCount++;
    catch(IOException ioe)
    System.out.println("Error opening thread: " + ioe);
    else
    System.out.println("Client refused: maximum " + clients.length + " reached.");
    public void run()
    while (thread != null)
    try
    {       System.out.println("Waiting for a client ...");
    addThread(server.accept());
    catch(IOException ioe)
    System.out.println("Server accept error: " + ioe); stop();
    public void start()
    if(thread == null)
    thread = new Thread(this);
    thread.start();
    public void stop()
    if(thread != null)
    thread.stop();
    thread = null;
    private int findClient(int ID)
    for (int i = 0; i < clientCount; i++)
    if (clients[i].getID() == ID)
    return i;
    return -1;
    public static void main(String args[])
    Frame server = new Server(1500);
    server.setSize(650,400);
    server.setLocation(100,100);
    server.setVisible(true);
    ServerThread.java file
    import java.net.*;
    import java.io.*;
    import java.lang.*;
    public class ServerThread extends Thread
    private Server server = null;
    private Socket socket = null;
    private int ID = -1;
    InputStreamReader objInStreamReader = null;
    BufferedReader objInBuffer = null;
    PrintWriter objOutStream = null;
    public ServerThread(Server server, Socket socket)
    super();
    server = _server;
    socket = _socket;
    ID = socket.getPort();
    public void send(String msg)
    objOutStream.write(msg);
    objOutStream.flush();
    public int getID()
    return ID;
    public void run()
    System.out.println("Server thread " + ID + " running");
    while(true)
    try{
    server.handle(ID,objInBuffer.readLine());
    catch(IOException ioe)
    System.out.println(ID + "Error reading: " + ioe.getMessage());
    //remove a thread ID
    server.remove(ID);
    stop();
    public void open() throws IOException
    //---Set up streams---
    objInStreamReader = new InputStreamReader(socket.getInputStream());
    objInBuffer = new BufferedReader(objInStreamReader);
    objOutStream = new PrintWriter(socket.getOutputStream(), true);
    public void close() throws IOException
    if(socket != null) socket.close();
    if(objInStreamReader != null) objInStreamReader.close();
    if(objOutStream !=null) objOutStream.close();
    if(objInBuffer !=null) objInBuffer.close();
    And client.c file
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <netinet/in.h>
    #include <arpa/inet.h>
    #include <netdb.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <unistd.h> /* close */
    #include <time.h>
    #define SERVER_PORT 1500
    #define MAX_MSG 100
    //global variables
    long lines = 0;
    int sd = 0;
    char command[100];
    time_t t1,t2;
    double timetest = 0.00;
    int main (int argc, char *argv[])
    int rc, i = 0, j = 0;
    struct sockaddr_in localAddr, servAddr;
    struct hostent *h;
    char buf[100];
    FILE *fp;
    h = gethostbyname(argv[1]);
    if(h==NULL) {
    printf("unknown host '%s'\n",argv[1]);
    exit(1);
    servAddr.sin_family = h->h_addrtype;
    memcpy((char *) &servAddr.sin_addr.s_addr, h->h_addr_list[0], h->h_length);
    servAddr.sin_port = htons(SERVER_PORT);
    /* create socket */
    sd = socket(AF_INET, SOCK_STREAM, 0);
    if(sd<0) {
    perror("cannot open socket ");
    exit(1);
    /* bind any port number */
    localAddr.sin_family = AF_INET;
    localAddr.sin_addr.s_addr = htonl(INADDR_ANY);
    localAddr.sin_port = htons(0);
    rc = bind(sd, (struct sockaddr *) &localAddr, sizeof(localAddr));
    if(rc<0) {
    printf("%s: cannot bind port TCP %u\n",argv[1],SERVER_PORT);
    perror("error ");
    exit(1);
    /* connect to server */
    rc = connect(sd, (struct sockaddr *) &servAddr, sizeof(servAddr));
    if(rc<0) {
    perror("cannot connect ");
    exit(1);
    //send register message
    rc = send(sd, "register\n", strlen("register\n"), 0);
    //if can't send
    if(rc < 0)
    close(sd);
    exit(1);
    //wait here until get the flag from server
    while(1)
    buf[0] = '\0';
    rc = recv(sd,buf,MAX_MSG-1,0);
    if(rc < 0)
    perror("receive error\n");
    close(sd);
    exit(1);
    buf[rc] = '\0';
    if(strcmp(buf,"autoplay")==0)
    //do something here
    else if(strcmp(buf,"exit")==0)
    printf("exiting now ....\n");
    close(sd);
    exit(1);
    return 0;

    Yes......I do so all the time.

  • Is there a way to figure out what the current thread is?

    I've got the following snippet of code:
    // create a new thread. If the current thread is not this new thread, return
    Thread CountDownThread = new Thread("CountDownThread");
    CountDownThread.start();
    if (/*CURRENT THREAD*/.getName() != CountDownThread.getName()) {
         System.out.println ("I'm not CountDownThread. I'm leaving.");
         return;
    // current thread should be new thread. Therefore start the countdown
    CurrTime = InitTime;
    while(CurrTime.charAt(0) != '-') {      // go until current time is negative
         CurrTime = C.countDown();       // returns the current time based on the difference between the initial and elapsed time
         setText(CurrTime);                   // display current time in JLabel
    C.reset();
    setText(C.getCurrTime());What I'm trying to do is get a clock (C) to count down and display the time remaining in a JLabel (this snippet is taken from a method within that very JLabel which I'm extending from javax.swing.JLabel). While it's counting down, I'd like for the program to go off and do other things. Therefore, I'm trying to create a new thread that carries out the task of counting down while the original/main thread moves on to do other things.
    Please have a look at the above code and tell me if I'm on the right track. The one thing I don't know how to do is figure out how to tell which thread the current thread is. I'm assuming that both the new thread and original/main one will execute the if statement, the new one after it returns from start() (which I haven't defined). The original/main one will detect that it is not the new thread and return, whereas the new thread will and go on to the while loop. In the while loop, it will count down the clock until it reaches 0, after which point it will reset it and die.
    If I'm on the right track, all I need to know is how to detect which thread is currently executing. If I'm not on the right track, what would be the best way to do this?

    What? No! No Thread terminates on the return of start(). Those two events are unrelated!Uh... I think you misunderstood what I said.
    I didn't say that CountDownThread terminates upon returning from start() (which is what it sounds like you interpreted from me); I said that the thread that CountDownThread creates terminates once CountDownThread returns from start() (i.e. like any other local variable/object). This, of course, assumes that CountDownThread has a Runnable object on which to call its run() method (am I right?), in which case my code above doesn't create a new thread at all (i.e. CountDownThread.start() is executed within the main/original thread) - am I right?
    No, run() doesn't call start()! That would be stupid.Again, you misunderstood. I shouldn't need to explain this one. A simple reference to an ordinary dictionary on the words 'former' and 'latter' should suffice :)
    Anyway, all joking aside, I have now improved my code and it works! Here's what it looks like:
    ClockJLabel.java
    package MazeMania.clock;
    public class ClockJLabel extends javax.swing.JLabel {
    private Clock C;
    private ClockJLabelsRunnable CJLR;
    public ClockJLabel() {
      C = new Clock();
      CJLR = new ClockJLabelsRunnable();
      setText(C.getCurrTime()); // should be 00:00:00:00
      setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
      // need to figure out how to set the size so that it sticks
      setForeground(new java.awt.Color(255, 0, 0));
      setBackground(new java.awt.Color(0, 0, 0));
      setOpaque(true);
    // starts the clock counting up indefinitely from 0
    public void start() {
      (new Thread(new Runnable() {
        public void run() {
         while(true) setText(C.getElapsedTime());
       })).start();
      //System.out.println("Started clock...");
    // starts the clock counting down from an initial time and runs this count down in a separate thread
    public void countDown(String InitTime) {
      // initialize the clock
      try {C.initClock(InitTime);}
      catch(java.text.ParseException PE) {
       System.out.println(PE.getMessage());
      // initialize JLabel's display
      setText(C.getCurrTime());
      // prepare Runnable and give it to new Thread. New Thread starts count down.
      CJLR.task = CJLR.COUNTDOWN;
      CJLR.CJL = this;
      Thread CountDownThread = new Thread(CJLR);
      CountDownThread.start();
    public Clock getClock() {
      return C;
    }ClockJLabelsRunnable
    package MazeMania.clock;
    import java.lang.Runnable;
    class ClockJLabelsRunnable implements Runnable {
    public static int COUNTDOWN = 1;
    public static int COUNTUP = 2;
    // NOTE: this Runnable doesn't test for the proper setting of these variables
    public int task = 0;
    public ClockJLabel CJL = null;
    public void run() {
      Clock C = CJL.getClock();
      while(C.countDown().charAt(0) != '-') {CJL.setText(C.getCurrTime());}
      C.reset();
      CJL.setText(C.getCurrTime());

  • Rather than persists in the future thread...

    The point I was making would be for Archs documents to pick up where man pages leave off, but whatever.
    If you think I stated Arch must fix man pages, not so. I was intending to show that docs as a whole, leave whole subjects unhandled, Arch could provide the answers in its own docs and come out as a hero.
    Or maybe not.
    And remember, users who cannot configure ppp cannot get on the internet to get the ppp configuration docs. Or any other docs, for that matter. One failed configuration needing web documents might leave the newbie stranded.
    Or maybe not.
    I personally think that a lot of configuration has to be made before Linux (Arch or others) will communicate over the internet to a remote website, so as to allow documentation to be visible..... but hey, maybe I missed something? Like the document to get a modem setup? So I could get web based documents? Chicken and egg?
    Maybe not, eh?
    As for the concept of needing to be an experienced admin - these folks usually do not need any docs. That compares to bad docs to a newbie - essentially no docs. Missing docs and no internet access are also useless. Thus, the newbie without documents needs the only thing which gets anyone else through the issue - the newbie needs experience, because the docs are weak or missing or erroneous. Try as you might, that is an issue I went through. Take, for example, when I needed network assistance. Archs forums were not the first place I went asking for help, believe me; I asked and am still asking. 2 years now, and I'm just getting told Samba. Need I say this is baloney? That issue is not Archs fault, but Arch could have a smashing success on its hands if it were to document a few critical areas as well as 0.2 was documented.
    Installing and partitioning... What can I say... apeiro is not mentioning anything I've PM'd him about: secondary hard disks getting reformatted. My pm brought me the answer that most Archers never repartition, so the script was.... well, I guess you could say it was a shot in the dark. Fine, but the PM stated the alternative was something like 'I usually use the commandline stuff and simply reformat the existing partitions'.
    Why the **** would an inexperienced newbie set up partitions outside of using the installer?? The Arch docs tells the newbie to use the installer to partition their hard disks! What, exactly, is the newbies idea of an installers purpose? Are you a newbie when you decide what a newbie has for skills? The installer obliterated gigabytes of data, I trusted that it was going to perform safely, and yet nobody ever used it to learn of the glitch? Ooookkaaaaayyyy.
    Folks, the docs said to use the installer. Never mentioned possibly partitioning from the command line. Take your pick, the newbie was not at fault for following the docs.
    I'll run along, because I cannot possibly be speaking truth. Neither am I telling you where I had problems. This is cannot be feedback, it must be dunbars rantings. Does Arch have a future when feedback is considered trolling or flaming the developers? Lighten up, folks, I had once been trying to offer help and sought to get help.
    I know this is a labor of love for you all; in many ways, Linux is a labor of mine as well. Sadly, you are not hearing some issue that could help make Arch the distro that some folks want it to be.

    dunbar wrote:Step by step: I mentioned a few weak areas that newbies would not know how to address.
    I mentioned that newbie would not necessarily have the skills to get the correct docs from a myriad of websites.
    Which appear (and frequently are) obsolete.
    Well, then we include the docs and then non-newbies would complain that we are cluttering the filesytem and you would complain because those documents are obsolete. sound familiar? i have seen this argument before and there is not winning it. people bitch about the manpages, docs, etc ALL THE TIME. you must know that. so the best we can do is add your concerns to our own documents and add necessary documents to the files.
    When their internet connection was what had failed, the internet doc is not available.
    And when they had no Xwindows in which to read HTML documents,
    and nothing tells the newbie about CLI browsers.
    i would expect that no absolute green newbies would try arch so those newbies that do show up i would assume have some linux experience (one can be a newbie and have some experience) so i would assume that they would know about lynx or links browsers or at least know how to use cat and less.
    another point about this is that if a newbie does not even know how to use cat, less, or a cli editor to view files then they would be very very f**ked with arch linux and having self contained documents would be pretty pointless. so again i would ask is it not wise to print out/write down any relevent install/configuration instructions? you do know how to write since you already say you don't have a printer?
    okay so if we include install configuration data in the installer will you know how to access it? is it fair to tell the user that it is in such and such directory and you can access it through say vc1-4? should we scrap our online docs altogether and just have them self contained?
    The network thing was changed along the way - IPX/SPX was part of the issue, my 5 port switch is another part. I am not berating you, sarah31, nor am I asking anyone to re-write man pages, etc. as several posts seemed to attribute to me. The man pages are the weak spot, Arch docs need to go from there. Never wanted to say more than that.
    and all i wanted to know is what apps do we extend our documentation to? all of them? are you saying that all our apps need extended docs? can you point me to one distro that has extended documents of all their applications? besides ppp what would YOU extend? it is fair to ask this of arch developers/users but they really need to know just what manpages are defunct and have no bearing on arch.
    i would not expect a request like this would get fulfilled too quickly there are lots of applications' man pages and docs to go through then the developers would have to determine what is needed and what is not.
    as for manpages......i used to find them unreliable but to be honest most manpages i have viewed lately have been very clear and concise about how to operate/configure apps. i am not saying this to contradict you but i say it honestly. when i have been unable to find someone to ask on this forum or irc manpages normally do the trick for me. (and don't say it is because i am some expert with linux because i a definitely not)
    I'm trying to point out that A] with a presumed goal of gaining Linux users,
    B] Arch, being small, uncluttered and likely attractive to newbies (small draws newbies because it is so small (dialup accessible but only one big download at a time) and older systems where XP won't fit on their disks, etc) and also
    C] since Arch had very tight documents covering what needed to be done (but might need more topics covered), I felt that was likely going to lead to newbies arriving here in some situations that
    D] Arch clearly tries to assume will not need the attentions of forum members (which have the skills) and
    E] the newbie does not have the skills.
    That would lead to the assumption that Arch was not interested in the users needs.
    with respect to this.....well what can i say but you are a complete ***hole. for one thing small does not always attract newbies in fact i know ALOT ALOT ALOT of people that will not even try arch or similar distros because they are small. most people want the choice to kludge up their system if they like but arch is not in this realm yet because we do not offer alot of packages.
    i agree we need more stuff covered in our documents and you would not find a single user or developer that would disagree with you. So i guess this point you make throws out your idea of extending the manpages because that is not a concise project (for example manpages for transcode are good but to get into all the basics a newbie would need to know would require one to be alot more verbose similarily with networking documents)?
    to say that we here do not pay attention to users is ABSOLUTELY THE WRONG ANSWER. there are only two pages of unanswered post and considering there are always post that are merely statements that do not need to be answered that is very good. in fact if you even bothered to check there are only 79 unanswered posts out of 4512. that's 1.75% of the posts on the forum are unanswered. besides that there are always questions that no one has an answer to. obscure problems do exist i know i have hit many in my ventures in any OS.
    besides this forums are a free service. no one is under obligation to use it user AND developers alike. no one is paid here so don't diss anyone and don't feel that anyone is obligated to answer you.
    i can also say that you are a complete arrogant ass for saying arch does not care about its users. we don't care about you that is for certain. but i can guarantee that everything i did every package i made, upgraded, donated, fixed, etc was for the user. people wanted openoffice i spent a week building it then it got broken with the upgrade to gcc 3.3 i spent another week trying to fix it without luck then judd spent 3 days compiling and patching 1.1. so do you EVER say we don't fucking care you little ingrate.
    The perceived 'lack of clarity' on my part is because I am still a newbie. I might have a few things working under Slackware, but I'm not certain, today, where I even made the changes. I'm not asking for hints on how to keep a notebook, I have one, it is 40 miles away, I cannot discuss Linux by reading my notes or grepping my config files, they are 40 miles away. I cannot log into my Linux PC, I only have dial up, the only telephone line in my house is for voice communications. DSL is too far away, Cable is too expensive.... have I never said any of this before? No, not in this thread, but I've always been a hardliner on those points sarah31. I do not match up with what is assumed of me. But here I am, posting, despite my ineptitude.
    "Waaagh i'm a newbie. waggh i don't have highspeed pity me pity meee!"
    there are lots of users on dialup here including developers so we don't give a flying f**k.
    I believe the deepest undercurrent I see here is diverging viewpoints of what Arch is and diverging goals for Arch. My views are different from a few who assume the Archer has the skills, hApy seems to have a third viewpoint, and yet a third viewpoint exists.
    yeah and you are saying we have to conform to your view. typical. funny we seem to be getting more and more users all the time both newbie and non newbie and this despite having a completely uncaring development team and a horrendous set of docs. one of the funny things is that many of the newbies recently are all dialup like you and they still take time to make irc interesting or contribute packages.
    If my posts reflect an atmosphere of bewildering viewpoiints, I'm not surprised - I've tried to reply to differing posts which take differing opinions; I suppose it is frustrating to anyone to reply to 3 posts at once. I'm replying in order to offer my view of when I was a frustrated newbie (this morning, I think ;-) ). Remember, I was told by a certain forum member that, most certainly, dunbar was a slackware user and the assumption was that he must be nearly expert - yet, I declared, no, I'm not an expert and I freely admit a lack of skills. I was not the one who estimated dunbars skills, Sarah31.
    oh you are soooo subtle in your insults. come on you tell me after hundreds of installs and two years of using linux you don't know anything? find me five green newbies that know how to grep or know to look online for information. personally i and many others here and elsewhere have little time for someone who cries about being a newbie when they obviously aren't.
    what is it some sort of ploy to make people feel sorry for you or shorten your look online for info that you likely could find in two minutes? spare me. up to one year you are a n00b after that you are not.
    I'm definitely not interested in dissing anyone, not you, nor Gyroplast, nor Apeiro, nor hApy .....
    hmmm you care to stand by that or should i pull out several quotes to the contrary?
    I have pointed out that early on, Arch was interested in being Judds perfect distro... did anyone ask him if he ever said that? As I said, I can offer to cut and paste, if you wish.
    so your point is? is this a bad thing? is it not possible for many of us to believe it is the perfect distro for us as well? why not diss yoper for claiming to be THE distro.
    Yet, I'm clearly getting 2 viewpoints in response to me repeating that fact. Thus, in order to push the reader away from their position, so as to get them to walk in my shoes, I post from different directions aiming toward one central condition. Is the issue me, and me alone? Or did the issue exist, and I'm guilty of responding to all viewpoints and thus I'm guilty of pointing it out?
    i have been in your shoes and i often get put back in your shoes when i start to use or investigate applications or areas of linux i have never explored before. so whats your point? if it was to fix up the documentation? that was a goal for some time now in fact a few users have made it an ongoing thing.
    you are not the only one that is a newbie here nor are you the only one here. there are many things that developers must balance when they do their duties. there will never be a distro that will satisfy all a user's needs but i can tell you that the arch team does try to please as many people as possible. so yeah i think you are the issue to some extent. you could have come in here and politely explained what it is that you felt needed improvement but instead you came in and whine and cried that you were so abused and that we had to change to please you. it was all about you anyone can easily extract that from the way you keep flipping between i'm a newbie, i'm not a newbie but i speak for newbies. if you cannot find the offesive comments you have made along the way or see how some people came to the conclusions they did then it is your fault.
    Anyway, you mentioned the ethernet thread.... thydian is evidently new here. Lets explain that issue out loud (since you already raised the matter). I offered to write a document regarding Ethernet setup, I was not shown what to do (frozdsolid posted that they were "pretty sure that's necessary"). I do not assume that every member here reads every posted message; thus, I believe I had read the opinion of someone who was as newbie to Arch as I myself was a newbie (frozdsolids title still shows only 4 posts even today). Nobody here 'handed me an answer' as some might conclude from your post.
    well YOU may not have gotten answer but people DID try to answer your question and, in fact, the answer is there. but you could not extract it or did not know how to ask the question properly to get the result you desired.
    but of course we are the bad guys here because we took the time to try and give you an answer. man you are such a wanker....
    I posted everywhere else on the internet about my situation using IPX/SPX, I heard that it was a dead protocol. I finally found information about IPX/SPX, it was not herein, so the forum was of no use in that instance - that is a fact, sarah31. Now that I have concluded that IPX/SPX was not the best choice and changed the rest of the household over to TCP/IP...... the IPX/SPX issue is no longer the focus, so I dropped the subject; until I was  6 months later, I came back here, saw BluPhoenixs post and was a bit confused. That lead to him suggesting DOSemu, I stated no, that was not preferred, etc. etc. I ultimately thanked BluPhoenix, stated why I was going to drop the issue, and I left the thread cold.
    so why insist on blaming us for something that we tried to answer but was obviously beyond our knowledge? you did it at the end of that thread and you constantly do it here. how many other people did you verbally assault along the way?
    The whole thing got misdirected, away from what I was asking for, as if the topic was no longer my decision alone.
    what a pile of BS. it was YOUR thread so get in there and assert yourself. threads get out of hand sometimes but the original poster can easily get control again if they have a pair.
    i know for a fact that the people he chose to insult would and have tried to help him but he blows them off. i know too that the head developer is VERY open to user contributions yet dunbar chose not to contribute.
    The reasons should be evident by now - when I offered to contribute, I had the time; 6 months of time transpired, I was not able to write because I had no answers with which to generate such a document. I had to revoke the offer. I am taken by surprise that anyone would say I was given the necessary information!
    BS again you just stated that you got your answer (outside of our forum) so you could have easily posted back with what you had found out and then provided documentation later. and you mean to tell me that you have not had time in the last six months to wing something together. shit you have practically written a novel here.
    it is obvious to me that you just want to guard that knowledge and us it to flame and troll here. once you had the answers you were sure to come back and flame that thread and continue flaming on a regular basis. what an ass.
    I've known you to be patient, sarah31 (and you are yet teaching me as I write), but when you say I'm taking great pains to insult someone - while I'm waiting months for forum responses and I'm reading internet documents that are obsolete and these are docs which talk about a different distro, refer to a different kernel, puts files in a different location????
    yeah so you waited for an answer and didn't get one...it happens. you stated that barely anyone knew the answer. fianlly you got one and then came back and rudely blamed us for poor documentation and a barrel of other things. nice guy.
    all i saw was orelein answer you in a nice and proper fashion and you called him eliteist. you also were rather rude about judd in your first post in the future thread. so yes i see all throughout attempts to belittle and brate and not one instance of sober commentary from you.
    and here you are again balming us for online docs that are not ours.
    That is not appropriate, ever, to assume that the newbie will not find older docs and will know enought to discard the incorrect ones.
    this is not limited to newbies.....it can definitely be difficult finding what you need online.
    And since most internet docs are coasting along since, for example, 1999 (re: the IPX/SPX how-to)
    well if you are checking out and obscure problem that is actually now obsolete then sure the fucking doc will be old but you make is sound like ALL docs are old. so i have to assume that you are very much an idiot because i have found most documentation for most current issues to have current docs. most applications will upgrade their docs as they upgrade or do you even notice that? are you to self absorbed to go around and find out if your wild accusations actually have any merit?
    once again, and I'll ask this, and directly of you, sarah31, why would any newbie assume that 4 year old document applied to their situation??
    well knowing how many newbies are i would expect them to ask if docs are relevant. or they could possibly look into some of the information. if it was not producing answers...wow i think they would ask for help again. shit do you even pay attention to how newbies act on justlinux?
    :oops: I'd ask that people remove useless web documents, but I fear that I'd get only 4 responses. That is reality, not sarcasm.
    hmmm remove docs, add docs which is it? fyi arch removes most docs except in rare circumstances. if those docs are html they are html. if a n00b doesn't know how to view them i expect they would ask( that is if they are outside x).
    dunbar...stick with slack because arch will never please you. slack is a very nice distro that should have the balance arch does not afford you. that is the great thing about a linux .... if you don't like one flavour then try another. just don't go back to the ice cream dealer and berate him for selling you your choice...get the point (if you don't then fine i expected that)

  • How do I find the address -thread - of a file. I used to use spotlight but after switching to Mountain Lion it no longer gives me this.

    How do I find the address -thread - of a file. I used to use spotlight but after switching to Mountain Lion it no longer gives me this.

    Hold Command-Option while pointing to an item in the Spotlight list. Or Command-Click will show the item in the Finder.

  • I have a doubt about The Single-Thread Rule

    The [url http://java.sun.com/docs/books/tutorial/uiswing/overview/threads.html#rule]Single Thread Rule states:
    Rule: Once a Swing component has been realized, all code that might affect or depend on the state of that component should be executed in the event-dispatching thread.
    I began to wonder about this because so much code seems to work just fine when it isn't executed in the event dispatching thread. Why are there exceptions? I went looking for some code which acted differently when executed on the event thread than when it was not. I found this
    http://forum.java.sun.com/thread.jsp?forum=57&thread=410423&message=1803725#1803725
    Now I started wondering why this was the case. What I found was that DefaultCaret adds a document listener to the document of the JTextComponent. In this listener, the insertUpdate() method specifically tests if it is running on the event dispatch thread and if it is, it updates the caret position.public void insertUpdate(DocumentEvent e) {
        if (async || SwingUtilities.isEventDispatchThread()) {
            // ... update the caret position ...
    }I then copied the code from DefaultCaret and made a MyCaret. I needed to tweek the code a little bit, but it ran. I removed the event thread test. It worked outside the event thread. There was a small difference in the results though. The textarea did not scroll all the way to the bottom. Almost, but not quite. I didn't test enough to make sure this was the only problem, but there was at least one problem.
    Now I started think about why this would be. The thought crossed my mind that the order of the events which were posted to the event queue were probably important. Sun found bugs when components were updated out of the event thread, so they essentially ignored events which weren't on the event thread and created the The Single-Thread Rule.
    A few days pass. I'm starting to wonder if Sun could have done a better job making Swing components thread safe. I also don't know that this specific case I found was the rule or the exception to the rule. But without insight into the design philosopy of Swing, I would have to examine all their components and see how they have written them and see if I can come up with a better design. That sound like a lot of work. Especially without getting paid for it.
    But wait a second, all you have to do is call the append() method of JTextArea on the event thread. If that is the case, why didn't they write the freakin component that way? Well, I'll try itclass MyTextArea extends JTextArea {
      public MyTextArea(int rows, int columns) { super(rows,columns); }
      public void append(final String text) {
        if (SwingUtilities.isEventDispatchThread()) super.append(text);
        else {
          SwingUtilities.invokeLater(new Runnable() {
            public void run() { myAppend(text); }
      private void myAppend(String text) { super.append(text); }
    }I change [url http://forum.java.sun.com/thread.jsp?forum=57&thread=410423&message=1803725#1803725]camickr's code to use a MyTextArea and it works fine without calling from the event thread. I've essentially moved The Single-Thread Rule to the component itself rather than relying on each and every one of the [url http://www.aboutlegacycoding.com/default.htm?AURL=%2FSurveys%2FSurvey6intro%2Easp]2.5 million Java programmers worldwide to use SwingUtilities.invaokeLater().
    Now for my question...
    Why didn't Sun do this?

    Swing is slow enough as it is. Lets not make it slower
    just
    because dense "programmers" don't know what they are
    doing.I agree with you in defending the current model, but aren't you a bit harsh there?!? ;-)
    Well, there are a number of not-so-dense programmers that expect such high-level components to be thread-safe. The question is worth asking whether Sun intentionally favor the explicit thread management for performance reasons, or whether this was an oversight.
    I'd go for the former (intentional) : indeed any GUI toolkit is inherently thread-based; there is always a distinction between the graphical thread(s) and the application threads - and the programmer always has to manage explicit thread creation to handle long-running event handlers without blocking the event dispatching thread. Extending thread concerns to the updating of components is therefore not a big move.
    So it seems fair that a core GUI toolkit does not hide thread issues (though to the best of my knowledge there is no such limitation in updating AWT components), or at least that's what Sun deemed.
    An ease-of-use-focused toolkit wrapping the core toolkit for thread-safety can be provided as a third-party product. Though I agree that wrapping the dozens of existing widgets and hundreds of methods is cumbersome - and the lack of such products probably shows it would have a low added value to trained developpers.
    Because your way is an extra method call and if
    statement, neither of which is necessary if you already know you
    are in the correct thread. Now count the number of methods
    which will need to be changed (and add up the extra cost).Indeed it's quite common to update several properties of several widgets in one bulk (when user clicks "OK", add a row to the table, change the title of the window, update status bar, re-enable all buttons, change some color,...).
    In this case explicit thread management doesn't spare one if but a dozen of redundant ifs!
    Note that there could have been if-less ways to cope for thread safety, such as creating a copy of the component's model when a change is made to a component, and switching the model only before paint() is called in the event-dispatching - of course coalescing all changes into the same "updated" model until paint() is called.
    But this would trade ease of use for redundant memory consumption, especially for some components with potentially huge models (JTree, JTable, JTextArea,...). And Swing appears to be already quite memory-greedy!

  • Why can't I interrupt the main thread from a child thread with this code?

    I am trying to find an elegant way for a child thread (spawned from a main thread) to stop what its doing and tell the main thread something went wrong. I thought that if I invoke mainThread.interrupt() from the child thread by giving the child thread a reference to the main thread, that would do the trick. But it doesn't work all the time. I want to know why. Here's my code below:
    The main class:
    * IF YOU RUN THIS OFTEN ENOUGH, YOU'LL NOTICE THE "Child Please!" MESSAGE NOT SHOW AT SOME POINT. WHY?
    public class InterruptingParentFromChildThread
         public static void main( String args[] )
              Thread child = new Thread( new ChildThread( Thread.currentThread() ) );
              child.start();
              try
                   child.join();
              catch( InterruptedException e )
    // THE LINE BELOW DOESN'T GET PRINTED EVERY SINGLE TIME ALTHOUGH IT WORKS MOST TIMES, WHY?
                   System.out.println( "Child please!" );
              System.out.println( "ALL DONE!" );
    The class for the child thread:
    public class ChildThread implements Runnable
         Thread mParent;
         public ChildThread( Thread inParent )
              mParent = inParent;
         public void run()
              System.out.println( "In child thread." );
              System.out.println( "Let's interrupt the parent thread now." );
              // THE COMMENTED OUT LINE BELOW, IF UNCOMMENTED, DOESN'T INVOKE InterruptedException THAT CAN BE CAUGHT IN THE MAIN CLASS' CATCH BLOCK, WHY?
              //Thread.currentThread().interrupt();
              // THIS LINE BELOW ONLY WORKS SOMETIMES, WHY?
              mParent.interrupt();
    }

    EJP wrote:
    I'm not convinced about that. The wording in join() suggests that, but the wording in interrupt() definitely does not.Thread.join() doesn't really provide much in the way of details, but Object.wait() does:
    "throws InterruptedException - if any thread interrupted the current thread +before+ or while the current thread was waiting for a notification. The interrupted status of the current thread is cleared when this exception is thrown."
    every jdk method i've used which throws InterruptedException will always throw if entered while a thread is currently interrupted. admitted, i rarely use Thread.join(), so it's possible that method could be different. however, that makes the thread interruption far less useful if it's required to hit the thread while it's already paused.
    a simple test with Thread.sleep() confirms my expected behavior (sleep will throw):
    Thread.currentThread().interrupt();
    Thread.sleep(1000L);

  • Calling a delegate on the UI thread from a work thread inside a child class.

    Hi All,
    I've run into a snag developing a WPF multithreaded app where I need to call a method on the UI thread from my work thread, where the work thread is running a different class.
    Currently I am trying to use a delegate and an event in the 2nd class to call a method in the 1st class on the UI thread. This so far is not working as because the 2nd class is running in its own thread, it causes a runtime error when attempting to call
    the event.
    I've seen lots of solutions referring to using the dispatcher to solve this by invoking the code, however my work thread is running a different class than my UI thread, so it seems the dispatcher is not available?
    Below is as simplified an example as I can make of what I am trying to achieve. Currently the below code results in a "The calling thread cannot access this object because a different thread owns it." exception at runtime.
    The XAML side of this just produces a button connected to startThread2_Click() and a label which is then intended to be updated by the 2nd thread calling the updateLabelThreaded() function in the first thread when the button is clicked.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Data;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Imaging;
    using System.Windows.Navigation;
    using System.Windows.Shapes;
    using System.Windows.Threading;
    using System.Threading;
    namespace multithreadtest
    public delegate void runInParent();
    public partial class MainWindow : Window
    public MainWindow()
    InitializeComponent();
    threadUpdateLabel.Content = "Thread 1";
    private void startThread2_Click(object sender, RoutedEventArgs e)
    thread2Class _Thread2 = new thread2Class();
    _Thread2.runInParentEvent += new runInParent(updateLabelThreaded);
    Thread thread = new Thread(new ThreadStart(_Thread2.threadedTestFunction));
    thread.Start();
    public void updateLabelThreaded()
    threadUpdateLabel.Content = "Thread 2 called me!";
    public class thread2Class
    public event runInParent runInParentEvent;
    public void threadedTestFunction()
    if (runInParentEvent != null)
    runInParentEvent();
    I'm unfortunately not very experienced with c# so I may well be going the complete wrong way about what I'm trying to do. In the larger application I am writing, fundamentally I just need to be able to call a codeblock in the UI thread when I'm in a different
    class on another thread (I am updating many different items on the UI thread when the work thread has performed certain steps, so ideally I want to keep as much UI code as possible out of the work thread. The work threads logic is also rather complicated as
    I am working with both a webAPI and a MySQL server, so keeping it all in its own class would be ideal)
    If a more thorough explanation of what I am trying to achieve would help please let me know.
    Any help with either solving the above problem, or suggestions for alternative ways I could get the class in the UI thread to do something when prompted by the 2nd class in the 2nd thread would be appreciated.
    Thanks :)

    If I follow the explanation, I think you can use MVVM Light messenger.
    You can install it using NuGet.
    Search on mvvm light libraries only.
    You right click solution in solution explorer and choose manage nugget...
    So long as you're not accessing ui stuff on these other threads.
    using GalaSoft.MvvmLight.Messaging;
    namespace wpf_Tester
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    public MainWindow()
    InitializeComponent();
    Messenger.Default.Register<String>(this, (action) => ReceiveString(action));
    private void ReceiveString(string msg)
    MessageBox.Show(msg);
    Dispatcher.BeginInvoke((Action)delegate()
    tb.Text = msg;
    private void Button_Click(object sender, RoutedEventArgs e)
    Task.Factory.StartNew(() => {
    Messenger.Default.Send<String>("Hello World");
    What the above does is start up a new thread - that startnew does that.
    It sends of message of type string which the main window has subscribed to....it gets that and puts up a message box.
    The message is sent from the window to the window in that but this will work across any classes in a solution.
    Note that the receive acts on whichever thread the message is sent from.
    I would usually be altering properties of a viewmodel with such code which have no thread affinity.
    If you're then going to directly access properties of ui elements then you need to use Dispatcher.BeginInvoke to get back to the UI thread.
    I do that with an anonymous action in that bit of code but you can call a method or whatever instead if your logic is more complicated or you need it to be re-usable.
    http://social.technet.microsoft.com/wiki/contents/articles/26070.aspx
    Hope that helps.
    Technet articles: Uneventful MVVM;
    All my Technet Articles

  • How to find out the JVM thread that is consuming high CPU

    I am using WL 10.3, JRockit JVM on Linux. I have taken thread dumps. How to find out the JVM thread that is consuming high CPU?
    I know how to map it Sun JVM on Solaris. I haven't done in on JRockit so far. Please advise.

    Check out some of Marcus Hirt's blog entries for details about how to use JRockit Mission Control. It's a very nice tool that should provide a lot of insight:
    http://blogs.oracle.com/hirt/

  • I am trying to install Adobe Reader my wife's laptop but "installer" hangs up and fails with a blank black screen. The machine is capable and has a Vista OS. My wife blames the machine and wants to "throw it out." She's an idiot but I need to get this fix

    I am trying to install Adobe Reader my wife's laptop but "installer" hangs up and fails with a blank black screen. The machine is capable and has a Vista OS. My wife blames the machine and wants to "throw it out." She's an idiot but I need to get this fixed.

    run the cleaner (Download Adobe Reader and Acrobat Cleaner Tool - Adobe Labs) and then retry installing.

  • How to make the main() thread wait?

    I would like to know how to make the main() thread wait for another thread?If I use wait() method in main() method it says "non-static method wait() cannot be referenced from a static context",since main()
    is static.

    Here is an example how you may wait for a Thread in the main -
    but be careful, this is no real OO:
    public class WaitMain {
    // this is the thread class - you may also create
    // a runnable - I use a inner class to
    // keep my example simple
         public static class ThreadWait extends Thread{
              public void doSomething(){
                   synchronized(syncObject){
                        System.out.println("Do Something");
                        syncObject.notify();
              public void run(){
                   // sleep 10 seconds - this is
                   // a placeholder to do something in the thread
                   try{
                        sleep(10000);
                        doSomething();
                        sleep(10000);
                   catch(InterruptedException exc){
    // this is the object we wait for -
    // it is just a synchronizer, nothing else
         private static Object syncObject = new Object();
         public static void main(String[] args) {
              System.out.println("This will start a thread and wait for \"doSomething\"");
              ThreadWait t= new ThreadWait();
              t.start();
              synchronized(syncObject){
                   try{
    // this will wait for the notify
                        syncObject.wait();
                        System.out.println("The doSomething is now over!");
                   catch(InterruptedException exc){
              // do your stuff

Maybe you are looking for

  • How do I get rid of BBM Spam?

    My phone is filling up with spam BBmessages - all junk/ unreadable/ foreign characters. It went quiet for a whil e but I have had over 500 so far this afternoon alone. I have deleted messenger, but they just appear on my mainscreen. I have changed my

  • Issue canceling a MB0A document

    Dear all, we having problem trying to cancel a MB0A material document using tcode MBST. When canceling, we get two messages: First message is a warning (configured in T160M) - class M7 no 352: "Document flow for delivery cannot be updated". Second me

  • Ipad 2 gone blue Help!!

    Hi, I have an ipad 2, the screen has suddenly gone blue, have tried resetting it, just wondered whether anyone had any ideas???

  • 6230i no modem found problem

    When I try to connect to the internet through my mobile and DKU-5 cable it comes up 'no modem found'. When I go to Device manager it says the modem has a problem. Updating the driver just delivers an error message 'there was a problem installing this

  • Application cannot be opened beacouse provisioning profile has expired

    what should i do?