adequate
adequate
adequate
adequate
 

JPPF
 Home   About   Download   Documentation   Forums 
May 22, 2013, 01:25:37 AM *
Welcome,
Please login or register.

Login with username, password and session length
Advanced search  
News: Registered users, your contribution is requested! Please participate in our JDK support poll
New users, please read this message. Thank you!
  Home Help Search Login Register  
Pages: [1]   Go Down

Author Topic: How to call JPPF Task in Struts  (Read 1134 times)

Venkat

  • Guest
How to call JPPF Task in Struts
« on: July 16, 2009, 07:24:28 AM »

Hi

I am going ti use JPPF frame work in Struts application
When click on the some button it will call my action class ,from that action class i am going to execute task(like run method)

My action class contains below code:

                                                  client = new JPPFClient();
            JPPFJob job = new JPPFJob();
            job.addTask(new HelloWorld());
             results = client.submit(job);         
            
            for (int i = 0; i < results.size(); i++) {
               task = (JPPFTask) results.get(i);
               if (task.getException() != null) {
                  StringWriter sw = new StringWriter();
                  task.getException().printStackTrace(new PrintWriter(sw));
                  System.out.println(sw.toString());
               } else
                  System.out.println("output ---->" + task.getResult());
            }
-----------------------------and HelloWorld class-------------------

public class HelloWorld extends JPPFTask{

   public void run(){
   
      String hello = "Hello World";      
      setResult(hello);
   }   
   
}

and iam using eclipse 3.1 and server jboss3.2.6 and i have set the class path using build path  for commons-logging-1.1.jar,jppf-client.jar,jppf-common.jar,jppf-common-node.jar so classes are compling..

here how to configure or set the class for : -Djppf.config=jppf-client.properties
                                                           -Djava.util.logging.config.file=config/logging.properties


now whenever my action class will call it shoud execute the task (HelloWorld.java) but iam getting the org.jppf.JPPFException: Null driver connection and local executor is disabled
here how to set the classpath for jppf-client.properties and logging.properties and to which class i need to set the -                             Djppf.config=jppf-client.properties
                            -Djava.util.logging.config.file=config/logging.properties
and how?

thank
venkat




 
Logged
Pages: [1]   Go Up
 
Support This Project Powered by SMF 2.0 RC5 | SMF © 2006–2011, Simple Machines LLC Powered by Parallel Matters Get JPPF at SourceForge.net. Fast, secure and Free Open Source software downloads