Show TOC

Creating and Configuring JMS Virtual ProvidersLocate this document in the navigation structure

Use

You can create and configure JMS virtual providers either via deployment, or administratively via the SAP NetWeaver Administrator .

More information about the configurable properties, the JMS clustering and failover aspects: JMS Clustering and Failover

Procedure

Creating JMS Virtual Providers

JMS virtual providers can be created either via deployment or administratively, using the SAP NetWeaver Administrator.

Via Deployment

You can create a new virtual provider using the jms-resources.xml deployment descriptor. Under <sap-local-factory-type> and <sap-local-destination-type> there is a <virtual-provider> tag. If you do not specify a name in this tag, you do not create any virtual providers and you use the default one.

               <connection-factory>
        <name>jms/TopicConnectionFactory</name>
        <sap-local-factory-type>
                <type>javax.jms.TopicConnectionFactory</type>
                <virtual-provider>testVP</virtual-provider>
        </sap-local-factory-type>
</connection-factory>
<destination>
        <name>jms/MyTopic</name>
        <type>javax.jms.Topic</type>
        <sap-local-destination-type>
                <virtual-provider>testVP</virtual-provider>
        </sap-local-destination-type>
</destination>

            

Via SAP NetWeaver Administrator

To create a new virtual provider you have to:

  1. Open the SAP NetWeaver Administrator and choose Start of the navigation path Configuration Next navigation step Infrastructure Next navigation step JMS Server Configuration. End of the navigation path

  2. From the Show dropdown menu, choose JMS Virtual Providers .

  3. To create a new virtual provider, choose the Create pushbutton.

  4. Enter the name of the new virtual provider in the Name field and choose Save .

You have created a new virtual provider.

To delete a virtual provider, select it and choose the Remove pushbutton.

Caution

You have to be careful when deleting a virtual provider because if its resources are still used by some applications, they stop working.

Configuring the Distribution of Global JMS Virtual Providers

Via Config Tool

To configure the distribution option for the JMS virtual providers you have to:

  1. Start the Config Tool by double-clicking the configtool script file in <SAP_install_dir>/<system_name>/<instance_name>/j2ee/configtool/ directory and expand the nodes Start of the navigation path cluster-data Next navigation step template - <template name> Next navigation step services Next navigation step jms_provider End of the navigation path.

  2. If you want to allow hosting of several virtual providers on a single cluster node, set the value of hostMultipleVPs key to true . If the value is set to false , each cluster node hosts zero or one virtual provider. In the second case, if the number of virtual providers is larger than the number nodes in the cluster, some of the virtual providers are not hosted (started) and thus some of the applications may stop working.

Via Deployment

The clustering behavior of JMS virtual providers is determined by their runningMode property of the jms-resources.xml deployment descriptor. To configure the JMS virtual provider to start on all nodes, set the runningMode property to local in the <virtual-provider-properties> tag. If you do not specify the runningMode property, the default value is global .

The DataSource the virtual provider uses can be configured by the dataSourceName property. If you do not specify any DataSource name, the application uses the system DataSource.

               <virtual-provider-properties>
        <name>testRunningMode</name> 
        <property>
                <description>runningMode</description>
                <config-property-name>runningMode</config-property-name>
                <config-property-value>local</config-property-value>
        </property>
        <property>
                <description>dataSourceName</description>
                <config-property-name>dataSourceName</config-property-name>
                <config-property-value>jdbc/ClientDataSource</config-property-value>
        </property>
</virtual-provider-properties>