1 Reply Latest reply on May 10, 2008 2:15 PM by Vicky Kak

    Quartz-ra + JobstoreCMT + XA

    Paul Klestorny Newbie

      Hi,

      I´ve been struggling for one entire week trying to figure out how to make the quartz resource adapter to work with jobstoreCMT and XA datasources.
      Finally I assume I ended seting all the thing up in the correct way cause I can see the jobs related data in the quartz DB and also because the calls made from quartz are being correctly delivered to the org.jboss.resource.adapter.quartz.inflow.QuartzJob class.

      The problem arises when the following code executes on this class:

      ...
      MessageEndpointFactory endpointFactory = (MessageEndpointFactory)jobExecutionContext.getJobDetail().getJobDataMap().get("endpointFactory");
       endpoint = endpointFactory.createEndpoint(null);
      ...
      


      Here I am getting a NPE when createEndpoint(null) is called over the endpoint object, as this object is null. (Line: 53)

      The endpoint is being putted in the jobDataMap by the QuartzResourceAdapter.java class when the endpoint is activated.

      Clue: The import javax.resource.spi.endpoint.MessageEndpointFactory is not Serializable itself, but maybe the underlying class that implements this interface, also implements the serializable one so that´s is why Im not getting an exception for being not serializable...

      Am I doing something wrong or this resource adapter does not work with JobStoreCMT and XA datasources obtained from the Application server?

      Thanks.






        • 1. Re: Quartz-ra + JobstoreCMT + XA
          Vicky Kak Master

           

          "pkles" wrote:

          Am I doing something wrong or this resource adapter does not work with JobStoreCMT and XA datasources obtained from the Application server?


          Looks like you are making correct configuration , there is a known similar issue here also
          http://jira.jboss.org/jira/browse/EJBTHREE-836

          After reading this
          http://wiki.opensymphony.com/display/QRTZ1/TutorialLesson3

          I could make that

          The JobDataMap can be used to hold any number of (serializable) objects which you wish to have made available to the job instance when it executes. JobDataMap is an implementation of the Java Map interface, and has some added convenience methods for storing and retreiving data of primitive types.


          I am not the quartz expert so can't tell if some configuration will get the non-serialized object store in the jobdatamap . Can you get this confirmed from the quartz experts ?

          I tried to look at the quartz code but it is going to take lot of time :(