[jboss-jira] [JBoss JIRA] Commented: (AS7-1656) Binder services should not be ON_DEMAND

Paul Ferraro (JIRA) jira-events at lists.jboss.org
Fri Aug 26 16:51:17 EDT 2011


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

Paul Ferraro commented on AS7-1656:
-----------------------------------

James,
You can demand the jndi binding by adding a <resource-ref> to your JEE deployment descriptor.
e.g.
<resource-ref>
  <res-ref-name>greeting-cache-manager</res-ref-name>
  <lookup-name>java:jboss/infinispan/greeting-cache-manager</lookup-name>
</resource-ref>

And then inject the cache manager into your bean via @Resource(lookup="java:comp/env/greeting-cache-manager") or even just @Resource(mappedName="greeting-cache-manager").

> Binder services should not be ON_DEMAND
> ---------------------------------------
>
>                 Key: AS7-1656
>                 URL: https://issues.jboss.org/browse/AS7-1656
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 7.0.1.Final
>            Reporter: Stuart Douglas
>            Assignee: Paul Ferraro
>             Fix For: 7.0.2.Final
>
>
> IF a binder service is registered as ON_DEMAND then the item will not be available for lookup in JNDI until something as expressed a dependency on it. This means that it will work for resource injection, however will fail for manual JNDI lookups. 
> If lazy startup is required the binder service should use a ManagedReferenceFactory that starts the lazy service and blocks until the lazy service is available. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list