InfoCenter Home >
6: Administer applications >
6.6: Tools and resources quick reference >
6.6.43: Administering references >
6.6.43.0: Properties related to references >
6.6.43.0.2 Assembly properties for resource references

6.6.43.0.2 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.

Authentication (Required, String)
Specifies whether the enterprise bean (or servlet) code signs on programmatically to the resource manager, or whether the container signs on to the resource manager on behalf of the bean (or servlet). 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 (for enterprise beans) and Servlet or Container (for Web applications). Note for J2C (Connector Architecture for WebSphere Application Server) 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/Connector Architecture 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.
Go to previous article: 6.6.43.0.1: Assembly properties for EJB references Go to next article: 6.6.43.0.3: Assembly properties for security role references

 

 
Go to previous article: 6.6.43.0.1: Assembly properties for EJB references Go to next article: 6.6.43.0.3: Assembly properties for security role references