Solved

How to find the available printers using java when the program is running in weblogic??

Posted on 2006-06-29
6
927 Views
Last Modified: 2013-12-10
Hi,

      I need to find all available network lan printers which support given document flavor using java API.
     
      When i run the following code standalone, i am able to find the printers.
       PrintService[] mPrintServices = PrintServiceLookup.lookupPrintServices(aDocFlavor, aPrintRequestAttributeSet);
 
      But the same code when it is getting executed in weblogic environment by a message driven been it is not able to find all network lan printers except local printer.

       It is on the same windows machine.

       Do i need to configure anything in weblogic to make the printers visible to weblogic or should i have to disable any ports?

     ***This is urgent looking for suggestions***

Thanks
0
Comment
Question by:madhurikg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 17017484
Hi madhurikg

How do you run the code in first place? Is it via a stand alone java application? Do you get a popup with the available printers? Bare in mind that EJBs are executred on the server and not on the client and therefore you might be getting all printers but you are not able to see them.

Cheers
0
 

Author Comment

by:madhurikg
ID: 17018787
I run the code by stand alone java application. I do not get any pop up windows. I just print all available printservices.
The following is the code.

PrintService[] mPrintServices = PrintServiceLookup.lookupPrintServices(aDocFlavor, aPrintRequestAttributeSet);
for (int i = 0; i < oPrintServices.length; i++) {
      lw.log("printservicename:::"+oPrintServices[i].getName());
}

If the same code is executed by the Message driven Bean(EJB) in weblogic it is not finding any lan printers

**looking for suggestions
0
 
LVL 3

Accepted Solution

by:
anumalas earned 500 total points
ID: 17057741
Hi

Weblogic can retive printer information which are available to that applicaiton server not the network printers.  You can do this with ejb alternatively like.,

map the network printers which are available with some names and try to retrive those form EJB with alias.

Hope this will help:)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

-Xmx and -Xms are the two JVM options often used to tune JVM heap size.   Here are some common mistakes made when using them:   Assume BigApp is a java class file for the below examples. 1.         Missing m, M, g or G at the end …
Verbose logging is used to diagnose garbage collector problems. By default, -verbose:gc output is written to either native_stderr.log or native_stdout.log.   It is also possible to redirect the logs to a user-specified file. This article will de…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question