4 Replies Latest reply on May 2, 2005 1:52 PM by mazz

    Printing on Cluster

    hido

      Hi,

      I get my print service from my Jboss AS.

      This supplies the printers, which are already installed on this server.

      As behaves jboss, if I it with cluster on two physically separated server runs.

      Which printers are supplied from cluster.

      All installed printers from all servers ?

      best regards

        • 1. Re: Printing on Cluster
          hido

          Hi,
          nobody wants help me ?

          I have following question :

          My Application runs on a Jboss Server. On an another seperated Server (named printserver with same Jboss Environment and additional printers ) are installed my printers. How can I take the printservices from my Printserver ?

          please help

          regards

          • 2. Re: Printing on Cluster
            mazz

            I'm sorry - but I must admit, your description of your problem is very nebulous. It is confusing due to the lack of any meaningful detail. So, it isn't that nobody "wants" to help you, rather, its that nobody knows "how" to help you.

            Honestly, I don't think anyone here knows what you are asking in order to answer it properly. Please ask in much more detail what the problem is that you are having and what you want to happen. Just saying, "How can I take the printservices from my Printserver" isn't enough for people to understand your problem from a JBoss Clustering perspective.

            • 3. Re: Printing on Cluster
              hido

              Hi,

              I don' know , how can I describe my problem better. I try it again :)

              1- I have a EJB-Application , which runs with Jboss 3.2.5
              2- I'm printing pdf document with my Application.
              3- I'm gettin the printservices as following :

              private PrintService getPrintService(String serviceName) {

              PrintService retPrintService = null;
              if (serviceName != null) {

              DocFlavor flavor = DocFlavor.SERVICE_FORMATTED.PRINTABLE;

              PrintService services[] = PrintServiceLookup.lookupPrintServices(
              flavor, null);

              String printerNamesToDisplayToClient[] = new String[services.length];

              for (int i = 0; services != null && i < services.length; i++) {
              printerNamesToDisplayToClient = services.getName();
              if (serviceName.equals(services.getName())) {
              retPrintService = services
              ;
              }

              }
              }
              return retPrintService;

              }

              4- PrintServiceLookup.lookupPrintServices supplies me the local print services, which are installed on this server.

              5- But I want to lookup this services from another server. How can I lookup printservices from another server, which is seperate server with own IP-address and jboss-server.

              I hope, this description is better.

              regards


              • 4. Re: Printing on Cluster
                mazz

                I assume when you say "lookup" and "service" you are saying that your PrintService is an EJB and you are using JNDI to look up the EJB.

                Again, this is an assumption because you didn't say if that's true. It could be that your PrintService is a JMX MBean service and you are "looking" up the service via the MBeanServer API. I have no idea what your "lookupPrintServices" method is doing in regards to this.

                You probably need to look into using the HA JNDI capabilities - meaning your EJBs will get registered in JNDI and that JNDI tree is replicated across the cluster. Assuming your lookup code looks up the EJBs in the proper JNDI context, you could find all the EJBs deployed in all your clustered JBoss boxes using HA JNDI.

                Just a thought.