Package com.sun.enterprise.ee.server.group

Examples of com.sun.enterprise.ee.server.group.Message


                __logger.log(Level.FINE, "This instance is elected for sending"+
               " messages");
            }
            switch (route) {
                case ONETOALL :
                    Message mesg = MessageFactory.createMessage(route);
                    mesg.setAggregationKey(key);
                    try {
                        cb.messagingCompleted();
                        if (__logger.isLoggable(Level.FINE)) {
                           __logger.fine("Sending ...." + mesg.toString());
                        }
                        gms.getGroupHandle().
                        sendMessage(this.componentName, mesg.toBytes());
                    } catch (Exception e) {
                        e.printStackTrace();
                        // FIX ME.
                    }
                    break;
                case NONE :
                    // No ROUTE lets timeout...
                    if (cb != null)
                        cb.messagingTimedOut();
                    break;
                case ALLTOONE :                                            
                    MessageAggregator mr = obtainMA(key, route)
                    mr.setCallBack(cb);
                    return mr.getBarrier();               
            }
        } else {           
            switch (route) {
                case ALLTOONE :
                    Message mesg = MessageFactory.createMessage(route);
                    mesg.setAggregationKey(key);
                    try {
                        if (__logger.isLoggable(Level.FINE)) {
                            __logger.fine("Sending ALLTOONE ...."
                            + mesg.toString() + "To " + getElectedInstance());
                        }
                        //gms.getGroupHandle().sendMessage
                        //(this.componentName, getElectedInstance(), mesg.toBytes());
                        gms.getGroupHandle().sendMessage
                        (this.componentName, mesg.toBytes());
                    } catch (Exception e) {
                        e.printStackTrace();
                        // FIX ME.
                    }
                    break;
View Full Code Here

TOP

Related Classes of com.sun.enterprise.ee.server.group.Message

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.