Specifying User Name and Password Credentials

You can apply any of the following methods to specify the user name and password credentials:

Oracle recommends using the host application server's Java Connector Architecture container. Most vendors provide Java Connector Architecture containers that provide methods to dynamically set credentials using secure methods. Other methods typically store credentials in clear text. If you chose a method that does not encrypt credentials, use Oracle Wallet to secure them.

See Securing Credentials with Oracle Wallet for more information.

Specifying a User Name and Password for Inbound Connections Using the Java Connector Architecture Container

Your application can provide the user name and password credentials in the activation-spec of an inbound resource adapter. The activation spec is then passed into the JMS resource adapter by the foreign application server's Java Connector Architecture container.

See Administering the JMS Resource Adapter on Oracle GlassFish Server for detailed information about how to specify a user name and password using the Java Connector Architecture container of your foreign application server.

Specifying a User Name and Password for Inbound Connections Using JNDI

You can configure the jndiEnv property in the resourceProviderDefinitions to include the user name and password credentials as follows:

<config-property-name>resourceProviderDefinitions</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>
        (weblogicAdmin: jndiEnv=(java.naming.factory.initial=weblogic.jms.WrappedInitialContextFactory,
                                 java.naming.provider.url='t3://host:port',
                                 java.naming.security.principal=xxxx,
                                 java.naming.security.credentials=yyyy))
     </config-property-value>
     </config-property>

See Example JNDI Configurations for Setting Credentials for more information.

Specifying a User Name and Password for Inbound Connections Using a Connection Factory

The JMS resource adapter simplifies security interoperability with foreign application servers by providing connection based security model using a new JNDI initial context factory, weblogic.jms.WrappedInitialContextFactory. The resulting subject is determined using the following rules:

  • A subject is associated with each connection created using the connection user name and password.

  • If the connection is created without user name and password, then the JNDI user name and password are used.

  • All subsequent JMS operations use the resultant subject from the connection creation call regardless of what is on the thread.

Specifying a User Name and Password for Outbound Connections

For outbound connections, you can use createConnection(java.lang.String, java.lang.String) API.

The JMS resource adapter does not provide configuration attributes to implement the user name and password for outbound connections.

See Secure Communication for information about securing outbound communication.

Some foreign application servers may provide secure credentials between domains. If so, consult your vendor documentation for more information.