boolean debugEnabled = log.isDebugEnabled();
if (debugEnabled)
log.debug("dipatchMessage: " + endpoint.getName());
// [JBWS-1324]: workaround to prevent message processing before endpoint is started
EndpointState state = endpoint.getState();
ObjectName name = endpoint.getName();
long startTime = System.currentTimeMillis();
if (debugEnabled)
log.debug(name + " is in state: " + state);
while (state != EndpointState.STARTED && (System.currentTimeMillis() - startTime < 60000))