Browse Prior Art Database

Utilising IBM's MQSeries* Everyplace* server as a print server using a specialised version of MQeQueue allowing simple pervasive clients access to print spooling

IP.com Disclosure Number: IPCOM000015016D
Original Publication Date: 2001-Sep-16
Included in the Prior Art Database: 2003-Jun-20
Document File: 4 page(s) / 47K

Publishing Venue

IBM

Abstract

Disclosed is an example use of a messaging product such as IBM's MQSeries* Everyplace* (MQe) product.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 35% of the total text.

Page 1 of 4

  Utilising IBM's MQSeries* Everyplace* server as a print server using a specialised version of MQeQueue allowing simple pervasive clients access to print spooling

Disclosed is an example use of a messaging product such as IBM's MQSeries* Everyplace* (MQe) product.

     By creating a descendent of MQeQueue that "owns" a local printer on a server, and configuring the queue such that a putMessage equates to print this file. A background thread belonging to the queue would retrieve the messages from the queue (usually in priority order) one at a time and send the data to a real printer, deleting the message when (and only when) the message (aka file) had successfully printed.

     The Queue would still require a message store as this equates to the print spool queue and can be searched, browsed and have entries deleted using the standard MQe Queue methods. Assuming all the correct MQeQueue permission's are in place print spool administration would only allowed to authorised "administrator's".

     This allows pervasive clients to have access to simple remote printing capability for any client that can run the MQe client code.

     Following is a code example showing how to intercept print output and send as an MQe message:

/*------------------------------------------------------------------------------*/

/* (C) Copyright IBM Corp. 1999 */
/*------------------------------------------------------------------------------*/

import com.ibm.mqe.*;
import java.io.*;
/*------------------------------------------------------------------------------*/

/* Class: */
/* */
/* PrintlnMsg */
/* */
/* Extends: */
/* */
/* FilterOutputStream */
/* */
/* Function: */
/* */
/* To intercept System.out and/or System.err and send the data as an */
/* MQeMsgObject to an MQeQueue, either a local queue or a remote queue. */
/* */
/* */
/* The followinfg example shows how to intercept System.err, re-directing */
/* the data in ~4k chunks into the "OutputQ" on "ExampleQM". */
/* */
/* SOEA = new PrintlnMsg( "ExampleQM", /* Queue Manager name */
/* "OutputQ", /* Queue name */
/* false, /* leave System.out */
/* true, /* trap System.err */
/* 4096 ); /* in ~4K blocks */
/* */
/*------------------------------------------------------------------------------*/

public class PrintlnMsg extends FilterOutputStream

{
public static short version[] = { 1, 0, 0 };

protected MQeQueueManager QMgr = null;
protected MQeQueue Q = null;
protected String QueueManager = null;

1

Page 2 of 4

protected String Queue = null;
protected int maxMsgSize = -1;

private PrintStream SaveOut = null;
private PrintStream SaveErr = null;
private ByteArrayOutputStream BAOS = null;

/*----------------------------------------------------------------------------*/

/* constructor */
/* */
/* Queue - and MQeQueue object that is to receive the message */
/* trapSysOut - true = intercept System.out */
/* trapSysErr - true = intercept System.err */
/* maxMsgSize - the approx size in bytes of the limit befor a message */
/* is sent to the queue */
/*-------------------...