No, glassfish does not support the versioning of the application
components (EJB, WebApp etc) and handle their dependencies as you
described. The glassfish does implement the standard optional package
dependencies described in the JavaEE spec (see section EE8.2 Library
Support). So you can use that to declare the dependencies of application
components on other artifacts.
- Hong
daniel_k wrote:
> Sorry, what I really meant was of course:
>
> Is there anything equivalent in Glassfish?
>
> %-|
>
>
> daniel_k wrote:
>
>> Hi,
>>
>> Geronimo has a really nice way of handling dependencies at deployment
>> time. Each artifact (EJB, Web App, ...) must provide its own version
>> number at deployment time and can optionally declare dependencies on other
>> artifacts (e.g. "activemq-1.0"). If it turns out at deployment time that
>> the dependencies aren't fulfilled, the deployment is rejected.
>>
>> Is there anything equivalent in Geronimo?
>>
>> If not, I would probably use the following workaround:
>> - declare dependencies via IoC / Dependency Injection on class level
>> - declare a top-level interface, e.g. Interface_v1, and refer to it from
>> dependant objects via IoC
>> - when Interface_v1 needs an update, remove it entirely and introduce a
>> new Interface_v2 (or probably let Interface_v2 inherit from Interface_v1)
>> - redeploy everything
>> - all modules that are now still reference Interface_v1 would either fail
>> or use the new implementation transparently (depending on whether
>> inheritance is used)
>>
>> Although this solution has its own kind of elegance (because version
>> management is no longer a meta data issue and maintained directly in the
>> code), can you tell me if there anything else?
>>
>> Thanks
>>
>> Daniel
>>
>>
>>
>
>