cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in using Scheduler API

Former Member
0 Kudos

Hello Friends

I am trying this concept of Job Scheduler API of Netweaver for the first time . The problem that I am encountering is , after successfull deployment of my application DC , I cant see the job created by me in the job definations on server

I am laying down the approach that I took for the development of job : -

1) I created one EJB Module DC( sample_mdb_session ) and created one Message Driven bean

( JobBean ) and laid down the logic to be run on the execution of job

I have also included the scheduler api in the build path of my DC

2) nextly I created the required job-definition.xml and did the changes in ejb-j2ee.xml

ejb-j2ee.xml

<enterprise-beans>

<enterprise-bean>

<ejb-name>com.sap.scheduler.examples.session.JobBean</ejb-name>

<jndi-name>JobBean</jndi-name>

<resource-ref>

<res-ref-name>JobQueueFactory</res-ref-name>

</resource-ref>

<message-destination-ref>

<message-destination-ref-name>JobQueue</message-destination-ref-name>

<jndi-name>JobQueue</jndi-name>

</message-destination-ref>

</enterprise-bean>

</enterprise-beans>

job-definitons.xml

<job-definitions>

<job-definition name="JobBean"

description="Logs a string and calculates its length">

<job-definition-parameter name="UserName"

data-type="String"

direction="IN"/>

<job-definition-parameter name="NameLength"

data-type="Integer"

direction="OUT"/>

</job-definition>

</job-definitions>

3) In the application DC( sample_application_dc ) I did the required changes in application-j2ee-engine.xml

<application-j2ee-engine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="application-j2ee-engine.xsd">

<reference reference-type="hard">

<reference-target provider-name="sap.com" target-type= "service">

scheduler~runtime

</reference-target>

</reference>

<modules-additional>

<module>

<entry-name>demo.sap.com~sample_mdb_session.jar</entry-name>

<container-type>scheduler~container</container-type>

</module>

</modules-additional>

</application-j2ee-engine>

The document that i had reffered to construct everything was actually dealing with an EJB project and a respective .ear project, things were working fine till the time I was dealing with local EJB projects but as soon as I started working with DCs , the problems occured

And when i deployed the application on the server it is deployed successfully , but I cant see the job in job definitions in SAP Netweaver Administrator > java scheduler section

What i am doubting is that the changes that i did in the xmls are not apt , so If any one on the forum has done the scheduling job earlier can please send the required xml code as that may help in solving the problem

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Smriti,

Greetings.

I am trying to schedule a java file to execute periodically in NWDS. Is it possible to share how you acheived the same using java scheduler?

thanks

Former Member
0 Kudos

I was just not naming the xml file properly

Former Member
0 Kudos

Problem Solved