You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Vassil Zorev (Jira)" <ji...@apache.org> on 2021/04/13 17:52:00 UTC

[jira] [Comment Edited] (KARAF-7105) How to get any configuration within the job context of a org.apache.karaf.scheduler.Job

    [ https://issues.apache.org/jira/browse/KARAF-7105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17320411#comment-17320411 ] 

Vassil Zorev edited comment on KARAF-7105 at 4/13/21, 5:51 PM:
---------------------------------------------------------------

Thank you Freeman Yue Fang,

I subscribed to the mailing list successfully i think, at least got an email reply such as:

Hi! This is the ezmlm program. I'm managing the
 user@karaf.apache.org mailing list.

Acknowledgment: I have added the address

vassil.zorev87@gmail.com

to the user mailing list.

Welcome to user@karaf.apache.org!
 ...

 

And my question appeared on the nabble page: [http://karaf.922171.n3.nabble.com/How-to-get-any-configuration-within-the-job-context-of-a-org-apache-karaf-scheduler-Job-td4059841.html.]

I still cannot post to this nabble page or reply there directly. It says
 Authorized Users Only
 Only authorized users can proceed in this area. You can use the form below to send a request to the administrators.

But hopefully i can reply if needed via email.

 

Regards,

Vassil


was (Author: vassilz):
Thank you Freeman Yue Fang,

I subscribed to the mailing list successfully i think, at least go an email reply such as:

Hi! This is the ezmlm program. I'm managing the
user@karaf.apache.org mailing list.

Acknowledgment: I have added the address

vassil.zorev87@gmail.com

to the user mailing list.

Welcome to user@karaf.apache.org!
...

 

And my question appeared on the nabble page: [http://karaf.922171.n3.nabble.com/How-to-get-any-configuration-within-the-job-context-of-a-org-apache-karaf-scheduler-Job-td4059841.html.]

I still cannot post to this nabble page or reply there directly. It says
Authorized Users Only
Only authorized users can proceed in this area. You can use the form below to send a request to the administrators.

But hopefully i can reply if needed via email.

 

Regards,

Vassil

> How to get any configuration within the job context of a org.apache.karaf.scheduler.Job
> ---------------------------------------------------------------------------------------
>
>                 Key: KARAF-7105
>                 URL: https://issues.apache.org/jira/browse/KARAF-7105
>             Project: Karaf
>          Issue Type: Question
>          Components: karaf
>    Affects Versions: 4.3.1
>         Environment: Windows 10 Home
> java --version
> java 9.0.4
> Java(TM) SE Runtime Environment (build 9.0.4+11)
> Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)
> Karaf 4.3.0
> Quartz config:
> Pid: org.apache.karaf.scheduler.quartz
> BundleLocation: ?
> Properties:
>  felix.fileinstall.filename = file:/C:/DEV/apache-karaf-4.3.0/etc/org.apache.karaf.scheduler.quartz.cfg
>  org.apache.karaf.features.configKey = org.apache.karaf.scheduler.quartz
>  org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
>  org.quartz.scheduler.instanceId = AUTO
>  org.quartz.scheduler.instanceName = Karaf
>  org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
>  org.quartz.threadPool.threadCount = 30
>  org.quartz.threadPool.threadPriority = 5
>  service.pid = org.apache.karaf.scheduler.quartz
>            Reporter: Vassil Zorev
>            Priority: Minor
>              Labels: job, scheduler
>         Attachments: SampleJob.java, pom.xml
>
>
> Hello,
> I haven't posted questions about Karaf before, so sorry if this is the wrong place for them.. I also tried to subscribe to the karaf user mailing list so i can post my question there (as i thought it is the place for questions and general discussions), but my request is not yet approved, so not sure if i did it right at all. If possible, please give the correct steps to request such membership/subscription or if such requests take longer to process that's fine, i'll wait then.
>  
> To the question. Following the karaf-scheduler-example for a Runnable service (https://github.com/apache/karaf/tree/main/examples/karaf-scheduler-example/karaf-scheduler-example-runnable) i implemented a similar Job-based service. Please see attached the Job itself and its pom.xml. I placed it in a module within the existing examples project only for local testing purpose, so please don't mind the official groupId/package..
> Then the job was executed 5 times as expected, but each time if i tried to read from the JobContext the configuration attribute, it is always null (org.apache.karaf.scheduler.JobContext#getConfiguration). I tried to figure out by looking at the scheduler sources (org.apache.karaf.scheduler.core.QuartzScheduler) how the job is scheduled, but couldn't find that there is any configuration set there in any case. Please tell me if i missed something, if such configuration would be available to the job implementor at all in any case, and what to expect there ?
>  
> Hope you got my question..
> Thank you,
> Regards,
> Vassil Zorev



--
This message was sent by Atlassian Jira
(v8.3.4#803005)