Versioning Entity Beans

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top