Solved

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

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

17 Experts available now in Live!

Get 1:1 Help Now