launch a job (java)

Tarik Benabid anonymous at easysw.com
Tue Aug 24 10:36:40 PDT 2004


Hi,

my problem is: to change the backend and launch the job

actually I do it with a perl script:

changing the device uri
from :  Javabackend://printer_uri
to   :  socket://printer_uri
=======
exec {'/usr/lib/cups/backend/socket'} ENV{'DEVICE_URI'} @ARGV
=======

I saw that in some backend examples.

can we do the same with an IPP request ( I'm using java API (or CGI) in cups/scripting... )?


Regards

***************************************************
for more details:


I'm developping an application to check quota, like pykota... but in java (and with some other requirements, so we can not use pykota asis)


the java class is launched by a perl script ( a backend )
========

java JavaApp @ARGV ##(optionally ENV argument also)
========
now, I'm trying to send the job to the "real" printer, using the appropriate backend ( socket, ipp ...)
in the actual version, I "move" the job to another queue ( using the ipp tag CUPS_MOVE_JOB ) but this needs configurating two queues ( a virtual one for accounting and real one for the printer)

first : Javabackend://"any thing"
second : ipp://hostname/printers/queue  (or : socket://printer)


I prefer to launch jobs with an ipp request if possible ( just with its job_id )using the cups API.
if not, i'll try to launch a command line from the java class  ( process.runtime.exec(" command line ")

**********
note: in the perl script , when the job is launched by the command
===
exec {'/usr/lib/cups/backend/socket'} ENV{'DEVICE_URI'} @ARGV
===

there are no logs ( in a debug mode )
I prefer a solution with logs :)












More information about the cups mailing list