A
Andrea Desole
I'm playing around with container managed persistence, and I noticed
that there is no standard that defines the mapping between beans and
databases. In fact, this is what the EJB specification says:
"The Deployer, using the Container Provider s tools, determines how the
persistent fields and relationships defined by the abstract persistence
schema are mapped to a database or other persistent store, and generates
the necessary additional classes and interfaces that enable the
container to manage the persistent fields and relationships of the
entity bean instances at runtime."
If it's true then I will have problems if I have an application that
supports multiple EJB containers, which is my case. So, my question is:
isn't it better to write just some normal SQL once and use bean managed
persistence, instead of writing and maintaining n different files (one
for each container) for the same mapping? How complex should my SQL be
to make CMP really valuable in this case?
Thanks
Andrea
that there is no standard that defines the mapping between beans and
databases. In fact, this is what the EJB specification says:
"The Deployer, using the Container Provider s tools, determines how the
persistent fields and relationships defined by the abstract persistence
schema are mapped to a database or other persistent store, and generates
the necessary additional classes and interfaces that enable the
container to manage the persistent fields and relationships of the
entity bean instances at runtime."
If it's true then I will have problems if I have an application that
supports multiple EJB containers, which is my case. So, my question is:
isn't it better to write just some normal SQL once and use bean managed
persistence, instead of writing and maintaining n different files (one
for each container) for the same mapping? How complex should my SQL be
to make CMP really valuable in this case?
Thanks
Andrea