user manual
Chapter 23: Using JMS 249
Enabling the JMS services security
// execute JDBC work
java.sql.Connection dbConn = datasource.getConnection();
// execute SQL
// call some other EJBs in the same transaction
// grab a reference to an EJB Remote interface
ejbRemote.doWork();
// send a JMS message to a queue
jmsSender.send(msg);
}
All the operations execute as a single unit of recoverable work (transaction)
and leverages resource connection pooling (JDBC pool, JMS pool, and so
forth).
Enabling the JMS services security
Refer to Chapter 24, “JMS provider pluggability” for vendor-specific
information on JMS services such as security.
Advanced Concepts for Defining JMS Connection Factories
The predeployed module default-resources.dar contains some default
Connection Factories, Topic and Queue, defined for the bundled JMS service.
You can edit these existing definitions to suit your environment or create a
new one. Again, like JDBC datasources, JMS connection factories are classes
that wrap the connection factory classes provided by JMS vendors. If you want
to use a JMS vendor not bundled or certified to work with BES, you need to
deploy that vendor's connection factory classes to your Partitions before you
can use them.
Like JDBC Datasources, JMS Connection Factories are defined in the jndi-
definitions.xml descriptor. The following DTD example shows the relevant
element, in bold:
<!ELEMENT jndi-definitions (visitransact-datasource*, driver-datasource*,
jndi-object*)>
<!ELEMENT visitransact-datasource (jndi-name, driver-datasource-jndiname,
property*)>
<!ELEMENT driver-datasource (jndi-name, datasource-class-name, log-writer?,
property* )>
<!ELEMENT jndi-object (jndi-name, class-name, property* )>
<!ELEMENT property (prop-name, prop-type, prop-value)>
<!ELEMENT prop-name (#PCDATA)>
<!ELEMENT prop-type (#PCDATA)>
<!ELEMENT prop-value (#PCDATA)>
<!ELEMENT jndi-name (#PCDATA)>










