...
This example shows how to write a Java job which calls a Session EJB.
Feature Status
Display feature availability |
---|
EndingWithRelease | 1.10 |
---|
StartingFromRelease | 1.3 |
---|
|
Jira |
---|
server | SOS JIRA |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 6dc67751-9d67-34cd-985b-194a8cdc9602 |
---|
key | JS-1314 |
---|
|
Downloads
Instructions
- Deploy the ConverterBean from Chapter 24 of the sun j2ee tutorial at http://java.sun.com/j2ee/1.4/docs/tutorial/doc/ onto your j2ee server.
- Get the application client from Chapter 24 of the tutorial running. Don't even try to do the rest of this HowTo if you don't get the application client running. This HowTo is not about setting up EJBs on a j2ee server. It is not about connecting EJB clients to the server. It is about writing Java Jobs for the JobScheduler which act as an EJB client. It will tell you how to configure the JobScheduler in order to find all required libraries and get the jndi lookup right.
- Unzip all files from
ejb.zip
into the ./config/live folder of your JobScheduler installation. - Create a new foler
ejb
in the lib
directory of your JobScheduler installation. - Put EJBJob.jar and all the jars which are needed to run the application client (this may depend on the application server you are using) into the
lib/ejb
directory. - If you need to set jndi properties, write a
jndi.properties
file and put it into the lib/ejb
directory. - Edit config/factory.ini
- Look for the
class_path
entry and add ;${SCHEDULER_HOME}/lib/ejb/*.jar;${SCHEDULER_HOME}/lib/ejb
. (The second entry is required to find the jndi.properties
file.) On Linux and Unix systems, use ":" as separator instead of ";". - Restart the JobScheduler
- Open the web interface of the JobScheduler in your browser using http://scheduler_host:scheduler_port
- Open the JOB CHAINS tab and enable "Show orders".
- Find the job chain
samples/ejb/ejb_chain
. - Find the order
my_order
, open the order menu and choose "Show log".
...