Pattern for versioning

Hi,

I want to run different versions of EJBs on the same application server instance. My idea is to have a component which provides access to these EJBs depending on the desired version. The idea behind this is to test different versions of EJBs (e.g. unit testing and integration testing on the same machine).

Does anybody know a pattern / strategy for this? A brief description (or an equivalent link) would be helpful.

Thanks in advance,

hedtfeld.

[488 byte] By [hedtfeld] at [2007-9-26 13:35:19]
# 1
You would want to use a wrapper which could be another EJB. You could invoke methods on the wrapper passing the version of your other EJBs that you want. The wrapper method would access the correct version of the other bean.
swatdba at 2007-7-2 14:12:16 > top of Java-index,Other Topics,Patterns & OO Design...
# 2
You can try the hot versioning functionalities provided by the application server vendors! But not sure whether both the versions can work togethersiva
siva_sub123 at 2007-7-2 14:12:16 > top of Java-index,Other Topics,Patterns & OO Design...
# 3
> I want to run different versions of EJBs on the same> application server instance. Soft Code your JNDI names (a good idea anyway) and simple include a version id at the end of each Beans Name.
MartinS. at 2007-7-2 14:12:16 > top of Java-index,Other Topics,Patterns & OO Design...
# 4
> Soft Code your JNDI names (a good idea anyway) and> simple include a version id at the end of each Beans> Name.That's what I thought of, though I'm not sure if I like it. But thanks anyway!
hedtfeld at 2007-7-2 14:12:16 > top of Java-index,Other Topics,Patterns & OO Design...
# 5

<i>That's what I thought of, though I'm not sure if I like it. But thanks anyway!</i>

If we don't know your requirements / constraints how can offer help ? So why don't you like this ?

Another possible solution which is pretty good if your newer versions need to support older functionality is the Chain of Responsibility Pattern. In this each event handler, check to see if it is responsible, if not then it passes it to it's predicessor. This would be heavy weight for just testing, but is ideal if your live application needs to support historical [versions] of data.

MartinS. at 2007-7-2 14:12:16 > top of Java-index,Other Topics,Patterns & OO Design...