Assembly properties for resource references
A resource reference declares a logical name used to locate a connection
factory object. These objects define connections to external resources
such as databases and messaging systems. The container binds these
references to actual resource manager connection factories in the target
operational environment. It is recommended that resource references be
organized in the subcontexts of the application's naming environment,
using a different subcontext for each resource manager type. For
example, all JDBC DataSource references can be declared in the
java:comp/env/jdbc context. All JMS connection factories can be
declared in the java:comp/env/jms subcontext. All JavaMail
connection factories can be declared in the java:comp/env/mail
subcontext. All URL connection factories can be declared in the
java:comp/env/url subcontext. All J2C connection factories can be
declared in the java:comp/env/eis subcontext.
- Name (Required, String)
- Specifies the JNDI name used to retrieve a connection factory for a
resource manager (relative to the java:comp/env context). For
example, if the name specified is jdbc/EmployeeAppDB, the referencing code
looks up the factory under the name
java:comp/env/jdbc/EmployeeAppDB.
- Type (Required, String)
- Specifies the Java programming language type of the connection factory
object. For obtaining JDBC API connections, use
javax.sql.DataSource. For obtaining JMS connections, use
javax.jms.QueueConnectionFactory or
javax.jms.TopicConnectionFactory. For obtaining JavaMail
connections, use javax.mail.Session. For obtaining URL
connections, use java.net.URL.
- Authorization (Required, String)
- Specifies whether the enterprise bean code signs on programmatically to
the resource manager, or whether the container signs on to the resource
manager on behalf of the bean. In the latter case, the container uses
information that is supplied by the deployer. The value of this field
must be one of the following: Application or Container. Note for
J2C resources: This property is valid only for session beans.
There is no CMP support yet. WebSphere Application Server supports only
component-managed sign-on (Option C in the J2EE/CA specification) in this
release. As a result, the value for this property is ignored and
processed as Application. This means that either the session bean needs
to pass the user ID and password credentials on the getConnection call or the
J2C Connection Factory needs to have its user ID and password fields filled in
(this is done by using the WebSphere administrative console).
- Description
- Contains text describing the connection factory object.
- JNDI name
- Specifies the name of the connection factory in the global JNDI
namespace.