users@glassfish.java.net
Re: JNDI lookup, dependency injection, datasource
This message
: [
Message body
] [ More options (
top
,
bottom
) ]
Related messages
: [
Next message
] [
Previous message
] [
In reply to
] [
Next in thread
] [
Replies
]
Contemporary messages sorted
: [
by date
] [
by thread
] [
by subject
] [
by author
] [
by messages with attachments
]
From
: <
glassfish_at_javadesktop.org
>
Date
: Mon, 14 Jun 2010 23:29:13 PDT
You can refer the tech tip :
http://blogs.sun.com/enterprisetechtips/entry/datasource_resource_definition_in_java
and the sample
http://blogs.sun.com/enterprisetechtips/resource/DSD.zip
has web.xml, ejb-jar.xml with datasource-definition.
If you are injecting the resource, it should be on a Java EE component eg: Servlet/EJB/AppClient
Snippet from the tech-tip :
"Note that the sample application does a lookup to get access to a resource. However, it is also possible to inject the datasource as follows :
@Stateless
public class HelloEJB implements Hello {
@Resource(lookup = "java:app/env/HelloEJB_DataSource")
private DataSource app;
...
...
}
"
[Message sent by forum member 'jr158900']
http://forums.java.net/jive/thread.jspa?messageID=474280
This message
: [
Message body
]
Next message
:
Sigal Shaharabani: "RE: JNDI lookup, dependency injection, datasource"
Previous message
:
glassfish_at_javadesktop.org: "Re: Glassfish wont stop properly"
In reply to
:
glassfish_at_javadesktop.org: "JNDI lookup, dependency injection, datasource"
Next in thread
:
Sigal Shaharabani: "RE: JNDI lookup, dependency injection, datasource"
Reply
:
Sigal Shaharabani: "RE: JNDI lookup, dependency injection, datasource"
Contemporary messages sorted
: [
by date
] [
by thread
] [
by subject
] [
by author
] [
by messages with attachments
]