Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
There are numerous questions about how to setup an IBM HTTP Server to be administered from WebSphere Application Server administrative console. I do hope this article will wrap things up and become a reference for this task. You need three things…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

919 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

20 Experts available now in Live!

Get 1:1 Help Now