`if (app != null) Entities.dstroyAll(app)` should be sufficient. That will automatically stop cassandra because it is a child.