Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » J2EE Pattern »

Re: EJB Versioning

Eugene Ostroukhov

2003-11-05

Replies:

There's no support for EJB versioning in the specs (though some containers might provide facilities)
 
If you need to behave differently - use Strategy pattern :) Just pick correct strategy based on an EJB version.
 
Best regards,
Eugene
----- Original Message -----
From: Koscho, William
To: J2EEPATTERNS-INTEREST@JAVA.SUN.COM
Sent: Wednesday, November 05, 2003 2:58 PM
Subject: [J2EEPAT-INT] EJB Versioning

I would like to be able to deploy multiple versions of an EJB, and have multiple clients select the version that want to use.

 

For example, I would like to deploy version 1.0 of Bean1 and version 1.1 of Bean1?  Then have Client1 choose version 1.0 and Client2 choose version 1.1.

Can the container handle multiple versions of the same bean?

 

Assuming it cannot and we can only deploy a single version of the bean (i.e. version 1.1 of Bean1), then I can have an env entry in the deployment description with a "VersionNumber" variable.  Then the client can check that environment variable once it receives the interface to the bean. 

 

Once it has the version number, I am looking for a pattern to apply that will allow the client to behave differently based on that version.  For example, when the client sees version 1.0 it displays the default screen, but when it sees version 1.1, it will call an additional method on the EJB and display an extra combo-box on the UI.

 

Any help is greatly appreciated.

 

Thanks,

 

Bill Koscho

Technical Specialist, Customer Service Development

Medco Health Solutions

Email: william_koscho@medcohealth.com

Pager: 1-800-759-8888 PIN: 1781595

Phone: 201-269-2219

 


This e-mail message and any attachments contain confidential information from Medco Health Solutions, Inc. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

==================================================================== Companion Site: http://www.corej2eepatterns.com J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@java.sun.com
==================================================================== Companion Site: http://www.corej2eepatterns.com J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@java.sun.com
©2008 junlu.com - Jax Systems, LLC, U.S.A.