Kristian Waagan wrote:
Hello,
I was working on a test for serializing and deserializing data sources,
when I found out that EmbeddedSimpleDataSource can't be serialized.
Should it be possible to serialize EmbeddedSimpleDataSource?
When I added EmbeddedSimpleDataSource I intentionally did not make it
serializable, not sure where the @serial tags came from. I saw creating
data sources from a stored representation as more a J2EE capability
(e.g. appservers). I thought that it was unlikely that J2ME applications
would need to have stored data sources, more likely that they would just
hard code the data source for that specific application.
Note that the regular data sources have actually three ways of being
stored, serializable, referencable or as a class name and a set of java
bean properties. The latter approach will also work for
EmbeddedSimpleDataSource.
So, I would say only make EmbeddedSimpleDataSource if there's some
demand for it, I wouldn't do it just to make it the same as the others.
Dan.