Announcement Announcement Module
No announcement yet.
Websphere 6.x CommonJ and Scheduler integration Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Websphere 6.x CommonJ and Scheduler integration


    There is not too much documentation on this, but I need to integrate with WebSphere to run an automated tasks every 5 minutes. I know the latest flavor of Spring has a WorkManagerTaskExecutor class that delegates to a WorkManager via JNDI on Websphere - that is all well and good.

    My question is that Websphere also has a 'Scheduler' API that is built on top of the WorkManager and Timer API's. Will Spring let me integrate with the Scheduler API?

    Haven't seen too much documentation on people using either of these APIs so unfortunately I am going to have to use 'trial and error' - just wondering if anyone happens to know the answer to this.

    thanks in advance,

  • #2
    never mind

    Well, looks like I do not need to use the scheduler after all. By the way, I did a quick prototype of using the Timer and WorkManager API's as well as the Scheduler service without using Spring (hardcoded everything into the code - yechhh) - it was easy enough. But I am actually only going to end up using the Timer and WorkManager which would translate in Spring to:
    and those should be easy enough to setup.



    • #3
      ... along those lines - so I have decided that I can get what I need by using the TimerManagerFactoryBean and WorkManagerTaskExecutor beans. All I need now is a working example of wiring one of these beans. I understand everything except where to specify the JNDI name. Here is how I have it wired:
      <bean id="timerManager" class="org.springframework.scheduling.commonj.TimerManagerFactoryBean">
              <property name="jndiTemplate">
                  <ref bean="commonJJndiTemplate"/>
              <property name="resourceRef" value="true"/>
              <property name="jndiName">
      <bean id="commonJJndiTemplate" class="org.springframework.jndi.JndiTemplate">
              <property name="environment">
                      <prop key="java.naming.factory.initial">
                      <prop key="java.naming.provider.url">
                      <prop key="java.naming.factory.url.pkgs">
      So of course this threw an exception because there is no 'jndiName' setter in this class. Which has me spinning around trying to find out how to actually reference the jndi object by name.

      I have connected to these services without Spring by hard coding the jndi info; however, I'd like to stick to Spring since it is so clean and fits nicely.

      In short - I need to know how to properly wire one of these classes, where do I specify the jndi name???

      thanks a million. "hello hello hello - is anybody out there?" <Pink Floyd>


      • #4
        Okay, I think I found what I was looking for in

        Simple - I was making it way too complicated!!