public class SolJmsUtility extends Object
Modifier and Type | Method and Description |
---|---|
static com.solacesystems.jms.SolConnectionFactory |
createConnectionFactory()
Creates a Solace proprietary implementation of a ConnectionFactory.
|
static com.solacesystems.jms.SolConnectionFactory |
createConnectionFactory(Hashtable<?,?> environment)
Creates a Solace proprietary implementation of a ConnectionFactory given an environment.
|
static com.solacesystems.jms.SolConnectionFactory |
createConnectionFactory(String host,
String username,
String password,
String vpn,
Hashtable<?,?> environment)
Creates a Solace proprietary implementation of a ConnectionFactory given connection
parameters and an environment.
|
static SolQueue |
createQueue(String queueName)
Creates a Solace proprietary implementation of a queue given a queue name.
|
static SolTopic |
createTopic(String topicName)
Creates a Solace proprietary implementation of a topic given a topic name.
|
static com.solacesystems.jms.SolXAConnectionFactory |
createXAConnectionFactory()
Creates a Solace proprietary implementation of an XAConnectionFactory.
|
static com.solacesystems.jms.SolXAConnectionFactory |
createXAConnectionFactory(Hashtable<?,?> environment)
Creates a Solace proprietary implementation of an XAConnectionFactory given an environment.
|
static com.solacesystems.jms.SolXAConnectionFactory |
createXAConnectionFactory(String host,
String username,
String password,
String vpn,
Hashtable<?,?> environment)
Creates a Solace proprietary implementation of an XAConnectionFactory given connection
parameters and an environment.
|
static String |
dumpMessage(javax.jms.Message msg)
Produces a human-readable dump of the message properties and its contents
(can be quite large).
|
static javax.jms.Message |
fromByteArray(byte[] data)
Converts a byte array representing a serialized JMS Message into
a JMS Message.
|
static long |
getMessageSize(javax.jms.Message msg)
Gets the encoded size of the message payload in bytes.
|
static SolReferenceableDelegate |
getReferenceableDelegate()
Gets the Referenceable delegate for ConnectionFactorys, Topics, and Queues.
|
static void |
setReferenceableDelegate(SolReferenceableDelegate referenceableDelegate)
Sets the Referenceable delegate for ConnectionFactorys, Topics, and Queues.
|
static byte[] |
toByteArray(javax.jms.Message msg)
Serializes a JMS Message into a byte array.
|
public static String dumpMessage(javax.jms.Message msg)
The textual dump includes JMS message fields and properties, followed by Solace-message-specific attributes as reported by the underlying messaging provider.
msg
- A Solace JMS Message instance.String
representation of the message, to be used
for debugging.public static long getMessageSize(javax.jms.Message msg) throws javax.jms.JMSException
javax.jms.IllegalStateException
for a message created using
the local javax.jms.Session
.msg
- The message to get the payload size of.javax.jms.JMSException
- on errorpublic static byte[] toByteArray(javax.jms.Message msg) throws javax.jms.JMSException
msg
- The message to be serialized.javax.jms.JMSException
- If conversion fails.public static javax.jms.Message fromByteArray(byte[] data) throws javax.jms.JMSException
reset
puts their bodies in read-only mode.data
- The serialized JMS Message.javax.jms.JMSException
- If conversion fails.public static com.solacesystems.jms.SolConnectionFactory createConnectionFactory() throws Exception
Exception
- on errorpublic static com.solacesystems.jms.SolConnectionFactory createConnectionFactory(Hashtable<?,?> environment) throws Exception
environment
- Environment tableException
- on errorpublic static com.solacesystems.jms.SolConnectionFactory createConnectionFactory(String host, String username, String password, String vpn, Hashtable<?,?> environment) throws Exception
host
- Appliance host to be used for any connections created from this factory.username
- Appliance username to be used for any connections created from this factory.password
- Appliance password to be used for any connections created from this factory.vpn
- Appliance vpn to be used for any connections created from this factory.environment
- Environment tableException
- on errorpublic static com.solacesystems.jms.SolXAConnectionFactory createXAConnectionFactory() throws Exception
Exception
- on errorpublic static com.solacesystems.jms.SolXAConnectionFactory createXAConnectionFactory(Hashtable<?,?> environment) throws Exception
environment
- Environment tableException
- on errorpublic static com.solacesystems.jms.SolXAConnectionFactory createXAConnectionFactory(String host, String username, String password, String vpn, Hashtable<?,?> environment) throws Exception
host
- Appliance host to be used for any connections created from this factory.username
- Appliance username to be used for any connections created from this factory.password
- Appliance password to be used for any connections created from this factory.vpn
- Appliance vpn to be used for any connections created from this factory.environment
- Environment tableException
- on errorpublic static SolTopic createTopic(String topicName)
topicName
- parameterpublic static SolQueue createQueue(String queueName)
queueName
- parameterpublic static void setReferenceableDelegate(SolReferenceableDelegate referenceableDelegate)
Referenceable.getReference()
is called on a ConnectionFactory, Topic, or Queue the delegate will be called
to return a Reference
.referenceableDelegate
- The referenceable delegatepublic static SolReferenceableDelegate getReferenceableDelegate()
Referenceable.getReference()
is called on a ConnectionFactory, Topic, or Queue the delegate will be called
to return a Reference
.Copyright 2004-2025 Solace Corporation. All rights reserved.