Package org.apache.catalina.cluster.session

Examples of org.apache.catalina.cluster.session.SessionMessage


                new ReplicationStream(new java.io.ByteArrayInputStream(data),
                                      getClass().getClassLoader());
            Object myobj = stream.readObject();
            if ( myobj != null && myobj instanceof SessionMessage ) {
               
                SessionMessage msg = (SessionMessage)myobj;
                log.debug("Assuming clocks are synched: Replication took="+(System.currentTimeMillis()-msg.getTimestamp())+" ms.");
                String ctxname = msg.getContextName();
                //check if the message is a EVT_GET_ALL_SESSIONS,
                //if so, wait until we are fully started up
                if ( ctxname == null ) {
                    java.util.Iterator i = managers.keySet().iterator();
                    while ( i.hasNext() ) {
View Full Code Here


        try {
            msg.setAddress(membershipService.getLocalMember());
            Member destination = dest;

            if (msg instanceof SessionMessage) {
                SessionMessage smsg = (SessionMessage) msg;
                //if we request session state, send to the oldest of members
                if ((destination == null)
                        && (smsg.getEventType() == SessionMessage.EVT_GET_ALL_SESSIONS)
                        && (membershipService.getMembers().length > 0)) {
                    destination = membershipService.getMembers()[0];
                }//end if
            }//end if
            msg.setTimestamp(System.currentTimeMillis());
View Full Code Here

                    new java.io.ByteArrayInputStream(data), getClass()
                            .getClassLoader());
            Object myobj = stream.readObject();
            if (myobj != null && myobj instanceof SessionMessage) {

                SessionMessage msg = (SessionMessage) myobj;
                if (log.isDebugEnabled())
                    log.debug("Assuming clocks are synched: Replication took="
                            + (System.currentTimeMillis() - msg.getTimestamp())
                            + " ms.");
                String ctxname = msg.getContextName();
                //check if the message is a EVT_GET_ALL_SESSIONS,
                //if so, wait until we are fully started up
                if (ctxname == null) {
                    java.util.Iterator i = managers.keySet().iterator();
                    while (i.hasNext()) {
View Full Code Here

            ReplicationStream stream =
                new ReplicationStream(new java.io.ByteArrayInputStream(data),
                                      getClass().getClassLoader());
            Object myobj = stream.readObject();
            if ( myobj != null && myobj instanceof SessionMessage ) {
                SessionMessage msg = (SessionMessage)myobj;
                //remove when checking in
                perfMessageRecvd(msg.getTimestamp());
                String name = msg.getContextName();
                //check if the message is a EVT_GET_ALL_SESSIONS,
                //if so, wait until we are fully started up
                if ( name == null ) {
                    java.util.Iterator i = managers.keySet().iterator();
                    while ( i.hasNext() ) {
View Full Code Here

TOP

Related Classes of org.apache.catalina.cluster.session.SessionMessage

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.