You can make your bean passivation capable by implementing the Serializable interface:
public class DemoBean implements Serializable { ... }
Note that there are more requirements for being passivation capable. Refer to the Weld documentation for more information.