I discovered that using:
@Autowired
private NewGradeHandler newGradeHandler;
I was creating a new instance without the previous connections. So, if this happens to you. in the method you want to consume your WebSocket do:
declare:
@Autowired
private ApplicationContext applicationContext; // Inyecta el ApplicationContext
Use this instance, make sure the String in the getBean method has the sam name as your class:
NewGradeHandler newGradeHandler = applicationContext.getBean("NewGradeHandler",NewGradeHandler.class);