Skip navigation.
Downloads | Product Documentation | Support

# JmsProducer.h File Reference

Describes a JmsProducer handle. More...

`#include <JmsCommon.h>`
`#include <JmsDestination.h>`
`#include <JmsMessage.h>`
`#include <JmsTypes.h>`

Go to the source code of this file.

## Data Structures
struct | JmsProducerOptions
## Defines
#define | JMS_PO_NOMESSAGEID (1 << 0)
#define | JMS_PO_NOTIMESTAMP (1 << 1)
#define | JMS_PO_DESTINATION (1 << 2)
#define | JMS_PO_DELIVERY_MODE (1 << 3)
#define | JMS_PO_PRIORITY (1 << 4)
#define | JMS_PO_TIMETOLIVE (1 << 5)
## Typedefs
typedef JmsProducer | JmsProducer
## Functions
int JMSENTRY | JmsProducerClose (JmsProducer *producer, JMS64I flags)
int JMSENTRY | JmsProducerSend (JmsProducer *producer, JmsProducerOptions *options, JmsMessage *message, JMS64I flags)

## Detailed Description

Describes a JmsProducer handle.

This file describes the functions that can be performed on a JmsProducer handle A JmsProducer handle corresponds to javax.jms.MessageProducer

Author:
  Copyright (c) 2002, BEA Systems, Inc.

## Define Documentation

#define JMS_PO_DELIVERY_MODE (1 << 3)

| Indicates that the deliveryMode field of the JmsProducerOptions structure has been set

#define JMS_PO_DESTINATION (1 << 2)

| Indicates that the destination field of the JmsProducerOptions structure has been set

#define JMS_PO_NOMESSAGEID (1 << 0)

| Indicates that no message id need be generated for this message

#define JMS_PO_NOTIMESTAMP (1 << 1)

| Indicates that no timestamp need be generated for this message

#define JMS_PO_PRIORITY (1 << 4)

| Indicates that the priority field of the JmsProducerOptions structure has been set

#define JMS_PO_TIMETOLIVE (1 << 5)

| Indicates that the timeToLive field of the JmsProducerOptions structure has been set

## Typedef Documentation

typedef struct JmsProducer JmsProducer

| A producer handle that represents the class javax.jms.MessageProducer

## Function Documentation

int JMSENTRY JmsProducerClose | ( | JmsProducer * | producer,
|  | JMS64I | flags
| ) |

  | Closes the message producer. Since a provider may allocate some resources on behalf of a producer handle outside the Java virtual machine, clients should close them when they are not needed. Relying on garbage collection to eventually reclaim these resources may not be timely enough. After a call to this function the producer handle is no longer valid and should not be referenced Parameters:
  producer | Must be a valid producer handle. May not be NULL
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsProducerSend | ( | JmsProducer * | producer,
|  | JmsProducerOptions * | options,
|  | JmsMessage * | message,
|  | JMS64I | flags
| ) |

  | Sends a message to a destination Parameters:
  producer | Must be a valid producer handle. May not be NULL
  options | The options to use with this send. If NULL, default options are used
  message | The message to send. Must be a valid message handle, may not be NULL
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR