When the service type is queue, the Tuxedo Control uses Tuxedo queuing services via tpenqueue and tpdequeue. As in other interaction styles, the data from the application to the Tuxedo queue is mapped based upon the method signature and the buffer type. The determination of whether a method is an enqueue, a dequeue, or both is determined by the method signature.
Warning: If an enqueue and dequeue is performed in the same queue with transaction attribute set to Supports, you will not see the enqueue message until the transaction commits. The dequeue will dequeue another message if one is in the queue or hang until the message is in the queue. If the dequeue hangs, you should turn off transaction support so that the dequeue can proceed.
The name of the queue space used to enqueue messages is determined by the sendQueueSpace attribute of the @TuxedoControl.tuxedo annotation. The sendQueueName attribute determines the queue name. The reply-queue-name determines the name of the reply queue to associate with the message. The failureQueueName gives the name of the failure queue to associate with the message.
Note: For information about using tmqforward, refer to Services Using tmqforward.
For dequeuing messages, the receive-queue-space, if set, determines the queue space; otherwise, the sendQueueSpace is used. This simply allows for you to only specify one queue space and it is used for both the enqueue and dequeue. The receive-queue-name attribute determines the queue name.
To specify using a queue service type you will create a Tuxedo Control file and then add a method to the control file.
Select the type of buffer from the menu. This specifies the type of buffer that the Tuxedo Control supports in the Tuxedo service.
Note: For input XML using data dependent routing, remove all comments generated by the Workshop test browser in the XML buffer. Depending on the location of the comments in the buffer, Tuxedo may have problems parsing the buffer. |
|
|
|
If you have selected queue in the Service type field, the Send Queue Space field becomes active. Type the name of the queue space in which the sending queue name is located. This name is the WTC imported service name. This name should match the service name that is mapped in Create a WebLogic Tuxedo Connector (WTC) Service. If you are not sure of the name of the queue space, you can click Browse and a list of imported WTC service names display. If the service is listed in the WTC Imported Services dialog, you can select it and click OK. If the service you want is not listed, then the service has not been imported into WebLogic Server. To import a service from the WTC Imported Services dialog, click Import and the Services Exported by Tuxedo Application dialog displays. For information about importing WTC services, see Import New Tuxedo Services. |
|
If you have selected queue in the Service type field, the Send Queue Name field becomes active. Type the name of the queue to which messages should be sent. |
|
If you have selected a queue in the Service type field, the Receive Queue Space field becomes active. Type the name of the queue space in which the receiving queue name is located. If you are not sure of the name of the queue space, you can click Browse and a list of imported WTC service names display. If the service is listed in the WTC Imported Services dialog, you can select it and click OK. If the service you want is not listed, then the service has not been imported into WebLogic Server. To import a service from the WTC Imported Services dialog, click Import and the Workstation Address dialog displays. For information about importing WTC services, see Import New Tuxedo Services. |
|
If you have selected a queue in the Service Type field, the Receive Queue Name field becomes active. Type the name of the queue to receive queued messages. |
|
Type the name of the field table for the Tuxedo service when using fml or fml32 buffers. You should specify the field table when using fml or fml32 buffers that are sent or act as reply buffers from the called service. The name of the field table should match the classes generated with the mkfldclass or mkfldclass32 utilities. For buffer types fml and fml32, WTC needs the names and types of the fields the buffer can contain. These are described in field table classes created with mkfldclass and mkfldclass32 utilities. For more information about mkfldclass and mkfldclass32 utilities, see WebLogic Server Javadoc. |
|
Type the names of the view classes that correspond to the view buffer types that can be received from the Tuxedo service. This field is only required when the Tuxedo service returns a view or view32 buffers. These classes are independent from the Send View Class attribute which is used to specify the view or view32 class that represents the view buffer the Tuxedo service expects as an input. Note: The value of this attribute may be a list of classes so that a single Tuxedo service can respond with different VIEW buffers. For information about viewj and viewj32 utilities, see WebLogic Server Javadoc. |
|
If you have selected view or view32 in the Buffer type field, the Send View Class field becomes active. This attribute provides the name of the class that represents the view/view32 buffer the service is expecting as an input buffer. This view class is used to create the TypedView buffer. |
When using the Insert Wizard to create a new Control, a single method is defined that corresponds to the Service Type and Service Name specified in the Insert Wizard. The signature and possibly the name of this method in the control file needs to be edited to match the name and buffer contents expected for the Tuxedo service being called. In addition, any other services that this control calls must have methods defined for them in this interface.
For queued services, the method name created by the wizard is enqueue, dequeue, or enqueueDequeue. You can change the wizard-created name.
If the queue is being serviced by tmqforward and the service that tmqforward calls generates a reply, a reply-queue-name must be specified for tmqforward from the Property view in the @TuxedoControl.tuxedo annotation. If reply-queue-name is not specified in this situation, the reply is dropped.