Stateful SessionBean is not a good choice, if you want to save data to a resource manager. Passivation in Stateful SessionBean means that the server is going to remove the bean instance from the memory and serialize it somewhere. This place where beans get serialized is not a place of your choice. ejbPassivate() is actually a callback method that the developer should use to make the bean ready for passivation.
If you want to save data into database then consider Entity beans.