Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
2.8. Intra-JVM Connections
Abstract
Overview Link kopierenLink in die Zwischenablage kopiert!
Figure 2.1. Clients Connected through the VM Transport
Embedded brokers Link kopierenLink in die Zwischenablage kopiert!
- explicitly defining the broker in the application's configuration
- explicitly creating the broker using the Java APIs
- automatically when the first client attempts to connect to it using the VM transport
waitForStart
option or the create=false
option to manage how the VM transport determines when to create a new embedded broker.
Using the VM transport Link kopierenLink in die Zwischenablage kopiert!
- simpleThe simple VM URI is used in most situations. It allows you to specify the name of the embedded broker to which the client will connect. It also allows for some basic broker configuration.Example 2.8, “Simple VM URI Syntax” shows the syntax for a simple VM URI.
Example 2.8. Simple VM URI Syntax
vm://BrokerName?TransportOptions
vm://BrokerName?TransportOptions
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - BrokerName specifies the name of the embedded broker to which the client connects.
- TransportOptions specifies the configuration for the transport. They are specified in the form of a query list. For details about the available options see the Connection Reference.ImportantThe broker configuration options specified on the VM URI are only meaningful if the client is responsible for instantiating the embedded broker. If the embedded broker is already started, the transport will ignore the broker configuration properties.
- advancedThe advanced VM URI provides you full control over how the embedded broker is configured. It uses a broker configuration URI similar to the one used by the administration tool to configure the embedded broker.Example 2.9, “Advanced VM URI Syntax” shows the syntax for an advanced VM URI.
Example 2.9. Advanced VM URI Syntax
vm://(BrokerConfigURI)?TransportOptions
vm://(BrokerConfigURI)?TransportOptions
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - BrokerConfigURI is a broker configuration URI.
- TransportOptions specifies the configuration for the transport. They are specified in the form of a query list. For details about the available options see the Connection Reference.
Examples Link kopierenLink in die Zwischenablage kopiert!
broker1
.
Example 2.10. Basic VM URI
vm://broker1
vm://broker1
Example 2.11. Simple URI with broker options
vm://broker1?broker.persistent=false
vm://broker1?broker.persistent=false
Example 2.12. Advanced VM URI
vm:(broker:(tcp://localhost:6000)?persistent=false)?marshal=false
vm:(broker:(tcp://localhost:6000)?persistent=false)?marshal=false