[ 
https://issues.apache.org/jira/browse/OPENEJB-354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Blevins reopened OPENEJB-354:
-----------------------------------


Reopening as it would be nice to have a simple example just for this.  
Something like:

{code}
@Resource(name="java:global/foo", type=DataSource.class)
public class MyBean {

    public void doSomething() {
    
        DataSource ds = (DataSource) new 
InitialContext().lookup("java:global/foo")

    }

}
{code}
                
> Example: @Resource for JNDI Lookups
> -----------------------------------
>
>                 Key: OPENEJB-354
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-354
>             Project: OpenEJB
>          Issue Type: Sub-task
>          Components: documentation, ejb3 simplified
>    Affects Versions: 3.1.x
>            Reporter: David Blevins
>             Fix For: 3.1.x
>
>
> Shows how to use the @Resource annotation on a bean class to configure JNDI 
> env-entries that can be looked up.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to