[JBoss JIRA] (AS7-6215) Ability to declare a dependency on a service name
by jaikiran pai (JIRA)
[ https://issues.jboss.org/browse/AS7-6215?page=com.atlassian.jira.plugin.s... ]
jaikiran pai commented on AS7-6215:
-----------------------------------
{quote}
There is another use case I've seen though it didn't make as much sense, but customer wanted an ejb to depend on a Servlet - needing the servlet init to have been called to setup something.
{quote}
Why not do it in the @PostConstruct of the bean itself?
> 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
12 years
[JBoss JIRA] (AS7-6215) Ability to declare a dependency on a service name
by Brad Maxwell (JIRA)
[ https://issues.jboss.org/browse/AS7-6215?page=com.atlassian.jira.plugin.s... ]
Brad Maxwell commented on AS7-6215:
-----------------------------------
I like the JNDI name approach, it would be easy to understand and customers would already be looking at the JNDI names when using @Resource or @EJB. It would also abstract away from using deployment names which many have had issues with as they deploy with version numbers on their deployments.
There is another use case I've seen though it didn't make as much sense, but customer wanted an ejb to depend on a Servlet - needing the servlet init to have been called to setup something. I suppose we could just require for that use case that the servlet bind something into jndi when it is done.
> 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
12 years
[JBoss JIRA] (AS7-6215) Ability to declare a dependency on a service name
by David Lloyd (JIRA)
[ https://issues.jboss.org/browse/AS7-6215?page=com.atlassian.jira.plugin.s... ]
David Lloyd commented on AS7-6215:
----------------------------------
Yes, however a JNDI name also unambiguously identifies a component. The difference between this and {{@Resource}} would be that the dependency would be directly on the component starting rather than (or in addition to) the binding. Of course we could also go the simpler route and go deployment name + component name, but then we lose the indirection that was desired in this JIRA.
> 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
12 years
[JBoss JIRA] (AS7-6215) Ability to declare a dependency on a service name
by Stuart Douglas (JIRA)
[ https://issues.jboss.org/browse/AS7-6215?page=com.atlassian.jira.plugin.s... ]
Stuart Douglas commented on AS7-6215:
-------------------------------------
JNDI services are not always tied to the lifecycle of the underlying component. For example with EJB JNDI binding the component may not have started yet when the JNDI entry is bound. This is necessary for circular references to work correctly, so two EJB's can reference each other via JNDI without causing a circular dependency error.
> 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
12 years
[JBoss JIRA] (AS7-6215) Ability to declare a dependency on a service name
by David Lloyd (JIRA)
[ https://issues.jboss.org/browse/AS7-6215?page=com.atlassian.jira.plugin.s... ]
David Lloyd commented on AS7-6215:
----------------------------------
I'd rather try and address the problems one by one first if possible. In this particular case, a JNDI-backed (or similarly globally namespaced) {{@DependsOn}} would definitely work.
> 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
12 years
[JBoss JIRA] (AS7-5995) After deploy an application with a wrong module slot dependency the module loader does not recover
by Chao Wang (JIRA)
[ https://issues.jboss.org/browse/AS7-5995?page=com.atlassian.jira.plugin.s... ]
Chao Wang resolved AS7-5995.
----------------------------
Resolution: Done
Resolved with AS7-6103
> After deploy an application with a wrong module slot dependency the module loader does not recover
> --------------------------------------------------------------------------------------------------
>
> Key: AS7-5995
> URL: https://issues.jboss.org/browse/AS7-5995
> Project: Application Server 7
> Issue Type: Bug
> Affects Versions: 7.2.0.Alpha1
> Environment: Tested with 7.2. upstream
> commit ed2bc551a55ec6a8167a8657cbb5d8abc6e07748
> Date: Thu Nov 15 10:15:22 2012 +0100
> standalone mode, no difference whether CLI or file-system scanner
> Reporter: Wolf-Dieter Fink
> Assignee: Chao Wang
> Labels: dependency, modules
> Fix For: 7.2.0.CR1
>
> Attachments: server.log, server.log
>
>
> If an application is deployed with a dependency and specify a slot in jboss-deployment-structure.xml:
> <module name="wfink.tools.performance" slot="1.0" export="true"/>
> the module loader will not correct load a new deployment after failing with 'JBAS018759' Caused by: org.jboss.modules.ModuleNotFoundException: Module wfink.tools.performance:1.1 is not found in local module loader.
> If after such message the application.ear contain a correct slot, or even no slot entry, the module loader fail with the message above. The slot number is the same as of the failed deployment.
> If the server is restarted the application deploy succeeds.
--
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
12 years
[JBoss JIRA] (AS7-5995) After deploy an application with a wrong module slot dependency the module loader does not recover
by Chao Wang (JIRA)
[ https://issues.jboss.org/browse/AS7-5995?page=com.atlassian.jira.plugin.s... ]
Chao Wang updated AS7-5995:
---------------------------
Fix Version/s: 7.2.0.CR1
> After deploy an application with a wrong module slot dependency the module loader does not recover
> --------------------------------------------------------------------------------------------------
>
> Key: AS7-5995
> URL: https://issues.jboss.org/browse/AS7-5995
> Project: Application Server 7
> Issue Type: Bug
> Affects Versions: 7.2.0.Alpha1
> Environment: Tested with 7.2. upstream
> commit ed2bc551a55ec6a8167a8657cbb5d8abc6e07748
> Date: Thu Nov 15 10:15:22 2012 +0100
> standalone mode, no difference whether CLI or file-system scanner
> Reporter: Wolf-Dieter Fink
> Assignee: Chao Wang
> Labels: dependency, modules
> Fix For: 7.2.0.CR1
>
> Attachments: server.log, server.log
>
>
> If an application is deployed with a dependency and specify a slot in jboss-deployment-structure.xml:
> <module name="wfink.tools.performance" slot="1.0" export="true"/>
> the module loader will not correct load a new deployment after failing with 'JBAS018759' Caused by: org.jboss.modules.ModuleNotFoundException: Module wfink.tools.performance:1.1 is not found in local module loader.
> If after such message the application.ear contain a correct slot, or even no slot entry, the module loader fail with the message above. The slot number is the same as of the failed deployment.
> If the server is restarted the application deploy succeeds.
--
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
12 years