@RequestMapping( ApplicationConstants.JOIN_CHAT)
	    public  Object joinChatRoom(@RequestParam("chatRoomId") String chatRoomId,
	    		@RequestParam("userId") String userId) {
	    	UserChatRoom chatRoom=new UserChatRoom();
	    	Map<Object,String> errorMap=new HashMap<Object, String>(); 
	    	System.out.println("name11111"+chatRoomId);
	    	if(chatRoomId==null || "".equals(chatRoomId)){
	    		errorMap.put(1, "Please enter chatRoomId");
	    	}
	    	if(userId==null || "".equals(userId)){
	    		errorMap.put(2, "Please enter userId");
	    	}
	    	
	    	if (errorMap.size()>0){
	    		return errorMap;
	    	}else{
	    		
	    		User userFromDb=userDao.getUser(Integer.parseInt(userId));
	    		ChatRoom chatRoomFromDb=chatRoomDao.getChatRoom(Integer.parseInt(chatRoomId));
	    		if(userFromDb==null){
	    			errorMap.put(3, "User does not exist");
	    			return errorMap;
	    		}
	    		else if(chatRoomFromDb==null){
	    		errorMap.put(4, "Chat Room does not exist");
	    			return errorMap;
	    			
	    		}else{
		    		UserChatRoomCompoundKey userChatRoom=new UserChatRoomCompoundKey();
		    		userChatRoom.setUserId(Integer.parseInt(userId));
		    		userChatRoom.setChatRoomId(Integer.parseInt(chatRoomId));
		    		chatRoom.setUserChatRoomCk(userChatRoom);
		    		chatRoom.setCreatedDate(new Date().toString());
			    	System.out.println("##########################");
			    	chatRoomDao.joinChatRoom(chatRoom);
			        return chatRoom;
	    		}
	    	}
	    }