[xwiki-users] Not able to read attachments from server thread

2014-11-12 Thread Stefan Bernsdorf
Hi, I created a Macro in xwiki. In this macro a server process is started that tries to read attachments. For this, I created a XWikiCOntext to access the Wiki. This is the code: XWikiStubContextProvider prov=Utils.getComponent(XWikiStubContextProvider.class);

Re: [xwiki-users] Not able to read attachments from server thread

2014-11-12 Thread Stefan Bernsdorf
error, you should have a more detailed cause. On Wed, Nov 12, 2014 at 11:39 AM, Stefan Bernsdorf gruener.heinr...@web.de wrote: Hi, I created a Macro in xwiki. In this macro a server process is started that tries to read attachments. For this, I created a XWikiCOntext to access the Wiki

[xwiki-users] How to get The jobExecutor

2014-11-15 Thread Stefan Bernsdorf
Hi, I wanted to use the snip from page http://extensions.xwiki.org/xwiki/bin/view/Extension/Job+Module Request jobRequest = new DefaultRequest(); // Indicate an id to allow you to access the status of this unique task, the id is required to save/retrieve the status

[xwiki-users] JobManager vs JobExecutor

2014-11-20 Thread Stefan Bernsdorf
Hi, I have seen that the jobManager is deprecated since 6.1. But how would I schedule a job and return immediately using the jobExecutor? (Using the jobManager it would be something like : Job job = jobManager.addJob(jobtype, request)) Thanks , Stefan.

Re: [xwiki-users] JobManager vs JobExecutor

2014-11-20 Thread Stefan Bernsdorf
, Nov 20, 2014 at 9:38 AM, Stefan Bernsdorf gruener.heinr...@web.de wrote: Hi, I have seen that the jobManager is deprecated since 6.1. But how would I schedule a job and return immediately using the jobExecutor? (Using the jobManager it would be something like : Job job = jobManager.addJob(jobtype

Re: [xwiki-users] JobManager vs JobExecutor

2014-11-20 Thread Stefan Bernsdorf
, 2014 at 10:24 AM, Stefan Bernsdorf gruener.heinr...@web.de wrote: Thomas, if I start a job using jobExecutor.execute(antjob, req); it waits until the job is finished. Am 20.11.2014 09:44, schrieb Thomas Mortagne: As indicated in the javadoc of JobExecutor all jobs are executed asychronously

Re: [xwiki-users] JobManager vs JobExecutor

2014-11-20 Thread Stefan Bernsdorf
, Stefan Bernsdorf gruener.heinr...@web.de wrote: Thomas, thanks. I managed to build my thread as an XWiki Job and also managed to add it to the JobExecutor. However, my initial problem still persists. I am not able to add an attachment to a document in this job. Find the stack trace below. Looking

Re: [xwiki-users] JobManager vs JobExecutor

2014-11-21 Thread Stefan Bernsdorf
Am 21.11.2014 09:11, schrieb Thomas Mortagne: On Fri, Nov 21, 2014 at 8:42 AM, Stefan Bernsdorf gruener.heinr...@web.de wrote: Thomas, it seems it has nothing to do with my context. I tried to initialize my context with the xcontextProvider. It failed again. Instead I checked the source code

Re: [xwiki-users] JobManager vs JobExecutor

2014-11-21 Thread Stefan Bernsdorf
Am 21.11.2014 10:20, schrieb Thomas Mortagne: On Fri, Nov 21, 2014 at 9:54 AM, Stefan Bernsdorf gruener.heinr...@web.de wrote: Am 21.11.2014 09:11, schrieb Thomas Mortagne: On Fri, Nov 21, 2014 at 8:42 AM, Stefan Bernsdorf gruener.heinr...@web.de wrote: Thomas, it seems it has nothing to do

Re: [xwiki-users] JobManager vs JobExecutor

2014-11-22 Thread Stefan Bernsdorf
Thomas, the wrong XWikiContext only occurs, when I use a ScriptService Implementation to inject it. If I start the Job from inside a Macro Implementation everything is fine. Regards, Stefan. Am 21.11.2014 10:53, schrieb Stefan Bernsdorf: Am 21.11.2014 10:20, schrieb Thomas Mortagne

Re: [xwiki-users] JobManager vs JobExecutor

2014-11-22 Thread Stefan Bernsdorf
Thomas, the wrong XWikiContext only occurs, when I use a ScriptService Implementation to inject it. If I start the Job from inside a Macro Implementation everything is fine. Regards, Stefan. Am 21.11.2014 10:53, schrieb Stefan Bernsdorf: Am 21.11.2014 10:20, schrieb Thomas Mortagne