cancel
Showing results for 
Search instead for 
Did you mean: 

Asynchronous job - how to trigger?

former_member190457
Contributor
0 Kudos

Hi everybody,

on CE 711, in my ejb 3 I have to perform a really heavy task, such as uploading several binary documents over the web to a remote Web Service.

Since this EJB is invoked from Web Dynpro Java, I would like to perform the upload asynchronously, to avoid WDJ timeout.

I would like the EJB to save files on CE local db table and then start a task/job/whatever which could then upload them to the remote service.

Please notice that I don't want a scheduled task to run at a specified time, I would like a task to be launched upon EJB request.

Can anyone please shed some light?

Thanks, regards

Vincenzo

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi vincenzo,

'cause you know multithreading violates the ejb spec you need to have an asynchronous call, which you can establish by using jms or even easier by starting an asynchronous bpm process.

model a start event for your process which retrieves the identifiers of your locally stored files, iterate inside the process and push the files step by step to the target webservice. Finally flag the files which are successfully submitted.

sounds feasible to me or did I not take notice of something?

Rgds,

Jens

former_member190457
Contributor
0 Kudos

Hi Jens,

the answers are more than one and indeed are quite simple and simply leverage the JAX-WS specification

1. use the one way semantic for web service

2. use asynchroous invocation (callback or polling)

Hope this helps

Thanks, regards

Vincenzo