H
hippos.are.evil
Howdy,
I have a situation where multiple web applications are going to access
a set of Entity Beans whose underlying tables will have new columns
added in the future. I know it'd be easiest to just recompile and
redeploy all affected web applications when the tables change, but this
isn't always possible in my environment (due to reasons out of my
control.)
Is there a way to version the interface of Entity Beans so that an
older client can use methods X and Y of the bean and a new client can
use methods X, Y and newly added Z? I've tried this and the old client
gets a ClassCastException as a new method was added. I thought about
using reflection, but that's a pain and not too elegant.
I noticed that with Session beans it is possible to add new methods to
the bean and not break existing clients. If anyone knows how to
accomplish this with Entity Beans, it'd be much appreciated.
thanks!
hippos
I have a situation where multiple web applications are going to access
a set of Entity Beans whose underlying tables will have new columns
added in the future. I know it'd be easiest to just recompile and
redeploy all affected web applications when the tables change, but this
isn't always possible in my environment (due to reasons out of my
control.)
Is there a way to version the interface of Entity Beans so that an
older client can use methods X and Y of the bean and a new client can
use methods X, Y and newly added Z? I've tried this and the old client
gets a ClassCastException as a new method was added. I thought about
using reflection, but that's a pain and not too elegant.
I noticed that with Session beans it is possible to add new methods to
the bean and not break existing clients. If anyone knows how to
accomplish this with Entity Beans, it'd be much appreciated.
thanks!
hippos