Multiple Threads writing to the same stream and "Write End Dead"

Hi, I'm wondering what is the proper method for having multiple threads write to the same stream.
Right now I have PipedWriter that I give to several Threads.
However the JLS specifies that when the thread writing to PipedWriter dies, an exception will be generated. Does it mean that I may get a "write end dead" exception when any of the threads dies?
More specifically I'm trying to extract keywords from a set of pages and print out keywords with their contexts (using threads to avoid a single blocked pages from blocking entire process)

Your topic says "stream" but your post says "writer" - there's a difference. Readers/writers use the native encoding (which is correct if, for example, you're reading .DOC files created in Windows) while streams use UTF-8 encoding (which is correct if you've got one java app talking to another).
Multiple threads can output to the same source. You've probably seen really annoying examples as your own System.out.println()s get intermixed with other JVM output in the JVM's window. Synchronization is going to be a serious issue.
As to the exception, why not just catch it and ignore it?

Similar Messages

  • Multiple users working in the same document and same time.

    Hello Guys,
    and thanks for looking into this
    At our company we're still in doubt wether or not to update our software to CC or just update to CS6. Currently we all have different versions (going from CS3 to CS5), and that's really time-consuming.
    The most important question would be if it is possible in the CC to work in the same file at the same time.
    Working on magazines, catalogues or books this would be a major time-saving option!
    For example I could work on chapter 1 and 6, whilst my collegues are working on the other chapters.
    The other users could then see how far I am on my chapters, change things (make notes) etc.
    Is this possible in CC or not?
    Thanks for your answers and time.
    Best regards,
    Sam
    PS: If there are major setbacks working on the cloud (between multiple users/computers) please let us know.

    Let me attempt an answer.
    Short answer, no. Multiple users cannot edit a the same file at the same time.
    You'll need a content management system, to enable check in/check out, prevent overwrites etc. But (there's always a but), Creative Cloud offers several workflows and tools that can be used to help streamline multi-user publication workflows.
    Using Creative Cloud will ensure that all users will be on the same version of the software, and there won't be any accidental lockouts due to format changes, and no need to run arounf to get the document downsaved. All users also have access to the latest features as soon as they become availble.
    For products, such as books and magazines: InDesign needs to be the primary software that you use. When you design the content architecture of your publication, you can employ the following techniques and tools:
    Break up your publications into several INDD files, let's say for file for each story.
    Compile the individual files into an InDesign book.
    Link Ps and Ai or other files when you place them in the InDesign layout. That way whenever a designer updates an asset, InDesign will notify you that a linked file has changed and you can choose to update the link.
    InCopy was recently added to the Creative Cloud. Authors can can edit stories without actually having to open the InDesign files. For details see the InCopy help. InCopy has several workflows that can help out in this kind of setup.
    Other than the Creative Cloud apps, you'll also need to setup folder and directory structures on the shared storage location.
    Setup a shared location/drive so that all users have access to the linked files.
    Control read/write access to individual files using the OS commands on the file directory/server. For example, Layout designers only have edit permissions on the layout (indd files); while Photographers can only edit .psd files, and so on. For small teams this might not be necessary, but for larger teams this may help.
    You could also consider storing your files using a Content Management System. You'll need to evaluate the cost and benefits properly.
    Hope this helps.

  • Multiple Meter Reads on the same day and Billing

    Hi All,
    There is a requirement to hold all reads received from Customer/ Meter Reader etc even they these are received on the same day for e.g. schedule read could be received in the morning, followed by customer read through internet and then another customer read through IVR system.
    Can we store multiple reads on the same day?
    If a read goes into implausible and then it's corrected, implausible read is replaced by corrected read. Is there any way to store old implausible read?
    Thanks in advance.
    SJ

    Your questions answered below:
    1. So my question is can we enter multiple reads to the Meter on a single day with same meter read reason? - Yes when we have MR reason which is not relevant to billing. In your case its 09 which is nonrelevant and you should be able to enter multiple reads with different time.
    Make sure you supply time also when you are submitting your read. However there is a restriction of what level you can enter multiple MRs since SAP stores read at Minute level so you can not post 2 reads in same minute.
    2. Are there any configurations to be done to allow multiple meter readings on a single day? - Not sure but standard SAP should allow you to save multiple MRs with the above rules.
    Cheers
    Jignesh

  • Multiple language data in the same table and indexes

    We have 8.1.5 database with
    NLS_LANGUAGE=ENGLISH and NLS_TERRITORY=UNITED KINGDOM set at the database level. We also set the NLS_LANG appropriately when we index the data. We also use the preference setting BASE_LETTER=YES when indexing.
    Our tables contain book titles which is what we index using interMedia. Being an online book store, this table may contain titles in English (most of the titles are in English being UK) and some titles in French. Please note the French language has accents and diacritics. Normally in a French database with NLS parameters set correctly and BASE_LETTER=YES, if we search for a title with accent / diacritic it will return the record correctly and match the rows with or without the accents (e.g. searching for video will return both vidio (not the accent on e) and video). However, with the UK settings the accents are not ignored during indexing and it only returns the records that exactly match the search word (e.g. searching for video returns only video and searching for vidio returns only vidio (note the accents on e in the last two videos)).
    Question: Is there any way to appropriately index multiple language specific titles in the same database? If yes, how? Is it possible at all? Suggestions, ideas are welcome.
    null

    Similar request; if there are several different languages used in a database, but a search word can be typed in by anyone and not necessarily in the default language, I still want to be able to pick up all the records (including text in blobs) in any language where my search word = the equivelant word in the other languages; eg. searching on "tree", the search would bring back a document that contained "l'arbre". I then want to set the default language, and allow the user to select a "search in these languages" option to expand the search from the default "tree" to all languages in the database.
    I know about the multi_Lexer but does it extend functionality to this level?

  • Scanning Multiple Photos All at the Same Time and Saving It in Individual File Names

    Printer : HP Officejet 4500Advantage All-in-One Printer-K710g
    Problem: I used to scan 5 multiple pictures all at once and save those in 5 individual files. I cant do that anymore. it scans as a whole picture. can somebody help? thanks.

    Hi @kmjamj 
    Running the Print and Scan Doctor might help. The HP Print and Scan Doctor is a free utility (tool) that helps to quickly resolve common printing, scanning and connectivity issues including but not limited to:
    Connectivity:
    USB: Verifies that the USB connection from your computer to the HP product is working correctly.
    Network: Verifies that the network connection between your computer and your network is working correctly.
    Device Status Test: Checks for device errors such as out of paper, paper jams, carriage stalls, and paper feed issues, and then provides instructions for fixing the error.
    Driver Check: Checks for missing or corrupt driver files.
    Device Manager: Checks for problems in Device Manager that would prevent printing.
    Device Online: Checks if the product has been paused or set to offline, and then sets the status back to online if necessary.
    Print Queue: Checks for and clears pending print jobs in the print queue (a log of print jobs waiting to print).
    Port Match: Checks the port settings for the HP product.
    Device Conflicts: Checks for conflicts with other drivers, such as other printer brands.
    Ink Issues: Checks the cartridges and ink levels for issues that affect print quality.
    Print Settings: Checks and adjusts the print quality settings.
    Test Print: Prints a test page for print quality evaluation, and provides options for cleaning and aligning the printhead if necessary.
    Scan Tests: Checks the scan mechanism, drivers, and registry entries.
    Source:Try the HP Print and Scan Doctor for Windows
    Click here to download and run the Print and Scan Doctor> www.hp.com/go/tools
    If that does not resolve the issue, post back and let me know if there are any symbols other than green check marks and what they are next to of course. The wrench is not always easy to spot as the wrench and the check mart are in the green circle.
    If you see only green check marks (), the tool did not find any problems.
    If you see green wrenches (), the utility identified an issue and corrected it automatically.
    If you see yellow exclamation points (), the test failed and required user action, but the step was skipped.
    If you see a red X (), follow the on-screen instructions to resolve the issue.
    I look forward to hearing back from you.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • HT204053 I have multiple apple devices, 2x phones ipad etc, but all are through the same email and I only get the storage space for one device, what should I do?

    I have multiple devices all under the same id and email but I don't get multiple icloud storage space and it's running out!
    Can anyone help as I've just bought an iphone for my daughter and would like to link it as well.
    Thanks in anticipation of your help.

    One icloud account gets a 5 GB of storage, regardless of the number of devices connecting to it.  But you're in luck, you can buy more storage for the account if you are running low.
    As for your daughter, be sure to get her own icloud account, otherwise she'll end up getting all your email, contacts, etc.  And if she deletes any of this data, it will be deleted on your devices as well.  Note:  you can all keep using the same ID for the itunes store for sharing purchased items.
    To create a new icloud account, go to
    http://www.apple.com/icloud/setup/

  • RE: multiple named objects with the same name andinterface

    David,
    First I will start by saying that this can be done by using named anchored
    objects and registering them yourself in the name service. There is
    documentation on how to do this. And by default you will get most of the
    behavior you desire. When you do a lookup in the name service (BindObject
    method) it will first look in the local partition and see if there is a
    local copy and give you that copy. By anchoring the object and manually
    registering it in the name service you are programmatically creating your
    own SO without defining it as such in the development environment. BTW in
    response to your item number 1. This should be the case there as well. If
    your "mobile" object is in the same partition where the service object he is
    calling resides, you should get a handle to the local instance of the
    service object.
    Here is the catch, if you make a bind object call and there is no local copy
    you will get a handle to a remote copy but you can not be sure which one!
    It end ups as more or less a random selection. Off the top of my head and
    without going to the doc, I am pretty sure that when you register an
    anchored object you can not limit it's visibility to "User".
    Sean
    -----Original Message-----
    From: [email protected]
    [<a href="mailto:[email protected]">mailto:[email protected]]On</a> Behalf Of David Foote
    Sent: Monday, June 22, 1998 4:51 PM
    To: [email protected]
    Subject: multiple named objects with the same name and interface
    All,
    More than once, I have wished that Forte allowed you to place named
    objects with the same name in more than one partition. There are two
    situations in which this seems desirable:
    1) Objects that are not distributed, but are mobile (passed by value to
    remote objects), cannot safely reference a Service Object unless it has
    environment visibility, but this forces the overhead of a remote method
    call when it might not otherwise be necessary. If it were possible to
    place a copy of the same Service Object (with user visibility) in each
    partition, the overhead of a remote method call could be avoided. This
    would only be useful for a service object whose state could be safely
    replicated.
    2) My second scenario also involves mobile objects referencing a Service
    Object, but this time I would like the behavior of the called Service
    Object to differ with the partition from which it is called.
    This could be accomplished by placing Service Objects with the same name
    and the same interface in each partition, but varying the implementation
    with the partition.
    Does anyone have any thoughts about why this would be a good thing or a
    bad thing?
    David N. Foote
    Consultant
    Get Your Private, Free Email at <a href=
    "http://www.hotmail.com">http://www.hotmail.com</a>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>

    David,
    First I will start by saying that this can be done by using named anchored
    objects and registering them yourself in the name service. There is
    documentation on how to do this. And by default you will get most of the
    behavior you desire. When you do a lookup in the name service (BindObject
    method) it will first look in the local partition and see if there is a
    local copy and give you that copy. By anchoring the object and manually
    registering it in the name service you are programmatically creating your
    own SO without defining it as such in the development environment. BTW in
    response to your item number 1. This should be the case there as well. If
    your "mobile" object is in the same partition where the service object he is
    calling resides, you should get a handle to the local instance of the
    service object.
    Here is the catch, if you make a bind object call and there is no local copy
    you will get a handle to a remote copy but you can not be sure which one!
    It end ups as more or less a random selection. Off the top of my head and
    without going to the doc, I am pretty sure that when you register an
    anchored object you can not limit it's visibility to "User".
    Sean
    -----Original Message-----
    From: [email protected]
    [<a href="mailto:[email protected]">mailto:[email protected]]On</a> Behalf Of David Foote
    Sent: Monday, June 22, 1998 4:51 PM
    To: [email protected]
    Subject: multiple named objects with the same name and interface
    All,
    More than once, I have wished that Forte allowed you to place named
    objects with the same name in more than one partition. There are two
    situations in which this seems desirable:
    1) Objects that are not distributed, but are mobile (passed by value to
    remote objects), cannot safely reference a Service Object unless it has
    environment visibility, but this forces the overhead of a remote method
    call when it might not otherwise be necessary. If it were possible to
    place a copy of the same Service Object (with user visibility) in each
    partition, the overhead of a remote method call could be avoided. This
    would only be useful for a service object whose state could be safely
    replicated.
    2) My second scenario also involves mobile objects referencing a Service
    Object, but this time I would like the behavior of the called Service
    Object to differ with the partition from which it is called.
    This could be accomplished by placing Service Objects with the same name
    and the same interface in each partition, but varying the implementation
    with the partition.
    Does anyone have any thoughts about why this would be a good thing or a
    bad thing?
    David N. Foote
    Consultant
    Get Your Private, Free Email at <a href=
    "http://www.hotmail.com">http://www.hotmail.com</a>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>

  • Proble with multi-threaded app using the same connection

    have a multi-threaded app. The threads all share the
    same connection. They all do some selects / updates.
    The OS is NT 4.0 and the application server is weblogic
    Some times I am getting the error "java.sql.SQLException: Io exception: not in streaming mode"
    and some times I am getting "java.sql.SQLException: Io exception: Protocal violation
    Any Ideas?
    Regards
    Suresh

    Don't create threads.... Your threads should if they are necessary be reusable, your threads should call the connections it needs from the cache service with let's say a max number of N pools (each pool a max number of M connections), if the connection domain asked exists on cache a connection is asked for corresponding pool, if the connection domain is not on cache the less used domain is thrown away (all inner connections closed first) and substituted by the new one requested. While the pool is not full keep creating connections as the request came (and all existing connections are being held and not released), when M connections exists, a request should wait till a connection is released.
    If you can have 20 threads asking for the same connection and the max number of connections on pool is M=10, then yopur threads will wait for a connection being released. All this must be synchronized. You should set M the closest as possible to the normal number of requests you can imagine to happen the same time. You should get connection use it and release it right away if you can have a lot of requests.
    I hope this helps you.

  • E4200 v2 - Uses multiple MAC addresses for the same device

    This unit seems pretty good at first but on looking at the Web interface I noticed that it was using multiple mac addresses for the same device and showing devices on the lan on the Wireless side and other odd things.
    After a week of running it the home server network started to get erratic, it would seem to all point to dns and dhcp issues in the router.
    Seems the V1 had the same issues that they did not fix on this.
    The Cisco connect software shows 5 devices the Web based utility shows 3??.
    Its pretty bad that they charge nearly $200 and cannot be bothered to finish the unit or address the issues that were in V1.

    I am afraid I didn't get the clear picture of the issue mentioned in the post. Could you please elaborate a little bit? If you connect a device/computer wired and then later you connect it wirelessly. It is obvious that you would get to see two different MAC addresses for the same device, one for the LAN adaptor and other one for WLAN adaptor. If that is what you are referring to?
    Secondly, may I  know, what issues did you face with DNS and DHCP in the router? Is it not able to resolve the DNS or something else or DHCP is not sending IP address to the clients?

  • Can multiple people post on the same shared photo stream?

    Is there a way to have multiple people post on the same shared photo stream?
    My cousin would like to have a single shared photo stream where we can both post photos on it and comment, instead of having two separate shared photo streams. 
    We think that there should be an option for the album creator to give access to anyone he/she shares it with to enable them to also post pics on the same stream.

    The only link I have is to manage your team account http://forums.adobe.com/thread/1460939?tstart=0
    The only Adobe program/process for team work that I know of is Adobe Anywhere, but that requires a very different process
    Adobe Anywhere http://www.adobe.com/products/adobeanywhere.html
    http://www.creativeimpatience.com/adobe-anywhere-enterprise-solution/

  • HT5622 Can you have multiple apple ids and all share the same apps and music?

    I have multiple devices, iphone 5s (myself), mini ipad (son), 5th generation ipod (daughter). When I receive imessages they are going to the other devices and not my phone. Is this because I have all devices set up on the same Apple User ID or am I missing something in Settings that needs to be turned on/off? I have all devices under the same User ID to control the purchases. Now I'm thinking maybe each device needs to have it's own User ID and if I switch them now, will we all still share the same apps and music? Any help or suggestions is greatly appreciated.

    Wouldn't you only need to create a new apple ID and put that on your phone instead of your old apple ID that is merged?

  • Can you have multiple Apple TV's in the same house and network? If so how do you know which one to pick from your Idevice?

    can you have multiple Apple TV's in the same house and network? If so how do you know which one to pick from your Idevice?

    Yes, there are even defaults for naming them, such as LivingRoom, Bedroom, etc, or you can even enter your own name with the remote for each AppleTV.

  • How do i go about linking 2 laptops 3 ipads using the same itunes and to stream all films and music

    how do i go about linking 2 laptops, 3 ipads using the same itunes and to stream all films and music through the house.

    make sure they are all using the same itunes store account and turn on home sharing
    http://support.apple.com/kb/HT3819 - more info about home sharing
    -mvimp

  • Hi all, i can't sync over wifi between my iPhone 4 and Windows 7 64 bit, wifi sync works with the same phone and my Windows 8 machine, tried solutions from other threads with no luck, just thought i'd see if anyone else had any ideas, thanks.

    Hi all, i can't sync over wifi between my iPhone 4 and Windows 7 64 bit, wifi sync works with the same phone and my Windows 8 machine so the problem seems confined to Windows 7. I've tried solutions from other threads -
    Making sure everything is allowed through firewall
    Rebooting phone/laptop/router
    Disabling ipv6
    Disabling all networks except the one curently on
    Re-installing iTunes
    Restoring iPhone
    No luck with any of those unfortunately so i just thought i'd see if anyone else is still without wifi sync after trying those as well and if you ever found a fix, thanks.

    I just wanted to leave a note that it's working now. I'm not sure if it was the latest iTunes update that got it working or that i decided to start a new library instead of using the one i had backed up on Windows 8 (it didn't occur to me to check using the old library when i re-installed iTunes). But if anyone is having this problem, it might be worth trying again with a new installation of iTunes to see if the latest update works for you, and if not, try using a fresh library instead of a backup (by fresh library i mean discard your old library completely and start a new library, not just restore as new iPhone, a whole new library).

  • Is it possible to search for multiple folders with the same name and...

    Is it possible to search for multiple folders with the same name and then select them all and change the permissions on just those folders .i.e. Search for the budget folders in all client folders and lock them down to just the project managers. Without having to go to each folder and apply the permissions.

    user11919409 wrote:
    Is it possible to create a Clone database with the same name of source db using RMAN ...
    yes
    >
    DB version is 11.2.0.2
    Is it possible to clone a 11.2.0.2 database to 11.2.0.3 home location directly on a new server . If it starts in a upgrade mode , it is ok ....yes
    Handle:     user11919409
    Status Level:     Newbie (10)
    Registered:     Dec 7, 2009
    Total Posts:     102
    Total Questions:     28 (22 unresolved)
    why do you waste time here when you rarely get any answers to your questions?

Maybe you are looking for

  • My iphotos is grey out and new photos app in Mac is not working after update.

    My iphotos and Photos app have stopped working after update today. I am getting this error message. Process:           Photos [934] Path:              /Applications/Photos.app/Contents/MacOS/Photos Identifier:        com.apple.Photos Version:        

  • Unable to process requests

    Hi all, User requests are not being proccessed. status of request is PENDING on users interface but when i check with Adminster manger.... i couldnt find the corresponding request. Pending requests for Standard Manager are 7 Running requests are 0. C

  • When will the Adobe flash player return to all Apple mobile devices?

    I think that Apple should very well eliminate these restrictions by reintroducing the Adobe Flash Player back into all Apple mobile devices sometime this spring or summer. Kevin Silvestris Worcester, MA

  • IPad 4 won't play videos in Safari - OS 8.1.1

    Just got a new iPad 4th generation running 8.1.1 Won't play videos on CNN or YouTube or Apple websites... (those are the ones I've tested) Does play videos on ESPN Mobile or using YouTube App. HELPPPPP!!!!! I need videos to play on websites! Thanks,

  • Direct Transfere between 2 Calls each on a different DN

    Dears, I have this client that used to have a PBX and now switched to IP telephony with CUCM 9.x The operator used to have a feature that allowed him to do a direct transfere between 2 external calls while he himself steps out of the call (No Confera