Problems with input for Threads

Please help, I don't know how to do further inputs
using the command line while threads are doing
their work.
Here's the code:
import java.io.*;
import javagently.*;
class Museum {
   Museum(int w) {
       walkmen = w;
       cash = 0;
       people = 0;
synchronized void inform (int n) {
   // inform about new people
   while (walkmen < n) {
       try { wait(); }
       catch (InterruptedException e) {}
    people += n;
    System.out.println("New incommers are "+people);
    notifyAll();
synchronized void hire (int c, int n) {
   // If there are not enough Walkmen left
   // wait until someone at another counter
   // returns some and notifies us accordingly.
   // If the returns are not enough, we'll carry on
   // waiting.
   System.out.println("Counter "+c+" wants "+n);
   while (walkmen < n) {
       try { wait(); }
       catch (InterruptedException e) {}
   // Hire out the Walkmen and take the deposit.
   // Let the customers at this counter "walk away"
   // by relinquishing control of the monitor with
   // a notifyAll call.
   walkmen -= n;
   cash += n;
   System.out.println("Counter "+c+" acquires "+n);
   System.out.println("Counter "+c+" delivers "+n+
               " to new incoming visitors "+n);
   System.out.println("Pool status:"+
         " Deposits "+cash+" Total "+(walkmen+cash)+
         " Walkmen "+walkmen);
   notifyAll();
synchronized void replace (int n) {
   // Always accept replacements immediately.
   // Once the pool and deposits have been updated,
   // notify all other helper waiting for Walkmen.
   System.out.println("Returning "+n);
   System.out.println("Replacing "+n);
   walkmen += n;
   cash -= n;
   people -= n;
   if (people >= 0) {
       System.out.println(n+
          " visitors leaving. Still  inside: "+people);
   else {
      System.out.println("The museum is empty.");
   notifyAll();
private static int walkmen;
private static int cash;
private static int people;
class Arrivals extends Thread {
   Arrivals (Museum m, int w) {
     museum = m;
     people = w;
   public void run () {
     while (true) {
     BufferedReader in = Text.open(System.in);
     try {
           people = Text.readInt(in);
     } catch (IOException e) {}
// here is it where I'm stuck. Input from the command
// line lets all threads work, but I have no chance to
// go back to do further inputs (I've tried everything
// that I thought would help, but got no solution
     int w = people;
     museum.inform(w);
     for (int c = 0; c < 3; c++)
             // start 3 Counters
     new Counter(museum, c).start();
     try { sleep(1000); }
     catch (InterruptedException e) {}
Museum museum;
int people;
class Counter extends Thread {
     Counter (Museum m, int p) {
          museum = m;
          people = p;
     public void run () {
     // Decide how many Walkmen are needed for a
     // group of visitors and attempt to hire them
     // (waiting until successful). The visitors
     // are sent off on their walk around (by
     // starting a new Visitors thread which runs
     // independently.
     while (true) {
          int w = people;
          museum.hire(people, w);
                  // start Visitors
          new Visitors (museum, w).start();  
          // Wait a bit before the next people arrive
          try { sleep(1000); }
          catch (InterruptedException e) {}
Museum museum;
int people;
class Visitors extends Thread {
     Visitors (Museum m, int w) {
          museum = m;
          groupSize = w;
     public void run () {
     // The group walks around on its own
     // They then replace all their Walkmen and leave.
     // The thread dies with them.
     try { sleep((int) (Math.random()*1000)+1); }
     catch (InterruptedException e) {}
     museum.replace(groupSize);
     Museum museum;
     int groupSize;
class WalkmanHire {
  /* The Museum Walkman Hire program
   * simulates the hiring of Walkmen from a fixed pool
   * for EUR 1 each. There are several helpers at
   * different counters handling the hire and
   * replacement of the Walkmen.
   * The number of Walkmen in the original pool is 50
   * and the number of helpers serving is 3,
   * but these can be overridden by parameters at run time
   * The cash float starts at zero.
   * The people float starts read in
   * Illustrates monitors, with sychronize,
   * wait and notify.
   * Shows a main program and two different kind of
   * threads running.
public static void main(String [] args)  {
   // Get the number of Walkmen in the pool
   // and open the museum for business.
   if (args.length >= 1)
       pool = Integer.parseInt(args[0]);
   else
       pool = 50;
   Museum m = new Museum(pool);
   // Get the numbers of people coming in
   // and start people's threads
    for (int p = 0; p < pool; p++)
    new Arrivals (m, p).start(); // start Arrivals
static int pool;
}Now, if somebody please take the time, look
at the code and help ?
Thanks in advance!

I tried to put BufferedReader in = Text.open(System.in);everywhere, even in the main method. It doesn't
matter where I put it. The threads are working and
I can't stop them to do further inputs in order to add the
number of new incoming people. I searched the forums,
tutorials, acticles but found nothing that gives me a hint
to what I can do to add more inputs. Most of Threads-
Examples use Random inputs, but there must be a way
to do it by myself using the commandline.
In fact I want to make a controlpanel (if neccessary by
GUI).
Can someone help?
To Bnarva for info:
Here is the package javagently, using "Text":
package javagently;
import java.io.*;
import java.util.*;
import java.text.*;
public class Text {
  public Text () {};
  /* The All New Famous Text class     by J M Bishop  Aug 1996
   *            revised for Java 1.1 by Alwyn Moolman Aug 1997
   *            revised for efficiency by J M Bishop Dec 1997
   * Provides simple input from the keyboard and files.
   * Now also has simple output formatting methods
   * and file opening facilities.
   * public static void   prompt (String s)
   * public static int    readInt (BufferedReader in)
   * public static double readDouble (BufferedReader in) 
   * public static String readString (BufferedReader in) 
   * public static char   readChar (BufferedReader in)
   * public static String writeInt (int number, int align)
   * public static String writeDouble
                   (double number, int align, int frac)
   * public static BufferedReader open (InputStream in)
   * public static BufferedReader open (String filename)
   * public static PrintWriter create (String filename)
  private static StringTokenizer T;
  private static String S;
  public static BufferedReader open (InputStream in)  {
    return new BufferedReader(new InputStreamReader(in));
  public static BufferedReader open (String filename)
     throws FileNotFoundException {
    return new BufferedReader (new FileReader (filename));
  public static PrintWriter create
      (String filename) throws IOException {
    return new PrintWriter (new FileWriter (filename));
  public static void prompt (String s) {
    System.out.print(s + " ");
    System.out.flush();
  public static int readInt (BufferedReader in) throws IOException {
      if (T==null) refresh(in);
      while (true) {
        try {
          return Integer.parseInt(T.nextToken());
        catch (NoSuchElementException e1) {
          refresh (in);
        catch (NumberFormatException e2) {
          System.out.println("Error in number, try again.");
public static char readChar (BufferedReader in) throws IOException {
      if (T==null) refresh(in);
      while (true) {
        try {
          return T.nextToken().trim().charAt(0);
        catch (NoSuchElementException e1) {
          refresh (in);
public static double readDouble (BufferedReader in) throws IOException {
      if (T==null) refresh(in);
      while (true) {
        try {
          String item = T.nextToken();
          return Double.valueOf(item.trim()).doubleValue();
        catch (NoSuchElementException e1) {
          refresh (in);
        catch (NumberFormatException e2) {
          System.out.println("Error in number, try again.");
  public static String readString (BufferedReader in) throws IOException {
    if (T==null) refresh (in);
    while (true) {
      try {
        return T.nextToken();
      catch (NoSuchElementException e1) {
        refresh (in);
  private static void refresh (BufferedReader in) throws IOException {
    S = in.readLine ();
    if (S==null) throw new EOFException();
    T = new StringTokenizer (S);
  //  Write methods
  private static DecimalFormat N = new DecimalFormat();
  private static final String spaces = "                    ";
  public static String writeDouble (double number, int align, int frac) {
    N.setGroupingUsed(false);
    N.setMaximumFractionDigits(frac);
    N.setMinimumFractionDigits(frac);
    String num = N.format(number);
    if (num.length() < align)
      num = spaces.substring(0,align-num.length()) + num;
    return num;
  public static String writeInt (int number, int align) {
    N.setGroupingUsed(false);
    N.setMaximumFractionDigits(0);
    String num = N.format(number);
    if (num.length() < align)
      num = spaces.substring(0,align-num.length()) + num;
    return num;
}Class Text is an older version of new Class Stream
made by the same author.

Similar Messages

  • Problems with Input Ready Query

    Hello All,
    I'm facing problems with input ready query for BI IP.
    I've created the input query on aggregation level and maintianed all the planning settings.  It is not allowing me to edit, when i'm attaching in the web template.
    I also attached a button copy function, and i'm able to execute it and save it, but it not allowing me to change manually.
    I also enabled the 3rd option for keyfigures...data can be changed with planning functions and user input.
    Please help me in this regard.
    We have just started the development of BI-IP, please suggest me if there are any notes to be applied.
    Regards
    Kumar

    Hello Johannes,
    Yes I've set to the finest granularity...even if it is Only one characteristic and one key figure without any restrictions...
    I've checked even planning tab page under properties...it is also fine..
    But still it is not allaowing me to go to edit mode...this is a fresh instalation and the query i'm working is the first one...
    Please suggest me if there are any notes to be applied, we are on Support Pack 10.
    Regards
    Jeevan Kumar

  • Problem with RpClean for Rep Development 3.0.L.0

    Hello Forte Users :
    We are running Forte 3.0.L.0 we previously upgraded from 3.0.J.1, 20
    developer workspaces and a repository for both development and
    deployment.
    We are facing problems when we run an Rpclean for this Development
    Repository, this process aborts with a fatal error message, the log
    screen for this process issues the following messages
    the deletion objects is made,
    the repository compress is made,
    the rebuild of the index is made,
    but then when the process is creating back the repository it displays
    "fatal error" and issues a message that it cannot truncate the .btx
    file.
    the command executed is :
    rpclean -n Desarrollo -fr :/var/forte/repodesa -t /var/jaeb
    Any experience on this regard?. If any, would be highly appreciated.
    Jorge
    Do You Yahoo!?
    Get your free @yahoo.com address at http://mail.yahoo.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Jorge,
    How big is your repsitory. Because if you are running on Digital Unix
    you will have problems, when the repository is bigger then 1 gigabyte!
    During the rpclean process a 'copy' is build and the unix system cannot
    handle more than 2 gigabyte. I expect the maximum size of the repository
    will be different for each operating system, but this might be your
    problem!
    Hans van Drunen
    Origin DeskTop Business Solutions Rotterdam
    Admiraliteitskade 60, 3063 DC Rotterdam
    Telefoon : +31 10 - 242 81 00
    Fax : +31 10 - 242 81 81
    -----Original Message-----
    From: Jorge Espinoza [mailto:[email protected]]
    Sent: Wednesday, June 16, 1999 18:17
    To: [email protected]
    Subject: Problem with RpClean for Rep Development 3.0.L.0
    Hello Forte Users :
    We are running Forte 3.0.L.0 we previously upgraded from 3.0.J.1, 20
    developer workspaces and a repository for both development and
    deployment.
    We are facing problems when we run an Rpclean for this Development
    Repository, this process aborts with a fatal error message, the log
    screen for this process issues the following messages
    the deletion objects is made,
    the repository compress is made,
    the rebuild of the index is made,
    but then when the process is creating back the repository it displays
    "fatal error" and issues a message that it cannot truncate the .btx
    file.
    the command executed is :
    rpclean -n Desarrollo -fr :/var/forte/repodesa -t /var/jaeb
    Any experience on this regard?. If any, would be highly appreciated.
    Jorge
    Do You Yahoo!?
    Get your free @yahoo.com address at http://mail.yahoo.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Problem with mail for exchange after update on E72...

    Hi everyone,
      I updated Nokia E-mail to ver 3.9 on E72. Now I am facing  a problem with mail for exchange. I have configured gmail on mail for exchange. I recieve a warning that "unable to sync contact administrator if problem persist". It started to pop up just after the update was over and is very frustrating. Even previously i used to recieve mails instantly but now it generally takes half an hour for me to recieve them. I deleted and created mail for exchange several times but to no avail.
    Also i am not able to automatically recieve mails other emails which i have configured. every time I have to manually download them everytime.
    Can anybody suggest a way out.
    Thanks
    Anil

    It could be a problem if you're using your network's connections...
    I was on a Pay & Go tariff with o2 some time ago, and needed secure connections for various things, o2 told me they didn't provide secure connections on Pay & Go tariffs...
    Could be worth checking with them to make sure it's supported.
    Nokia History: 3110, 5110, 7110, 7110, 3510i, 6210, 6310i, 5210, 6100, 6610, 7250, 7250i, 6650, 6230, 6230i, 6260, N70, N70, 5300, N95, N95, E71, E72
    Android History: HTC Desire, SE Xperia Arc, HTC Sensation, Sensation XE, One X+, Google Nexus 5

  • Problem with facetime for mac

    hello guy! I've got a problem with facetime for mac.My sister has a I-pod touch fourth generation with factime but i cna't phone her a message come on my mac.It say "xxx can't receive facetime's calls"!Can you help me??

    Thanks, Dah•veed.
    I did see mention of using Google Public DNS while I was searching the forums prior to posting, but to be honest didn't think it was a DNS-related problem.
    However, to rule it out I've set the prefered DNS servers on my router to Google's, but FaceTime still disconnects after 4-5 seconds when calling between me and my brother-in-law.  It doesn't matter who initiates the call.
    As a test, before I made the changes to my router, I logged into FaceTime as him on my MBP and tried calling myself on my iMac, and that was successful.
    The same test between the two iMacs when they were here was unsuccessful, so now I'm definitely thinking it's something on the '08 iMac.
    Now I just need to figure out what...

  • Problem with Twitter for Mac notifications

    Hello,
    I have a strange problem with Twitter for Mac. On both my home and office Macs. New posts appear in app window but there aren't any notifications even though notifications are set in preferences to show in both dock and menubar. Perhaps anyone noticed similar strange behaviour? I didn't find anything similar on Twitter forums.
    Thanks in advance.

    Solved by
    Dr.AvituvOct 20, 2014 11:09 PM
    go to Terminal and post this:
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/support/lsregister -kill -seed
    if it doesn't have that specific directory try this:
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/Versions/A/Support/lsregister -kill -seed
    once the scanning is done (can be short or long, depends on how heavy your system is) RESTART the computer.
    when you're back, go to Apple>system preferences>extensions.... guess who's there.
    I hope it helped.
    The Doctor.
    iMac, OS X Yosemite (10.10)
    To restore Actions extensions for good and other stuff
    THANKS!

  • Problem with GarageBand for iOS 6/7 Iphone 3gs / 4

    Problem with GarageBand for iOS 6/7 Iphone 3gs / 4
    Hello,
    On February 16, bought the GarageBand for iOS which was free and so I find and install it on my 3GS .
    Take the demo: Curtain Call Demo
    and within the instruments :
    audio Recorder
    Sampler
    Smart Drums
    Smart Strings
    Smart Bass
    Smart Keyboard
    Smart Guitar
    Keyboard
    Drums
    Guitar Amp
    1.4.1 is the latest version for ios 6.
    Configure my AppleID on a Iphone 4 and install the program , the version I have the Iphone 4 is the orange ( different from 3gs ) icon and put it on the AppStore : ios 2.0.1 for ios7.
    With these instruments :
    audio Recorder
    Sampler ( to download the instrument )
    Smart Drums ( to download the instrument )
    Smart Strings (Download the instrument )
    Smart Bass ( to download the instrument )
    Smart Keyboard ( to download the instrument )
    Smart Guitar
    Keyboard
    Drums
    Guitar Amp ( to download the instrument )
    and if I give what I need to restore tells me if I bought it I did not restore anything and tells me to buy :
    Complete collection of GarageBand instruments and sound at a price of : € 4.49
    As they are 2 different versions ? More than anything I say because I have to pay for the instruments in the 2.0.1 version of the Iphone 4 ... ?
    And besides not wearing demo Demo Curtain Call : (
    GarageBand 1.x If you are upgrading it using iTunes on a Mac or PC, you can restore the original collection of instruments and sounds. There is no need to buy this collection. Press "You've already purchased?" When displayed on iPhone, iPad or iPod touch.
    this puts on the AppStore but I have tried to restore as I wrote above, and does not work. There is nothing to restore.
    regards

    I've been having the same problem. However, I believe my problem is due to the 3G issues I've been having. I don't have internet access even when the 3G symbol appears, so probably my iphone keeps trying to connect to the network and has its battery drained! Have you been having the same issue?

  • I have problem with fonts for my site, i have used "Lucida sans unicode " family for certain texts. it shows perfect in mozilla 3.5 and mozilla 4. But the font not supporting in mozilla 5.0? please help me

    i have problem with fonts for my site, i have used "Lucida sans unicode " family for certain texts. it shows perfect in mozilla 3.5 and mozilla 4. But the font not supporting in mozilla 5.0? please help me

    i have problem with fonts for my site, i have used "Lucida sans unicode " family for certain texts. it shows perfect in mozilla 3.5 and mozilla 4. But the font not supporting in mozilla 5.0? please help me

  • Stacked 100% bar chart - Problem with datatips for zero value data points

    I have a stacked 100% bar chart that shows datatips in Flex 4.   However, I don't want it to show datatips for
    data points with zero values.   Flex 4 shows the datatip for a zero value data point on the left side of a bar if the data point is not the first in the series.
    Here's the code that illustrates this problem.    Of particular concern is the July bar.    Because of the zero value data point problem, it's not possible to see the datatip for "aaa".
    Any ideas on how we can hide/remove the datatips for zero value data points ?        Thanks.
    <?xml version="1.0"?>
    <s:Application
    xmlns:fx="
    http://ns.adobe.com/mxml/2009"xmlns:mx="
    library://ns.adobe.com/flex/mx"xmlns:s="
    library://ns.adobe.com/flex/spark"creationComplete="initApp()"
    height="
    1050" width="600">
    <s:layout>
    <s:VerticalLayout/>
    </s:layout>
    <fx:Script><![CDATA[ 
    import mx.collections.ArrayCollection;[
    Bindable] 
    private var yearlyData:ArrayCollection = new ArrayCollection([{month:
    "Aug", a:1, b:10, c:1, d:10, e:0},{month:
    "July", a:1, b:10, c:10, d:10, e:0},{month:
    "June", a:10, b:10, c:10, d:10, e:0},{month:
    "May", a:10, b:10, c:10, d:0, e:10},{month:
    "April", a:10, b:10, c:0, d:10, e:10},{month:
    "March", a:10, b:0, c:10, d:10, e:10},{month:
    "February", a:0, b:10, c:10, d:10, e:10},{month:
    "January", a:10, b:10, c:10, d:10, e:10}]);
    private function initApp():void {}
    ]]>
    </fx:Script>
    <s:Panel title="Stacked Bar Chart - Problems with DataTips for Zero Value Items" id="panel1">
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <mx:BarChart id="myChart" type="stacked"dataProvider="
    {yearlyData}" showDataTips="true">
    <mx:verticalAxis>
     <mx:CategoryAxis categoryField="month"/>
     </mx:verticalAxis>
     <mx:series>
     <mx:BarSeries
    xField="a"displayName="
    aaa"/>
     <mx:BarSeries
    xField="b"displayName="
    bbb"/>
     <mx:BarSeries
    xField="c"displayName="
    ccc"/>
     <mx:BarSeries
    xField="d"displayName="
    ddd"/>
     <mx:BarSeries
    xField="e"displayName="
    eee"/>
     </mx:series>
     </mx:BarChart>
     <mx:Legend dataProvider="{myChart}"/>
     </s:Panel>
     <s:RichText width="700">
     <s:br></s:br>
     <s:p fontWeight="bold">The problem:</s:p>
     <s:p>Datatips for zero value data points appear on left side of bar (if data point is not the first point in series).</s:p>
     <s:br></s:br>
     <s:p fontWeight="bold">For example:</s:p>
     <s:p>1) For "June", eee = 0, mouse over the left side of the bar to see a datatip for "eee". Not good.</s:p>
     <s:br></s:br>
     <s:p>2) For "July", eee = 0 and aaa = 1, can't see the datatip for "aaa", instead "eee" shows. Real bad.</s:p>
     <s:br></s:br>
     <s:p>3) For "Feb", aaa = 0, datatip for "aaa" (first point) does not show. This is good.</s:p>
     <s:br></s:br>
     <s:p>4) For "Mar", bbb = 0, datatip for "bbb" shows on the left side of the bar. Not good.</s:p>
     <s:br></s:br>
     <s:p fontWeight="bold">Challenge:</s:p>
     <s:p>How can we hide/remove datatips for zero value data points?</s:p>
     <s:br></s:br>
     </s:RichText></s:Application>

    FYI.
    Still have the issue after upgrading to the latest Flex Builder 4.0.1 with SDK 4.1.0 build 16076.   
    Posted this as a bug in the Adobe Flex Bug and Issue Management system.     JIRA
    http://bugs.adobe.com/jira/browse/FLEXDMV-2478
    Which is a clone of a similar issue with Flex 3 ...
    http://bugs.adobe.com/jira/browse/FLEXDMV-1984

  • I have problems with office for mac  screen resolution, specially with excel

    I have problems with office for mac  screen resolution, specially with excel ?

    For starters, make sure to Check for Updates on any of the Help menus, and make sure the product has all the latest patches. MS did come out with a patch addressing the display issues on Retina Macs. Latest patchlevel is 14.3.2.
    We are talking about Office:Mac 2011, right?

  • Problem with input data format - not "only" XML

    Hi Experts,
    I have problem with input data format.
    I get some data from JMS ( MQSeries) , but input format is not clear XML. 
    This is some like flat file with content of XMLu2026.
    Example:
    0000084202008-11-0511:37<?xml version="1.0" encoding="UTF-8"?>
    <Document xmlns="urn:xsd:test.01" xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance Sndr="0001" Rcvr="SP">
    ...content....
    </Document>000016750
    Problems in this file is :
    1. data before parser <? xml version="1.0"> -> 0000084202008-11-0511:37 
    2. data after last parser </Document> -> 000016750
    This data destroy XML format.
    Unfortunately XI is not one receiver of this files and we canu2019t change this file format in queue MQSeries ( before go to XI) .
    My goal is to get XML from this file:
    <?xml version="1.0" encoding="UTF-8"?>
    <Document xmlns="urn:xsd:test.01" xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance Sndr="0001" Rcvr="SP">
    ...content....
    </Document>
    My questions:
    1. Is any way or technique to delete this data 0000084202008-11-0511:37  in XI from this file ?
    2. Is any way to get only XML from this file ?
    Thanx .
    Regards,
    Seo

    Hi Buddy
    What is the XI adapter using?
    If you use inbound File adapter content conversion you could replace these values with none and then pass it to the scenario.
    Does that help?
    Regards
    cK

  • Please Help?! Problems with Viber for iPhone 4s

    Please help!
    I have had problems with Viber for a while now and had given up! But now a few contacts only have viber and not other free messaging apps so I’m trying to use it again but still having problems.
    I have uninstalled and reinstalled a number of times and still have not received an access code. My main problem though is the messaging it would work fine and then I wouldn’t be able to send any messages and I would receive a message go into the app and the message would not appear.
    The other day I reinstalled it whilst at work and worked perfectly could send and receive messages easily. Then when I went home the problem stated again. I then uninstalled and reinstalled again and it worked perfectly, but now back at work I’m having the issues again! I can’t keep uninstalling and reinstalling is there a way this can be fixed?!
    If anyone is able to help me out it would be much appreciated! Thanks

    You activated "Find My Mac," which disables the built-in Guest account and adds a Safari-only "Guest User" pseudo-account. To get the Guest account back, you would have to disable FMM.

  • We have been having a problem with newsletters for a client. The newsletter works fine except if we add a button and/or link to the top zone on that newsletter it blows up ONLY ON iPhones!

    We have been having a problem with newsletters for a client.
    The newsletter works fine except if we add a button and/or link to the top zone on that newsletter it blows up ONLY ON iPhones!
    This happened last month too. It seems to be related to length of the newsletter too. It works on every device except iPhones - so weird.

    Hi, is anyone else experiencing i-phone only problems on email campaigns? not bashing Apple, just having issues where our newsletter are only having issues on iPhones

  • Problem with socket and Threads

    Hi,
    I have coded a package that sends an sms via a gateway.
    Here is what is happening:
    * I create a singleton of my SMSModule.
    * I create an sms object.
    * I put the object in a Queue.
    * I start a new Thread in my sms module that reads sms from queue.
    * I connect to sms gateway.
    * I send the sms.
    * I disconnect from socket! This is where things go wrong and I get the following error (see below).
    I have a zip file with the code so if you have time to take a look at it I would appreciate it.
    Anyway all hints are appreciated!
    //Mikael
    GOT: !LogoffConf:
    mSIP Kommando var: !LogoffConf
    CoolFlix log: MSIPProtocolHandler;setLoggedin(false)
    We got LogOffConf
    Waiting ......for thread to die
    java.net.SocketException: Socket operation on nonsocket: JVM_recv in
    socket input stream read
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:116)
    at
    sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:405)

    Off the top of my head, probably the garbage collector cleared your SMSModule coz all classes loaded through other classloaders will be unloaded when that classloader is unloaded.
    mail in the code if you want me to look at it with greater detail.

  • Problem with JDialogs and Threads

    Hi. I'm new to this forum and I hope I'm not asking a repeat question. I didn't find what I needed after a quick search of existing topics.
    I have this problem with creating a new JDialog from within a thread. I have a class which extends JDialog and within it I'm running a thread which calls up another JDialog. My problem is that the JDialog created by the Thread does not seem to function. Everything is unclickable except for the buttons in the titlebar. Is there something that I'm missing out on?

    yeah, bad idea, don't do that.

Maybe you are looking for

  • New to ipod 5th, what is this connecting to TV then?

    I Dont fully understand this topic, as im not sure how to connect to TV, i mean, i dont understand! can you watch live TV on the ipod then? sorry its so widespread, is someone able to explain this whole process to me!?!

  • Slow PowerShell execution of Microsoft Exchange 2013 commands from c#

    I have the following code that executes an exchange cmdlet. It works fast with command that return some output but work slow if command has no output. for example Invoke("Get-Mailbox") prints following output:   Begin execution at 11:44:43 Finish exe

  • Buying a movie in advance

    I bought a movie in advance because it is still in the cinema. Why pay so much and cannot download it yet.

  • Sales order stock does not exist

    Hi All, In MTS scenario also while doeing PGI against a sales order/delivery the system is giving error prompt "sales order stock does not exist" What could be the reason? Pls suggest rgds

  • I have both iWork o6 and iWork 09 on my computer..

    I have both iWork o6 and iWork 09 on my computer I am not sure if iWork 06 still work but can I just delete it or would that affect the functionality of iWork 09? Can I just drag iWork 06 to the trash can?