public void addMessage(String user, String message) throws ChatRoomInvalidStateException {
        try {
            ChatRoomMessage msg = dbConnector.addMessage(user, chatRoomName, message);
            ChatRoomMessage stub = (ChatRoomMessage) UnicastRemoteObject.exportObject(msg, 0);
            
            for(ChatRoomMessageListener l : listners) {
                try {
                    l.processNewMessage(stub);
                } catch(RemoteException e) {
                    e.printStackTrace();
                }
            }
            
        } catch (SQLException | RemoteException e) {
            throw new ChatRoomInvalidStateException();
        }             
    }