Solved

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

Posted on 2006-06-29
6
897 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
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Configure Web Service (server application) I. Configure security for Web Services methods First, we need to protect Session bean which implements the service: 1. Open EJB deployment descriptor (ejb-jar.xml) in the EJB project that contains you…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

813 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now