Error SocketChannel receive multiple messages at once?

Hello,
I use Java NIO, non blocking for my client-server program.
Everything works ok, until there are many clients that sending messages at the same time to the server.
The server can identify all the clients, and begin reading, but the reading of those multiple clients are always the same message.
For example, client A send "Message A", client B send "Missing Message", client C send "Another Missing Message" at the same time to the server, the server read client A send "Message A", client B send "Message A", client C send "Message A", only happen if the server trying to read all those messages at once, if the server read one by one, it's working perfectly.
What's wrong with my code?
This is on the server, reading the message:
private Selector               packetReader; // the selector to read client message
public void update(long elapsedTime) throws IOException {
  if (packetReader.selectNow() > 0) {
    // message received
    Iterator packetIterator = packetReader.selectedKeys().iterator();
    while (packetIterator.hasNext()) {
      SelectionKey key = (SelectionKey) packetIterator.next();
      packetIterator.remove();
      // there is client sending message, looping until all clients message
      // fully read
      // construct packet
      TCPClient client = (TCPClient) key.attachment();
      try {
        client.read(); // IN HERE ALL THE CLIENTS READ THE SAME MESSAGES
           // if only one client send message, it's working, if there are multiple selector key, the message screwed
      } catch (IOException ex) {
//      ex.printStackTrace();
        removeClient(client); // something not right, kick this client
}On the client, I think this is the culprit :
private ByteBuffer            readBuffer; // the byte buffer
private SocketChannel  client; // the client SocketChannel
protected synchronized void read() throws IOException {
  readBuffer.clear();    // clear previous buffer
  int bytesRead = client.read(readBuffer);  // THIS ONE READ THE SAME MESSAGES, I think this is the culprit
  if (bytesRead < 0) {
    throw new IOException("Reached end of stream");
  } else if (bytesRead == 0) {
    return;
  // write to storage (DataInputStream input field storage)
  storage.write(readBuffer.array(), 0, bytesRead);
  // in here the construction of the buffer to real message
}How could the next client read not from the beginning of the received message but to its actual message (client.read(readBuffer)), i'm thinking to use SocketChannel.read(ByteBuffer[] dsts, , int offset, int length) but don't know the offset, the length, and what's that for :(
Anyone networking gurus, please help...
Thank you very much.

Hello ejp, thanks for the reply.
(1) You can't assume that each read delivers an entire message.Yep I know about this, like I'm saying everything is okay when all the clients send the message not in the same time, but when the server tries to read client message at the same time, for example there are 3 clients message arrive at the same time and the server tries to read it, the server construct all the message exactly like the first message arrived.
This is the actual construction of the message, read the length of the packet first, then construct the message into DataInputStream, and read the message from it:
// packet stream reader
private DataInputStream input;
private NewPipedOutputStream storage;
private boolean     waitingForLength = true;
private int length;     
protected synchronized void read() throws IOException {
  readBuffer.clear(); // clear previous byte buffer
  int bytesRead = client.read(readBuffer); // read how many bytes read
  if (bytesRead < 0) {
    throw new IOException("Reached end of stream");
  } else if (bytesRead == 0) {
    return;
  // the bytes read is used to fill the byte buffer
  storage.write(readBuffer.array(), 0, bytesRead);
  // after read the packet
  // this is the message construction
  // write to byte buffer to input storage
  // (this will write into DataInputStream)
  storage.write(readBuffer.array(), 0, bytesRead);
  // unpack the packet
  while (input.available() > 0) {
    // unpack the byte length first
    if (waitingForLength) { // read the packet length first
      if (input.available() > 2) {
        length = input.readShort();
        waitingForLength = false;
      } else {
        // the length has not fully read
        break; // wait until the next read
    // construct the packet if the length already known
    } else {
      if (input.available() >= length) {
        // store the content to data
        byte[] data = new byte[length];
        input.readFully(data);
        // add to received packet
        addReceivedPacket(data);
     waitingForLength = true; // wait for another packet
      } else {
        // the content has not fully read
     break; // wait until next read
(2) You're sharing the same ByteBuffer between all your clients
so you're running some considerable risks if (1) doesn't happen.
I recommend you run a ByteBuffer per client and have a good look
at its API and the NIO examples.Yep, I already use one ByteBuffer per client, it's not shared among the clients, this is the class for each client:
private SocketChannel client; // socket channel per client
private ByteBuffer readBuffer; // byte buffer per client
private Selector packetReader; // the selector that is shared among all clients
private static final int BUFFER_SIZE = 10240; // default huge buffer size for reading
private void init() throws IOException {
  storage; // the packet storage writer
  input; // the actual packet input
  readBuffer = ByteBuffer.allocate(BUFFER_SIZE); // the byte buffer is one per client
  readBuffer.order(ByteOrder.BIG_ENDIAN);
  client.configureBlocking(false);
  client.socket().setTcpNoDelay(true);
  // register packet reader
  // one packetReader used by all clients
  client.register(packetReader, SelectionKey.OP_READ, this);
}Cos the ByteBuffer is not shared, I think it's impossible that it mixed up with other clients, what I think is the SocketChannel client.read(ByteBuffer) that fill the byte buffer with the same packet?
So you're probably getting the data all mixed up - you'll probalby be seeing a new client message followed by whatever was there from the last time, or the time before.If the server not trying to read all the messages at the same time, it works fine, I think that if the client SocketChannel filled up with multiple client messages, the SocketChannel.read(...) only read the first client message.
Or am I doing something wrong, I could fasten the server read by removing the Thread.sleep(100); but I think that's not the good solution, since in NIO there should be time where the server need to read client multiple messages at once.
Any other thoughts?
Thanks again.

Similar Messages

  • Seeburger AS2 Adapter:  Receiving multiple messages

    Hi guys,
    I'm having some trouble using AS2 Adapter for receiving multiple messages. The problem is really similar to Peter's problem.
    Seebuger AS2 adapter for XI as sender for multiple messages
    I have it configured for one scenario and it's working fine. The problem is when I'm trying to receive other messages for the same Party but different services. Meaning, I've one Party(example BMW) and several services (BMW_DE, BMW_USA, etc). I'm able to receive messages from service BMW_DE but when configuring BMW_USA I'm getting HTTP 403 Forbidden.
    This error may have different reasons:
    a) You or your partner has entered an incorrect AS2 ID for one of the involved parties.
    b) A valid sender agreement is missing.
    c) There are more then one AS2 sender agreements with the same sender AND receiver party.
    d) The corresponding inbound channel is set to inactive.
    And the problem is that there are two sender agreements. Although the services are different, XI is not able to find the correct sender agreement to be used. After deleting the second second agreement, I'm able to send the  respective message....
    Can anyone give me a hint on how to solve this problem?

    Hi,
    this is done by different AS2 subjects. The sender agreement is selected based on this. So create separate AS2 receiver adapters for every message you need and put there different message subjects.
    So if you'll have 3 AS2 receiver channels with subjects:
    MessageType1_DE
    MessageType1_US
    the AS2 adapter will work like following:
    first it tries to find an exact message subject, if it is found, message is "assigned" to this sender agreement. If no exact message matches the subject, then wildcards are used. (this mechanism is described in the Seeburger AS2 guide).
    If you are getting 403 HTTP code, there may be also problem with authentication certificates.
    Another problem may be, you don't have configured AS2 receiver channel for current subject.
    Does this help you? Or you meant it another way?
    Peter
    p.s. check the answer above my post, Vardharajan's right
    Edited by: Peter Jarunek on May 19, 2008 2:11 PM

  • Moving multiple messages at once...HELP PLEASE!

    I can't move multiple messages at once in Mail. Why not? When's it going to get fixed?

    I can. So it's just your installation. If I were you, the first thing I would try to do is, if you have multiple user accounts on that same computer, see if it is afflicting the other user accounts as well.
    If so, I would try reapplying 10.6.3 COMBO update, after running disk utility verify hard disk (and repair if necessary) and running disk utility repair disk permissions.
    If not, I would try rebuilding all the mailbox folders. May want to run the two disk utility routines anyways before rebuilding.

  • Clustered WebLogic MDB receiving multiple messages...

    Hi all,
    I have a JMS WebLogic clustering problem.
    First, let me describe the problem.  The MDB of my application (it's a simple test application to get the clustering kinks worked out) is listening to a Topic and when I publish a message to the Topic the MDB is receiving the message multiple times.  I have a max of 4 managed servers in my cluster and when they are all running, each MDB on each managed server gets the message 4 times.  If I shut down two of the managed servers, then each MDB on each of the two running managed servers get the message 2 times.  So my MDB is receiving the message multiple times equal to the number of manged servers I have running in my cluster.
    So my question is what is the proper way to configure JMS Servers for a cluster?
    Next I want to explain how I start the managed servers in the cluster.  At this time I am unable to use NodeManager so starting of the instances is done manually via command line. Basically it's a wrapper around the startManagedWebLogic.sh script.  I know something is wrong with my JMS configuration because when I start the managed servers I will typically see an error which looks like this:
    <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: MyMDB is unable to connect ot the JMS destination: jms/myTopic.  The error was:
    werblogic.jms.common.JMSException: could not find Server NAME_OF_MANAGED_SERVER
    Nested exception: weblogic.jms.common.JMSException: could not find Server NAME_OF_MANAGED_SERVER
    Nested exception: weblogic.jms.common.JMSException: could not find Server NAME_OF_MANAGED_SERVER
    Nested exception: weblogic.jms.common.JMSException: could not find Server NAME_OF_MANAGED_SERVER
    Nested exception: weblogic.messaging.dispatcher.DispatcherException: could not find Server NAME_OF_MANAGED_SERVER
    Nested excpetion: javax.naming.NameNotFoundException: Unable to resolve 'weblogic.messaging.dispatcher.S:NAME_OF_MANAGED_SERVER'. Resolved 'weblogic.messaging.dispatcher'; remaining name 'S:NAME_OF_MANAGED_SERVER'>
    Despite this error message, the MDB on that manged server does still successfully recieve messages posted to the Topic, though, as stated earlier, my problem is the MDB is getting the message more than once.
    Also, I've confirmed all managed servers in the cluster can receive the message posted to the Topic no matter which managed server posts the original message.
    Next is to explain my cluster configuration.  I'm sure I know is is wrong, but not sure where my mistake is.  Here is my JMS configuration for the cluster.
    4 JMS Servers
    Persistence Store:
    Each JMS Server has its own persistent store
    Each store targets one of the 4 (migratable) managed servers
    Each store is a FileStore
    Filesystem is not shared between VMs in the cluster
    Target:Each JMS server targets one of the 4 (migratable) managed servers
    1 JMS ModuleTarget: The cluster - "All servers in the cluster"
    1 JMS Topic
    Destination type: Uniform
    Forwarding Policy: Replicated
    Template: None
    Target: The cluster - "All servers in the cluster"
    Subdeployment: Default Targeting
    1 JMS ConnectionFactory
    Subscription Sharing Policy: Exclusive
    Client ID Policy: Restricted
    XA connection factory enabled (YES)
    Target: The cluster - "All servers in the cluster"
    Subdeployment: Default Targeting

    Hi Michael,
    I need to clarify exactly what you want to happen. What you are saying you want is not typical. I expected you to say you wanted Scenario 8 or 9. Those are the most common.
    I will try to capture what your words are saying in "graphic text". I'm not sure that the graphic in the document is accurate.
    Server 1                      Server 2                      Server 3                      Server 4
    JMS svr 1                    JMS svr 2                   JMS svr 3                    JMS svr 4
    DistTopic-mem1         DistTopic-mem2          DistTopic-mem3          DistTopic-mem4
    MDB listens locally     MDB listens locally      MDB listens locally      MDB listens locally
    Events...
    1. Message published
    on Server 1
    2. Message is replicated
    to server 2
    3. Local MDB get message
                                      4. Message is replicated
                                      to server 3
                                      5. Local MDB gets message
                                                                          6. Message is replicated
                                                                          to Server 4
                                                                          7. Local MDB gets the message
                                                                                                                8. Local MDB gets the message.
    This is the standard Replicated Distributed Topic flow. Messages are replicated, and every message is forwarded to every member of the distributed topic.
    In the case, each message will be processed 4 times - once per server.
    This is what your text says you want.
    This is scenario 1 in the doc.
    I don't really know what is going wrong with your MDB. The topics are getting created per your comment about the ability to publish a message.
    Are you seeing errors during deployment?
    To answer your question about where to set topicMessagesDistributionMode and distributedDestinationConnection, they are set in a deployment descriptor or in an annotation in the MDB. See http://docs.oracle.com/middleware/1213/wls/WLMDB/summary.htm#WLMDB1385..
    Let me know if I described what you want to happen.
    If so, a replicated distributed topic and an MDB deployed to the cluster should just work with no need to set the descriptor elements.
    Dave

  • JMS (Transaction ???) problem, consumer receives all messages at once.

    Hallo, I have an application which implements asynch communication between the web and business layer using JMS.
    On a page a user can upload files, which are processed by the backend. For large files this can be a long running process, thats why we use JMS to send the file asynchronously and use JMS to update progress information on the page.
    The application works fine on JBoss 6 with HornetMQ.
    After porting to Weblogic I see consistently a strange phenomenon. The update messages from the processing backend logic are send as expected. But the receiver does not receive one message after another but receives all the messsages almost at once after only the producer has sent the last message.
    For me this is totally unexpected behavior and of course our progress bar on the page does not work properly, but merely jumps from 0 to 100% after the data has been processed.
    It looks like the consumer waits until the producer has finished its transaction. But how can this be possibly? I have learned that transaction never span producer - messagesystem - consumer.
    Example Code:
    Producer:
    import javax.annotation.PostConstruct;
    import javax.annotation.PreDestroy;
    import javax.annotation.Resource;
    import javax.ejb.EJB;
    import javax.ejb.Stateless;
    import javax.interceptor.Interceptors;
    import javax.jms.Connection;
    import javax.jms.ConnectionFactory;
    import javax.jms.DeliveryMode;
    import javax.jms.Destination;
    import javax.jms.JMSException;
    import javax.jms.MessageProducer;
    import javax.jms.Session;
    import javax.jms.TextMessage;
    import org.apache.log4j.Logger;
    import com.sun.tools.ws.wsdl.document.jaxws.Exception;
    import dsde.core.aspects.DsdeException;
    import dsde.core.aspects.ExceptionHandler;
    import dsde.core.entity.Data;
    @Stateless
    @Interceptors(ExceptionHandler.class)
    public class ParserBean implements Parser {
         private Logger log = Logger.getLogger(this.getClass());
         @EJB
         private DataDAO dataDAO;
         //Weblogic
         @Resource(mappedName="jms.BackQueue")
         //Jboss
         //@Resource(mappedName="queue/dsdeBackQueue")
         private Destination backQueue;
         //Weblogic
         @Resource(mappedName="jms.dsdeConnectionFactory")
         //JBoss
         //@Resource(mappedName="XAConnectionFactory")
         private ConnectionFactory connectionFactory;
         private Connection connection;
         @Override
         public void parse(String text, String description, String sessionId) throws DsdeException{
              double percentDone = 0;
              double j = 0.0;
              //Simuliere was langdauerndes, schwieriges
              for (int i=0; i < text.length(); i++) {
                   j = i;
                   percentDone = j / text.length() * 100;
                   try {
                        Thread.sleep(1000);
                   } catch (InterruptedException e) {
                        log.error(e);
                   if (i % 2 == 0) {
                        //periodisch das Frontend mit dem Fortschritt updaten
                        sendFeedback((int)percentDone, sessionId);
              //Zum Schluss noch senden dass wir fertig sind
              //Sonst wird der Send Button nicht wieder aktiv
              percentDone=100;
              sendFeedback((int)percentDone, sessionId);
              //Jetzt wird noch richtig geparsed :-)
              String[] words = text.split(" ");
              //Entity konstruieren
              Data data = new Data(description, words);
              //Das Ergebnis in die Datenbank schreiben
              dataDAO.saveData(data);
         private void sendFeedback(int percentDone, String sessionId) {
              Session session = null;
              try {
                   session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
                   MessageProducer producer = session.createProducer(backQueue);
                   producer.setTimeToLive(50000);
                   producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
                   TextMessage message = session.createTextMessage();
                   message.setJMSCorrelationID(sessionId);
                   message.setText("" + percentDone);
                   producer.send(message);
                   log.info("ParserBean has sent " + percentDone);
              } catch (JMSException e) {
                   log.error(e);
              } finally {
                   if (session != null) {
                        try {
                             session.close();
                        } catch (JMSException e) {
                             log.error(e);
         @PostConstruct
         public void init(){
              try {
                   connection = connectionFactory.createConnection();
              } catch (JMSException e) {
                   log.error(e);
         @PreDestroy
         public void close() {
              try {
                   connection.close();
              } catch (JMSException e) {
                   log.error(e);
    }Consumer:
    import javax.annotation.ManagedBean;
    import javax.annotation.PostConstruct;
    import javax.annotation.PreDestroy;
    import javax.faces.bean.SessionScoped;
    import javax.faces.context.FacesContext;
    import javax.jms.Connection;
    import javax.jms.ConnectionFactory;
    import javax.jms.JMSException;
    import javax.jms.Message;
    import javax.jms.MessageConsumer;
    import javax.jms.MessageListener;
    import javax.jms.Queue;
    import javax.jms.Session;
    import javax.jms.TextMessage;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.servlet.http.HttpSession;
    import org.apache.log4j.Logger;
    @ManagedBean
    @SessionScoped
    public class FeedbackReceiverBean implements MessageListener {
         private Logger log = Logger.getLogger(this.getClass());
         //jndi names of managed objects
         private String connectionFactoryName;
         private String queueName;
         private Connection connection;
         private Session session;
         private int percent;
         private boolean disabled;
         public boolean isDisabled() {
              return disabled;
         public void setDisabled(boolean disabled) {
              this.disabled = disabled;
         public int getPercent() {
              return percent;
         public void setPercent(int percent) {
              this.percent = percent;
         public void setConnectionFactoryName(String connectionFactoryName) {
              this.connectionFactoryName = connectionFactoryName;
         public void setQueueName(String queueName) {
              this.queueName = queueName;
         @PostConstruct
         public void init() throws NamingException, JMSException {
              FacesContext facesContext = FacesContext.getCurrentInstance();
              HttpSession httpSession = (HttpSession) facesContext.getExternalContext().getSession(false);
              String sessionId = httpSession.getId();
              Context context = new InitialContext();
              ConnectionFactory connectionFactory = (ConnectionFactory) context.lookup(this.connectionFactoryName);
              Queue queue = (Queue) context.lookup(this.queueName);
              this.connection = connectionFactory.createConnection();
              this.session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
              String filter = "JMSCorrelationID = '" + sessionId + "'";
              MessageConsumer consumer = session.createConsumer(queue, filter);
              consumer.setMessageListener(this);
              connection.start();
         @PreDestroy
         public void close() throws JMSException {
              this.session.close();
              this.connection.close();
         @Override
         public void onMessage(Message message) {
              if (message instanceof TextMessage) {
                   TextMessage textMessage = (TextMessage) message;
                   try {
                        this.percent = Integer.parseInt(textMessage.getText());
                        if (percent >= 100) {
                             this.disabled = false;
                        log.info("Prozent " + percent);
                   } catch (JMSException e) {
                        log.error(e);
              else {
                   log.error(message.toString() + " is no TextMessage");
         public void disable() {
              this.disabled = true;
    }Configuration:
    <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-jms xmlns="http://xmlns.oracle.com/weblogic/weblogic-jms" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-jms http://xmlns.oracle.com/weblogic/weblogic-jms/1.1/weblogic-jms.xsd">
      <connection-factory name="dsdeConnectionFcatory">
        <default-targeting-enabled>true</default-targeting-enabled>
        <jndi-name>jms/dsdeConnectionFactory</jndi-name>
        <default-delivery-params>
          <default-delivery-mode>Persistent</default-delivery-mode>
          <default-time-to-deliver>0</default-time-to-deliver>
          <default-time-to-live>100</default-time-to-live>
          <default-priority>4</default-priority>
          <default-redelivery-delay>0</default-redelivery-delay>
          <send-timeout>10</send-timeout>
          <default-compression-threshold>2147483647</default-compression-threshold>
        </default-delivery-params>
        <client-params>
          <client-id-policy>Restricted</client-id-policy>
          <subscription-sharing-policy>Exclusive</subscription-sharing-policy>
          <messages-maximum>10</messages-maximum>
        </client-params>
        <transaction-params>
          <xa-connection-factory-enabled>true</xa-connection-factory-enabled>
        </transaction-params>
        <security-params>
          <attach-jmsx-user-id>false</attach-jmsx-user-id>
        </security-params>
      </connection-factory>
      <queue name="dsdeQueue">
        <sub-deployment-name>dsdeQueue</sub-deployment-name>
        <jndi-name>jms/dsdeQueue</jndi-name>
      </queue>
      <queue name="dsdeFeedbackQueue">
        <sub-deployment-name>dsdeFeedbackQueue</sub-deployment-name>
        <jndi-name>jms/dsdeFeedbackQueue</jndi-name>
      </queue>
      <queue name="dsdeBackQueue">
        <sub-deployment-name>dsdeBackQueue</sub-deployment-name>
        <jndi-name>jms/BackQueue</jndi-name>
      </queue>
    </weblogic-jms>Any help would be greatly appreciated.
    Thanks,
    Hans

    Thanks for posting your analysis!
    I think your solution is probably best.
    FYI: Your JMS session was never a "transacted" session. It's definitely confusing, but the term "transacted session" has a special meaning in JMS, it actually refers to a session that is not XA/JTA aware and instead maintains an internal local transaction that's scoped only to the current JMS session's operations. A transacted session is created by passing "true" to the first parameter of createSession, and such a session's local transaction is committed by calling session.commit() (which starts a new transaction). To further add to the confusion, I think that JEE servers are actually obligated to ignore requests to set the transacted flag to true -- WebLogic does this trick by secretly wrapping access to the JMS API when applications lookup JMS connection factories via a resource reference.
    Regards,
    Tom

  • In yahoo mail, can I delete multiple messages at once?

    For example, I'd like to try to clean up my mailbox.  On an MS OS, I can do a search on "sears", everything with that word is displayed.  I can then delete them all at once, usually with just one click.  Is there something similar on a MacBook Air?  Thanks!

    Hey,
    To delete them locally:
    *IMAP account [http://kb.mozillazine.org/Deleting_messages_in_IMAP_accounts]
    *[http://en.kioskea.net/faq/2580-permanently-delete-your-mails-on-thunderbird]
    To delete them on the server:
    This will depend on your settings on the server.

  • Email issue receiving multiple messages from same source

    For some reason, when I get two emails at once from a course I'm taking, they show up on my iphone, but only one shows in my macbook inbox. Once I open it in my macbook, it deletes the other on my iphone. ***?

    People keep reporting this problem from time to time, and almost always it is some sort of Yahoo account and there is nothing the user can do to fix it. The problem usually fixes itself after some time for no apparent reason, just as it started.
    Try using a different mail client, such as Thunderbird, and see whether the problem happens there as well. If so, then you know Mail has no bearing on it and there is nothing you can do other than complaining to your ISP or whoever is responsible for that account.

  • Is it possible to reply to multiple messages at once?

    So I have about 4 accounts it checks, but as a rule, one of my business ones usually has about 20 any given time that could all be answered with the same reply. Is there a way I can select all these, and mail a mass reply from one account?

    Alternatively, paste this script into a new Script Editor window and read the introductory comment.
    AK
    <pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">(*Save the script in the Library/Scripts/Applications/Mail folder of your home directory. With several messages selected in Mail run
    the script from the Scripts menu item on the menu bar. It will generate a new message with the sender of each of the selected
    mails as a recipient, and the subject of the first selected mail as subject. Non-adjacent messages can be selected with Command-click.
    AK Sep 2005 kinsella at itcarlow dot ie *)
    using terms from application "Mail"
    on perform mail action with messages TheMail
    tell application "Mail"
    set theSubject to ""
    repeat with ThisMail in TheMail
    set TheName to extract name from sender of ThisMail
    set TheAddress to extract address from sender of ThisMail
    if theSubject is "" then -- set subject, make message 1st time through
    set theSubject to subject of ThisMail
    if theSubject does not start with "Re:" then set theSubject to "Re: " & theSubject
    set newMessage to make new outgoing message with properties {subject:theSubject}
    end if
    tell newMessage
    make new to recipient at end of to recipients with properties {name:TheName, address:TheAddress}
    end tell
    end repeat
    tell newMessage to set visible to true
    end tell
    end perform mail action with messages
    end using terms from
    using terms from application "Mail"
    on run
    tell application "Mail" to set sel to selection
    tell me to perform mail action with messages (sel)
    end run
    end using terms from
    </pre>

  • Friends are receiving multiple duplicate messages

    After switching to Verizon from AT&T, my friends are reporting that when I send a text message, they will receive the same message two to four times in a row.  Sometimes a message will continue to repeat itself after x minutes.
    I know it is not the phone because I first had a Droid Razr and then switched to the HTC Trophy.  The problem occurs on both phone.
    I just got the Trophy today and straight out of the box, after activation my friends reported receiving multiple messages again. 
    I'm using the native text messaging app and have powered the phone off several times.  But again, since it happened with the Droid, it doesn't seem like it would be a phone issue. 
    Any thoughts of this would be great.

    Hi SonorousGiraffe & NATRAPS!
    I see how the duplicate text message problem can become aggravating.  I would like to assist with resolving.
    First, thanks to Ann154 for the great feedback & suggestion!
    There may be some resetting on the account we would need to do in order to resolve the duplicate text message issue.  If you are still experiencing this, please reach out to me directly so I can further assist.
    Thanks,
    AnthonyTa_VZW
    VZW Support
    Follow us on Twitter @VZWSupport

  • Deleting multiple messages NOT IN SEQUENCE.....

    Does anyone know how to delete multiple messages at once that are not in sequence (for example, email #1, 3, and 5)?

    Unfortunatly, it's not possble on the BB.
    1. Please thank those who help you by clicking the "Like" button at the bottom of the post that helped you.
    2. If your issue has been solved, please resolve it by marking the post "Solution?" which solved it for you!

  • Is there a way to display a checkbox beside each message for moving or deleting more than 1 message at once?

    Embarqs' (now centurylink) mail website has an empty check-box beside each message to make it easier to sort and delete multiple messages at once, instead of moving or deleting them one at a time. Does thunderbird have the same, or a similar option, if so, how can I activate, or display it?
    Thanks,
    Tom S.

    You simply highlight the messages using the standard Windows selection keys. (I assume you're using Windows.)
    To select contiguous messages, select the first one by clicking on it. Scroll to the last message you want to select and click on it while holding down the SHIFT key. All messages between the two will be selected.
    To select non-contiguous messages. Click on each one while holding down the CONTROL (CTRL) key.
    Once the messages are highlighted you can use most operations (such as delete or move) on the lot.

  • Socket error on receive message on MDM 7.1 Console

    Greetings -
    This may be a simple question, but I couldn't find a solution, so here goes:
    I have a new install for MDM:
    OS: B.11.31 U ia64 (HP Unix)
    MDM: 7.1.0.5
    DB: Oracle 10.2.0.4
    MDM Console Client : 7.1.0.5.92
    I have MDM server and database on same server.  When I go to connect to the server
    and create a repository for the first time, I get the message "Socket error on receive".
    This happens when I go to set my DBMS Settngs as well ...
    I didn't see that on my Suse Linux 10 install. 
    I am looking at the logs, but I don't see what / why the initial call does not go through to the
    database to set up connection.  I have also put in fake SYSTEM / Password in the settings
    and I get the same message.  It seems that it doesn't get to the point where it authenticates
    to the database(??).
    I do have a core file.  If I do a 'strings' on the core file, it appears that there is a connection
    trying to happen.  In the nohup.out file, I see this:
    [[excerpt]]
    [[INFO]] <MDM/Servers/MDS/MDSCommon/XCSGlobalFunctions.cpp:410> "User authentication method: Repository"
    ConnectionAcceptor::ConnectionAcceptor(): bind() failed with errno=0x000000E2 'Address already in use'
    Trying again for 120 seconds
    [/excerpt]
    Though this could be a misleading message ...
    Few question:
    How can I determine how to trace / see how the Console is trying to connect to the
    MDM server / database?
    How can I figure out what address this is talking about?
    Is this just a vague error or should I be looking somewhere specific for troubleshooting?
    Please advise!
    Thanks!
    -s
    Edited by: Shaunn Johnson on Nov 12, 2010 9:20 PM

    Everyone -
    We have a solution, however, it introduces a lot of new things that will require some
    investigation.  Before I go to that level, let me tell you what we did to resolve:
    Recap:
    Our MDM installation is on a shared OS (HP Unix) environment.  It is not virtual.  In short,
    we have one large server and multiple application that have their own logical IP Addresses
    and hostnames.
    When trying to connect from the MDM console (laptop/workstation/etc), through the application
    (MDM server) to the database (on the HP Unix system) and create a repository, this is where we
    see the 'Socket on receive' error.
    Solution:
    As per SAP "Note 1264660 - MDM on HP-UX IA crash when used with Oracle 10.2.0.4 client",
    part of the problem is because of how Oracle binds to a specific socket.  By itself, that
    solution did not work.  This effects the server side, too.  The next steps to fix this were to:
    extract the SAP OCL10264.SAR files in the shared client directory (/oracle/client/10x_64/instantclient)
    backup the library files from the server-level area of Oracle (/oracle/<SID>/102_64/lib)
    stop Oracle, the listener and MDM
    copy the SAP OCI files (as noted in  1264660) to the /oracle/<SID>/102_64/lib directory also
    verify the Oracle environment variables
    restart all systems and services (Oracle, MDM, listener)
    Of course, your oracle library paths will vary.  Check your LD_LIBRARY_PATH for that location.
    We also learned that if we set the LD_LIBRARY_PATH environment variable to where the
    oracle client library files were (client side), things should work.  We did try that, but it did
    not work.  At least, we tried it once and started to test other things (including our solution).
    Feel free to try that option and update this thread.
    Our solution was to copy those files directly into our server path and try again.
    Thanks to everyone who took time to look at this!
    -s

  • Error receiving AS2 message from partner: B2B-50037:  B2B inbound message processing error

    B2B/SOA 11.1.1.6.0
    We are setting a new trading partner and when we started document transmissions we are getting errors on the inbound messages: B2B-50037:  B2B inbound message processing error.
    The attachment shows the relevant lines from the soa log and diagnostic log files.  Here is the error detail that shows:
    [URI: /b2b/httpreceiver] Error -:  B2B-50037:  B2B inbound message processing error[[
    Error -:  B2B-50037:  B2B inbound message processing error
            at oracle.tip.b2b.engine.Engine.processIncomingMessageImpl(Engine.java:3143)
            at oracle.tip.b2b.engine.Engine.processIncomingMessage(Engine.java:1650)
            at oracle.tip.b2b.transport.InterfaceListener.onMessageLocal(InterfaceListener.java:403)
            at oracle.tip.b2b.transport.InterfaceListener.onMessage(InterfaceListener.java:214)
            at oracle.tip.b2b.transport.basic.TransportServlet.doPost(TransportServlet.java:754)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
            at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
            at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
            at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
            at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
            at java.security.AccessController.doPrivileged(Native Method)
            at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
            at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
            at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
            at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
            at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
            at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
            at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
            at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
            at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
            at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
            at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    From the b2b_wire_message we get these Protocol_Transport_BINDINGS:
    ChannelName=TransportServlet
    Reverse-Via=LIN-ISA1
    AS2-To=accobra.....
    Date=Fri, 26 Sep 2014 05:46:17 +0000
    AS2-Version=1.2
    AS2-From=K.......
    Disposition-Notification-Options=signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, sha1
    Disposition-Notification-To=http://<ip&port>/as2in
    Message-ID=<[email protected]>
    MSG_RECEIVED_TIME=Fri Sep 26 00:46:17 CDT 2014
    ECID-Context=1.0050z5j^buc6yGn6wnZf6G0002f60007bt;kXjE1ZDLIPGIj2QCYV8QoKSSmLRO_PQT_IS
    Content-Type=application/pkcs7-mime; smime-type=enveloped-data; name=smime.p7m
    Proxy-Client-IP=172.17.25.101
    MIME-Version=1.0
    User-Agent=e-integration AS2 Server V 6.1.8
    X-Forwarded-For=172.17.25.101
    Content-Length=3602
    Host=nalinsoa05.abd.ad.acco.com
    x-weblogic-cluster-hash=QoZzGUzdcjBD5fGIE8Uos5abiHI
    EDIINT-Features=multiple-attachments, CEM
    Connection=Keep-Alive
    X-WebLogic-KeepAliveSecs=30
    X-WebLogic-Request-ClusterInfo=true
    The message creates a wire message, business message, and an application message.
    What doesn't happen is no MDN gets sent back to the partner.  It should be a synchronous MDN.
    We have double checked the certificates on both ends and they are OK.
    The document and Agreement get recognized OK:
    Refer To Message
    Refer To Message
    Sender Type
    AS2 Identifier
    Sender Value
    K. . .
    Receiver Type
    AS2 Identifier
    Receiver Value
    accobr. . .
    Sender
    K. . . l
    Receiver
    ACCO . . .
    Agreement Id
    K. . .l_EDI_X12_4010_856_856Def_Inbound
    Agreement
    K. . .l_EDI_X12_4010_856_856Def_Inbound
    Document Type
    856
    Document Protocol
    EDI_X12
    Document Version
    4010
    Message Type
    REQ
    Direction
    INBOUND
    State
    MSG_ERROR
    Acknowledgement Mode
    SYNC
    Response Mode
    ASYNC
    Send Time Stamp
    09/26/2014 12:46:17 AM
    Receive Time Stamp
    09/26/2014 12:46:17 AM
    The error is vague enough to provide little or no help in locating the root cause of the issue.
    Any assistance in providing information on how to get this working would be greatly appreciated.
    We do have dozens of other AS2 partners working in this instance just foe reference.  We are just having issues with this new partner setup.
    Thank you.
    Regards,
    Ken

    Ken,
    I am observing the Ack Mode is set as "SYNC" . This is selected by default. This option is available in the channel configuration section
    If the usecase is not SYNC, please change as ASYNC and test. It should work.

  • General Workflow is receiving multiple workflow errors

    Dear Team,
    i have working in production system facing problem with workflow.
    General Workflow is receiving multiple workflow errors
    Resulting in confusion for business users to resolve.
    Old Workflow errors that have been resolved appear to have been resent and sent to the wrong people.  Claims Workflow messages are being sent to Customer Service, etc.  only thing is we know the user who had changed.
    please guide me how to achive this problem?

    Hello,
    How are emails being sent to users about errors in already processed workflows?
    Not by the workflows, they've already been completed. Do you have a custom job running periodically that looks for errors?
    Check SM37. Also make sure these mails aren't coming from a Test system.
    Could you give an example of one of these mails.
    When you find the solution to your problem, please post it here.
    regards
    Rick Bakker
    hanabi technology

  • Receiving multiple copies of text messages

    i have an iPhone 6 plus and have been receiving multiple copies of the same text message (up to 4x) from various contacts across various carriers. This has been an issue throughout having an iPhone 5s and 6 plus, and only occurs with regular messages, not iMessage. It also does not occur for automated text messages sent to me (e.g. Redbox). While I have unlimited messages it is frustrating because they are sent to me multiple times, and not necessarily in the same order each time. It is also inconsistent. I might get a single copy of one text and four of another. I have reset the phone, changed phones, and every other thing possible. This seems to be an issue not on my end. Assistance would be much appreciate.  Thanks.

    Great information Kashume42! Let's make sure that your messaging application is not the culprit. Please download and install Verizon Messages http://bit.ly/1mTrHaQ from the App store. Make it your default messaging application and test. Keep us posted.
    AntonioC_VZW
    Follow us on Twitter @VZWSupport
    If my response answered your question please click the "Correct Answer" button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

Maybe you are looking for

  • Creating a new folder in a SharePoint library using C# Windows Application.

    I have tried to create a folder within a SharePoint document library. The coding is as follows. Text Box Name: txtNewFolderName Button Name : btnCreateNewFolder private void btnCreateNewFolder_Click(object sender, EventArgs e) //String parameters for

  • Incoming messages going directly to trash

    Hi all i have been having nothing but trouble with my BTinternet account since the wwekend. My original password was not recognised so had to generate a new one, then when FINALLy managing to get my email on my mobile devices ALL my incoming messages

  • Loading An External Movie...

    I'm new to Flash and this may seem like a silly question but I need help with using an external .swf file in my main timeline for my site. Basically, I've figured out how to load the movie and that works great, but the problem is when I click off of

  • Hi. Is there a wizard video web maker to upload my little clips to my....

    website? Thank you Without suffering brain damage figuring out how to work MooTools, Shadowbox js, etc.. Just something quick, nice and easy. Like: http://www.easyflv.com/ http://www.viscomsoft.com/products/webplayer/index.html I downloaded and the f

  • Problem saving XML Forms builder project

    Hello, I have extended my xml forms project with some functionalities and now I'm not able to save and generate it. When I'm trying to save the project saving process stops while saving 'GUIModel-Internal.xml'  which is quite big file (~4MB). I can't