[jboss-jira] [JBoss JIRA] (AS7-6215) Ability to declare a dependency on a service name

Stuart Douglas (JIRA) jira-events at lists.jboss.org
Tue Jan 22 20:09:21 EST 2013


    [ https://issues.jboss.org/browse/AS7-6215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749605#comment-12749605 ] 

Stuart Douglas commented on AS7-6215:
-------------------------------------

I have submitted a pull request that takes a different approach to this. It allows you to make an EJB has having 'Implicit depends on' (not really sure about the name) in the jboss-ejb3.xml deployment descriptor.

This means that the EJB's view services depend on the EJB start service (instead of the other way round), and so any component that injects this EJB via @EJB can be sure that it will hang around for the lifetime of the injecting component. 

I think this should be enough to solve all the use cases here, as resources other than EJB's can already have dependencies created just using standard resource injection. 
                
> Ability to declare a dependency on a service name
> -------------------------------------------------
>
>                 Key: AS7-6215
>                 URL: https://issues.jboss.org/browse/AS7-6215
>             Project: Application Server 7
>          Issue Type: Feature Request
>    Affects Versions: 7.1.3.Final (EAP)
>            Reporter: Brad Maxwell
>            Assignee: Stuart Douglas
>             Fix For: Open To Community
>
>
> We have several use cases where we need dependencies between different deployments.
> Such as
> Singleton in ear1 which injects an ejb from ear2 using @EJB.  At shutdown we need the Singleton to call a method to clean up on the ejb, however the ejb is sometimes shutdown before the Singleton.  Using @DependsOn would allow the Singleton to depend on the EJB if the EJB is in the same ear as the Singleton, however it is not.
> There are other use cases where resources are injected and we need the resources to still be deployed at shutdown so we can clean up the resources before they are undeployed.
> Having a service name to depend on would be useful and if the name was configurable such that it does not based on the exact name of the deployment, it would be useful as using maven changes the deployment names when we rebuild and we do not want to have to change the code each time we rebuild.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list