Execute commonj.WorkManager work on remote member of application cluster

Hi,
We have configured a WorkManager for our web application which works with Spring & Quartz to execute jobs asynchronously. However, all jobs get picked up by the same machine and the other members of the cluster are not given any tasks to execute.
The commonj documentation says that a Serializable Work returns a RemoteWorkItem which can execute jobs on a remote jvm. Weblogic docs, however, say that it doesn't support this interface and implements its own cluster load balancing.
How do we configure the Workmanager such that work is distributed across remote jvms in a cluster.
Thanks.
Regards
Kaizer

Hi,
Do you have TestStand 2.x or are you using a later version TS 3.5.
TestStand 2.0 didn't handle remote execution, that wasn't available until TS3.0 or TS3.1.
This example, shows how an executable can access the same execution of a TestStand sequencefile not a remote execution.
If you have TestStand 3.x, then there should be some examples employing remote execution within theTestStand examples folders. or try this link http://zone.ni.com/devzone/conceptd.nsf/webmain/955A560B0B0052B88625698500563621
Regards
Ray Farmer
Regards
Ray Farmer

Similar Messages

  • [WebLogic Server 11g 10.3.3] Cannot Lookup CommonJ WorkManager ?

    Hi,
    I am currently working on an application and going to use the Weblogic's CommonJ WorkManager; I tried the example in http://download.oracle.com/docs/cd/E14571_01/web.1111/e13733/toc.htm ; however I got an error
    javax.naming.ServiceUnavailableException [Root exception is java.net.UnknownHostException: Unknown protocol: 'RMI']
    Have anyone experienced this? I searched the web for answers but it seems I'm the only one getting this exception.
    The declaration of the work manager is in web.xml as follows:
         <resource-ref>
              <res-ref-name>default</res-ref-name>
              <res-type>commonj.work.WorkManager</res-type>
              <res-auth>Container</res-auth>
              <res-sharing-scope>Shareable</res-sharing-scope>
         </resource-ref>
    and I tried to lookup using the following code (basically just copy-paste from the example with some modification):
         void init() {
              try {
                   System.out.println("## executing in: " +
                             ((ExecuteThread)Thread.currentThread()).getWorkManager()
                             .getName());
                   String lookupstr = "java:comp/env/default";
                   System.out.println("## lookup >>> " + lookupstr);
                   InitialContext ic = new InitialContext();
                   WorkManager wm = (WorkManager)ic.lookup(lookupstr);
                   System.out.println("## got Java EE work manager !!!!");
                   wm.schedule(new Work(){
                        public void run() {
                             ExecuteThread th = (ExecuteThread) Thread.currentThread();
                             System.out.println("## [servlet] self-tuning workmanager: " +
                                       th.getWorkManager().getName());
                        public void release() {}
                        public boolean isDaemon() {return false;}
              catch (NamingException ne) {
                   ne.printStackTrace();}
              catch (WorkException e) {
                   e.printStackTrace();
    and the error is:
    ## executing in: default
    ## lookup >>> java:comp/env/default
    javax.naming.ServiceUnavailableException [Root exception is java.net.UnknownHostException: Unknown protocol: 'RMI']
         at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:34)
         at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:787)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:368)
         at weblogic.jndi.Environment.getContext(Environment.java:315)
         at weblogic.jndi.Environment.getContext(Environment.java:285)
         at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
         at javax.naming.InitialContext.init(InitialContext.java:223)
         at javax.naming.InitialContext.<init>(InitialContext.java:175)
         at com.example.cms.engine.ui.t5.pages.Welcome.init(Welcome.java:26)
    thanks in advance for any help,
    Harry

    How are you trying to connect to the server?
    An example:
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import java.util.Hashtable;
    public class LookUP {
        private static Context context;
        private LookUP() {
        static {
            Hashtable hashtable = new Hashtable();
            hashtable.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
            hashtable.put(Context.PROVIDER_URL, "t3://172.31.0.107:7002,172.31.0.107:7003");
            //hashtable.put(Context.SECURITY_PRINCIPAL, "username");
            //hashtable.put(Context.SECURITY_CREDENTIALS, "password");
            long begin = System.currentTimeMillis();
            try {
                context = new InitialContext(hashtable);
            } catch (NamingException e) {
                e.printStackTrace();
            long end = System.currentTimeMillis();
            long timeseconds = (end - begin) / 1000;
            System.out.println("initialcontext creation time " + timeseconds);
        public static Context getContext() {
            return context;
    }Note that in order to use this you need a certain type of wls-client in the classpath.
    When the wlclien.jart is used than t3 is automatically replaced by iiop.
    When the wlfullclient.jar is used than the t3 protocol is used (newer version of weblogic also ship a wlthint3client.jar)

  • User a commonj WorkManager on a servlet

    Hi,
    I'm developing a servlet in weblogic 9 and want to assing a commonj WorkManager to it for work handling. For that purpose I have defined the following resource-ref on web.xml file
    <resource-ref>
    <res-ref-name>wm/MyWorkManager</res-ref-name>
    <res-type>commonj.work.WorkManager</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    On the code I obtain successfully the reference of that WorkManager through JNDI. The problem is that when I try to schedule the first work on that work manager i get and exception saying the work manager is shutdown.
    commonj.work.WorkException: commonj.work.WorkRejectedException: [WorkManager:002916]Request belonging to WorkManager wm/MyWorkManager, application nsu-ws-connector is rejected as the WorkManager is shutdown
         at weblogic.work.j2ee.J2EEWorkManager$WorkStatus.setThrowable(J2EEWorkManager.java:326) [weblogic.jar:9.2.3.0]
         at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener$1.run(J2EEWorkManager.java:229) [weblogic.jar:9.2.3.0]
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518) [weblogic.jar:9.2.3.0]
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) [weblogic.jar:9.2.3.0]
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:181) [weblogic.jar:9.2.3.0]
    Caused by: commonj.work.WorkRejectedException: [WorkManager:002916]Request belonging to WorkManager wm/MyWorkManager, application nsu-ws-connector is rejected as the WorkManager is shutdown
         ... 4 common frames omitted
    Do I have to startup this work manager or something? Thanks a lot

    Hi,
    Which kind of workmanager is it..."*Application Level WorkManagers*" or "*Global WorkManagers*". Have u provided any <work-manager> tag in "weblogic.xml" as well?
    Please refer to the following link...and let us know if you are doing anything special... After the Lookup to the WorkManager is Successful... How r u calling the .schedue()? or what exactly r u doing after that?
    http://jaysensharma.wordpress.com/workmanagers/
    And
    http://jaysensharma.wordpress.com/2009/12/20/application-level-workmanager-timermanager-lookup/
    Thanks
    Jay SenSharma

  • Best method to execute a command on a remote machine?

    I am currently using runtime.exec to execute commands on the machine where my java gui is running. What I would like to do is to execute the programs on a remote networked machine.
    What should I be looking at? creating sockets, using rmi?
    eventually it would be good to utilise ssh for the connection.
    Any help is much appreciated.

    haven't really looked at this properly, was really after some advice on what methods would be useful.....
    I can see that a telnet type solution can work... need to look further at rmi i think

  • If script executing locally- do this, if remote-do that

    hello everyone,
      need some advice on the best way to do this, not sure if some logic like this is even needed, i may be over thinking it.
    First a little background:
    I have a clipbucket 2.6 site.  works great on remote.  when i install with xampp on my personal computer errors being thrown of
    Call to undefined method ADODB_mysql::select()
    now i found a fix for this on their site, it is to change a line in their code:
    require 'adodb/adodb.inc.php';
    to something that will reference the file correctly in a local environment.  some people suggest
    require '/FULL PATH TO/adodb/adodb.inc.php';
    but that does not work for me, i get errors of not being able to find file, turns out it only works on wamp or lampp, i use xampp
    THIS is what works on my local xampp test server:
    require 'C:\xampp\htdocs\videoz\includes\adodb\adodb.inc.php';
    NOW MY QUESTION:
    require 'C:\xampp\htdocs\videoz\includes\adodb\adodb.inc.php';
    will not work on remote to reference the file correctly.
    How can i make some logic to decide if a script is being executed on local or remote and include a filepath accordingly?
    if file exists?
    server root?
    suggestions?'
    ideas?
    is this even the right way to go about this?  I cant figure out a way to scructure the include to work with both, i have it disabled to use variables in include statements (whatever its called), ha
    any suggestions on how to do this effectively and most importantly safely??
    thanks a ton for your attention!

    as i tried to explain in my first post, (maybe not all that well but i tried) the path to the file is different on the remote and localhost.  Normally a file refrence can be structured to not make this a big deal.  But in this particular situation xampp does not recognize the short path or the FULL PATH TO way of doing things.  I agree it sucks, but it is what it is.  as long as the if else is structured effeciently and securely, it would make a cross platform solution.  Plus some poeple only use the clipbucket cms locally, kindof like a picture album, this way they can use it too.
    Thanks Rob, thats kindof what I was leaning towards, just wasnt sure if there was a better way of doing it.  This topic i found a few places on the clip bucket forum and neither of them had a solid cross platform solution.  Just thought id check with the adobe crowd before i posted a solution.
    My final code if anyone is curious:
    if($_SERVER['DOCUMENT_ROOT'] !== 'C:/xampp/htdocs')     
    //works for remote     
    require 'adodb/adodb.inc.php';     
    }else{     
    //works for localhost     
    require 'C:\xampp\htdocs\videoz\includes\adodb\adodb.inc.php';    
    Thanks a lot everyone!

  • Typecast error while lookup (J2EEworkmanager to commonJ workmanager)

    Hi,
    I am using plain web application where i want to use commonJ workmanager to do same i have done following steps
    1. Define work manager in weblogic.xml
    <work-manager>
    <name>LogWorkmanager</name>
    <min-threads-constraint>
    <count>5</count>
    </min-threads-constraint>
    </work-manager>
    2. Define resource in web.xml file
    <resource-ref>
    <res-ref-name>LogWorkmanager</res-ref-name>
    <res-type>commonj.work.WorkManager</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    3. Use JNDI mapping to get workmanager as:
    InitialContext ic = new InitialContext();
    commonj.work.WorkManager wm = (commonj.work.WorkManager)ic.lookup("java:comp/env/LogWorkmanager");
    Here at step 3 I am getting classcast exception as java.lang.ClassCastException: weblogic.work.j2ee.J2EEWorkManager.
    Could you please guide me where I am making mistake as I have defined resource ref point to commonj.workmanager and used same name in lookup method still why i am getting J2EEWorkManager instead of commonJ workmanager.
    Thanks,
    Yuvraj

    Can you run a little test. See if the following works:
    In your web.xml
        <!-- default weblogic work manager -->
        <resource-ref>
            <res-ref-name>default</res-ref-name>
            <res-type>commonj.work.WorkManager</res-type>
            <res-auth>Container</res-auth>
            <res-sharing-scope>Shareable</res-sharing-scope>
        </resource-ref>In your code you can use something like:
    import commonj.work.WorkManager;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import java.io.IOException;
    public class TestServlet extends HttpServlet {
        protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            getDefaultWorkManager();
        private WorkManager getDefaultWorkManager() {
            WorkManager defaultWorkManager = null;
            try {
                Context context = new InitialContext();
                defaultWorkManager = (WorkManager) context.lookup("java:comp/env/default");
                System.out.println("My default workmanager " + defaultWorkManager);
            } catch (NamingException e) {
                e.printStackTrace();
            return defaultWorkManager;
    }

  • Does Firefox have some kind of firewall??? Recently I can't print or connect to my work computer remotely. Two things I was always to do in the past.

    Recently I can't connect to my work computer remotely and I can't print things even when I am using my desktop which is directly connected to the printer. If I go to Internet Explorer or AOL I have no problems but since I mainly use Firefox this has become a major problem.

    I encounter similar problem. My TC detects my OKI printer which is connected to the TC via USB but I can't print unless I connect my printer to the TC via Ethernet. Would anyone know how to solve it. Thanks.

  • Why is my executable VI not working with a PCI-6259?

    I have bought a PCI-6259 which has referencing trigger capability. I wrote a VI for acquiring the data and tested the VI on my PC that has the full developmental LabView 8.2.1 package installed.  The trigger is a 1 volt level that is triggered by a potentiometer ranging from 0-5 volts that I control manually. The VI works exactly how I want it to, however, now I want to use the Application Builder to create an executable to distribute the VI to the testing station PC. I then removed the PCI-6259 from the developmental PC and installed it in the testing station PC and loaded the executable VI along with the LabView 8.2.1 Run Time Engine. I open the program and it runs but I cannot get the program to trigger using the same potentiometer so it runs in an infinite loop.  I'm pretty sure everything is loaded correctly and the only difference between the two stations is that one has the full developmental LabView package and the other is an executable. Would anyone know why my executable is not working?
    Thanks,
    Matt Kostyal

    Hey Matt,
    Thanks for contacting National Instruments support.  One thing I'd like to see you try in the DAQ diagnostic utility.  I do not suspect a bad card, but it is an executable that we can try that we know was properly built.  If it doesn't work that will give us some more insight into the problem if it is truly hardware or software. 
    Let me know what you find.
    Regards,
    Kenn North
    Senior Product Manager - Search, Product Data
    http://ni.com/search

  • Webutil.host.HostBean not found WEBUTIL_HOST.execute will not work

    Hi everyone:
    I've got a form. I've attached webtill.pll and subclassed webutil.olb.
    In the WHEN-NEW-FORM-INSTANCE trigger it does:
    client_host('cmd /c cd > arch.txt');
    When I execute my form I got the errror:
    webutil.host.HostBean not found
    WEBUTIL_HOST.execute will not work
    Could anyone give me some help on it?
    Thanks!
    Carolina

    Hi!
    this is what I got in the Java console
    JInitiator: Versión 1.3.1.22
    Usar versión JRE 1.3.1.22-internal Java HotSpot(TM) Client VM
    Directorio local del usuario = C:\Documents and Settings\Administrador
    Configuración del delegado: sin delegado
    JAR cache enabled
    Location: C:\Documents and Settings\Administrador\Oracle Jar Cache
    Maximum size: 50 MB
    Compression level: 0
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    q: hide console
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    Loading http://rx26201:7778/forms/java/frmall_jinit.jar from JAR cache
    Loading http://rx26201:7778/forms/java/frmwebutil.jar from JAR cache
    Loading http://rx26201:7778/forms/java/jacob.jar from JAR cache
    Loading http://rx26201:7778/forms/java/dgrImages.jar from JAR cache
    proxyHost=null
    proxyPort=0
    connectMode=HTTP, native.
    La versión del applet Forms es: 10.1.2.0
    thanks!

  • I need to connect to my work PC remotely from my macbook. I think I need the citrix software. But which version and what is the procedure?

    I need to connect to my work PC remotely from my macbook. I think I need the citrix software. But which version and what is the procedure?

    Probably don't need citrix software. Is you computer in the office on LAN? Also, is the office computer setup for remote access? If it's windows then its going to be running Remote Desktop Protocol (RDP) natively. If it is in fact RDP that your windows machine at work is using then you need to download RDC for mac. I use it to connect to my work computer using RDP (don't tell the "Info Tech" dude at my office) and if your not too tech savvy I would suggest trying GOTOMYPC. It's alot easier to setup. But if you have experience in setting up remote access and your Windows office machine is connected through LAN and your IT TECH has allowed port forwarding then you should be just fine with RDP and it's free!!! But are you logging onto your actual computer at work or logging into the "SERVER" through your work machine... believe me it's two completely different things.
    Basically, you'll need:
    1. Physichal IP address of work computer. (If office computer is on WIFI this won't work) use IPCONFIG commands in command prompt
    2. Port forwarding needs to be enabled by your IT Tech
    3. Remote Desktop settings will need to be enabled on the office computer
    4. Download RDC for mac (search google)
    5. Type the physical IP address into RDC and hit connect... type in credentials and your all done.
    We need lots more details though... there are many ways to connect remotely and if your office already has a system in place for remote access then any details would be helpful in determining which method will suit you best. If it's citrix just have your IT dude set it up. If you think you need citrix then good luck....

  • Does Update function module gets executed after Commit Work?

    Hi Gurus,
    I have a BAPI with a Commit work. Does update function module V1 , V2 - i need mainly about the sequence of V2, gets executed after Commit work or before Commit work.
    Thanks

    Pl refer to SAP help on the same as follows.
    https://help.sap.com/saphelp_nw04/helpdata/en/e5/de86e135cd11d3acb00000e83539c3/content.htm
    Regards,
    Naveen Vishal

  • Airplay works with Remote but cuts out for every other App

    Remote works perfectly fine but whenever I try another AirPlay app it cuts in and out.  Driving me crazy. I have att wifi with an airport express.  Any ideas?  Why would AirPlay work with Remote but fail with every other app?

    Remote does not use AirPlay.

  • Lookout executable has stopped working

    Windows gives me the error 'Lookout executable has stopped working'.
     Lookout 6.6 development version, Windows 7 on Dell Latitude.
    This occurred a couple of times now, and the only fix is to completely reload Lookout.
    Has anyone seen this problem before?
    Attachments:
    Problem signature.docx ‏43 KB

    Some drivers can cause this.
    We have an Ethernet serial convertor and if the network drops, lookout will hang.  If you click the screen, it will stop responding.  After the adapter is reconnected, lookout usually recovers within 2-5 minutes.
    Have also had happen with a lot of Modbus TCP sites and changing datamember aliases.
    Forshock - Consult.Develop.Solve.

  • Flash executable Presentation will work in Mac OS...?

    hi friends,
    Flash executable Presentation will work in Mac OS..? or the executable Presentations only for windows platform..?
    - Charles JA

    Flash projectors are platform specific. You can create one or the other or both from the Publish Options in Flash.

  • How can I make to work the remote

    Went I click home remote it does ask me for a code

    as i tried to explain in my first post, (maybe not all that well but i tried) the path to the file is different on the remote and localhost.  Normally a file refrence can be structured to not make this a big deal.  But in this particular situation xampp does not recognize the short path or the FULL PATH TO way of doing things.  I agree it sucks, but it is what it is.  as long as the if else is structured effeciently and securely, it would make a cross platform solution.  Plus some poeple only use the clipbucket cms locally, kindof like a picture album, this way they can use it too.
    Thanks Rob, thats kindof what I was leaning towards, just wasnt sure if there was a better way of doing it.  This topic i found a few places on the clip bucket forum and neither of them had a solid cross platform solution.  Just thought id check with the adobe crowd before i posted a solution.
    My final code if anyone is curious:
    if($_SERVER['DOCUMENT_ROOT'] !== 'C:/xampp/htdocs')     
    //works for remote     
    require 'adodb/adodb.inc.php';     
    }else{     
    //works for localhost     
    require 'C:\xampp\htdocs\videoz\includes\adodb\adodb.inc.php';    
    Thanks a lot everyone!

Maybe you are looking for

  • Basic http authentication not working when consuming Web Service in BPEL.

    Hi, I am consuming an AXIS Web Service from BPEL 10.1.3. The Web Service uses basic http authentication so we need a way to get username and password into the http header. In the Oracle BPEL Process Manager Administrator's Guide 10g (10.1.3.1.0) sect

  • Printer has paper, but computer says it is out of paper and won't print from web

    I am having trouble getting the computer to recognize that the printer has paper. The printer will print copies that I put in it, but when I want to print from the web, it won't let me do it; it just tells me that the printer is out of paper. I print

  • IChat Video Not Working since PSP3 bought!!

    Hi guys, ichat video not working since I bought and installed a new Playstation 3. I have a BT HUB that connects wirelessly with the imac. I have BT Vision running from the HUB too via ethernet wall boost adapters. I had this problem with video when

  • How to tune update using subquery

    T1 has 4 million records T2 has 9 million records Average number of records updated in T1 = 115,000 I am trying update table T1 (4 million records), with matching t_id from table T2 (9 million records), every night. I tried the 3 version of the updat

  • How to use HTTP / XML API

    Hi, I have to communicate with a product . The product has HTTP / XML API . The API has some functions. The examples in the product docs , If you send a HTTP request to URL of the product with function name and some input parameters , It returns XML