JID userJID = message.getFromJid();
Entity userEntity = MainPageServlet.getUserEntity(userJID);
userEntity.setProperty("last_chat_message", message.getBody());
datastore.put(userEntity);
Message reply = new MessageBuilder()
.withRecipientJids(userJID)
.withBody("I got your message! It had " +
message.getBody().length() + " characters.")
.build();
// (Ignore the send response.)