Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support job services in OSGi framework with JobStoreTX and JobStoreCMT #37

Merged
merged 4 commits into from Apr 17, 2017

Conversation

SinaTadayon
Copy link
Contributor

Motivation:
    Lack of support job services in OSGi framework when job store set to JobStoreTX/JobStoreCMT

Modifications:
    Create org.quartz.osgi package that contains follow features:
        - Initialize Quartz bundle with Activator
        - Tracking register/unregister of job services
        - Provide ClassLoaderHelper that can load classes of 
          job services from other bundles

    Modify org.quartz.simpl.CascadingClassLoadHelper.java:
        - Add BundleClassLoaderHelper to end of loaders list

    Modify quartz-core/pom.xml:
        - Add Bundle-Activator tag
        - Modify Private-Package

    Add .gitignore file that to ignore IDE files and etc.

Result:
    The Quartz support job schedule when OSGi job services configured with 
    JobStoreTX/JobStoreCMT

	Motivation:
		Support OSGi job services when job store set to JobStoreTX/JobStoreCMT

	Modifications:
		Create org.quartz.osgi package that contains follow features:
			- Initialize Quartz bundle with Activator
			- Tracking register/unregister of job services
		 	- Provide ClassLoaderHelper that can load classes of job services from other bundles

		Modify org.quartz.simpl.CascadingClassLoadHelper.java:
			- Add BundleClassLoaderHelper to end of loaders list

		Modify quartz-core/pom.xml:
			- Add Bundle-Activator tag
			- Modify Private-Package

		Add .gitignore file that to ignore IDE files and etc.

	Result:
		The Quratz support job schedule when OSGi job services configured with JobStoreTX/JobStoreCMT
@zemian
Copy link
Contributor

zemian commented Jan 16, 2017

Hi all, I don't have enough knowledge to test this PR in OSGI env from my machine. Can someone from the quartz dev group help verify this PR?

Also, please remove .gitignore as part of the PR because we already have the correct one set in master now.

Also please ensure same valid changes is apply to quartz-2.2.x branch.

Thanks!

@SinaTadayon
Copy link
Contributor Author

SinaTadayon commented Jan 18, 2017

hi Zemian
You can test this PR with the Karaf container which first create the Quartz bundle then install it.
you can writing a job service and register it into OSGI framework which the quartz tracking your service then scheduled and execute it.

I test it this project with quartz-2.2.x into my project and it's work.

I will remove .gitignore file

	Motivation:
		Support OSGi job services when job store set to JobStoreTX/JobStoreCMT

	Modifications:
		Create org.quartz.osgi package that contains follow features:
			- Initialize Quartz bundle with Activator
			- Tracking register/unregister of job services
		 	- Provide ClassLoaderHelper that can load classes of job services from other bundles

		Modify org.quartz.simpl.CascadingClassLoadHelper.java:
			- Add BundleClassLoaderHelper to end of loaders list

		Modify quartz-core/pom.xml:
			- Add Bundle-Activator tag
			- Modify Private-Package

		Add .gitignore file that to ignore IDE files and etc.

	Result:
		The Quratz support job schedule when OSGi job services configured with JobStoreTX/JobStoreCMT
@jhouserizer
Copy link
Contributor

Hi @SinaTadayon ,

This contribution falls under the conditions described under the heading "Contributions which do require a full Contributor’s License Agreement (CLA)" here: http://www.quartz-scheduler.org/community/contribute.html

We very much appreciate your contribution, and request that you submit a signed agreement.

@jhouserizer jhouserizer added this to the 2.3.0 milestone Feb 4, 2017
@jhouserizer
Copy link
Contributor

Without CLA in the next day or two, this PR will have to be removed from the 2.3.0 milestone

@SinaTadayon
Copy link
Contributor Author

SinaTadayon commented Apr 8, 2017 via email

@jhouserizer
Copy link
Contributor

Thank you. Could you also either: 1) update the PR wil the .gitignore file removed, or 2) give me permission to commit/push to your branch.

    Lack of support job services in OSGi framework when job store set to JobStoreTX/JobStoreCMT

Modifications:
    Create org.quartz.osgi package that contains follow features:
        - Initialize Quartz bundle with Activator
        - Tracking register/unregister of job services
        - Provide ClassLoaderHelper that can load classes of
          job services from other bundles

    Modify org.quartz.simpl.CascadingClassLoadHelper.java:
        - Add BundleClassLoaderHelper to end of loaders list

    Modify quartz-core/pom.xml:
        - Add Bundle-Activator tag
        - Modify Private-Package

Result:
    The Quartz support job schedule when OSGi job services configured with
    JobStoreTX/JobStoreCMT
@SinaTadayon
Copy link
Contributor Author

SinaTadayon commented Apr 9, 2017

I solved the conflict, change the commit profile and update the pom file.
Please check it.

thx

@jhouserizer
Copy link
Contributor

Thanks, I will try to review soon. Also, I haven't been able to access that file in your google drive - I sent a couple requests for access - please note them in your google inbox.

@SinaTadayon
Copy link
Contributor Author

SinaTadayon commented Apr 12, 2017 via email

@jhouserizer
Copy link
Contributor

I'm not sure we want the changes to CascadingClassLoadHelper that are currently included in this PR. I believe it will make all quartz users dependent upon the osgi libraries.

Perhaps an improvement would be to create a new ClassLoadHelper for use by those who are actually using osgi.

@SinaTadayon
Copy link
Contributor Author

SinaTadayon commented Apr 16, 2017

The OSGI libraries are arbitrary which does not forced quartz users dependent to the osgi.
The quartz architecture forced a new ClassLoadHelper must be add to the CascadingClassLoadHelper which it work probably.
I created a new BundleClassLoadHelper which it implement ClassLoadHelper, for adding the BundleClassLoadHelper to the quartz , i found the CascadingClassLoadHelper and modify it.
please help me and tell me where is to add the BundleClassLoadHelper to the quartz.

Thx

@jhouserizer
Copy link
Contributor

I will go ahead and merge this, then refactor it some so that the core CascadingClassLoadHelper is not altered, and osgi users can specify a specific class load helper with the existing configuration property "org.quartz.scheduler.classLoadHelper.class".

@jhouserizer
Copy link
Contributor

Thank you.

@SinaTadayon
Copy link
Contributor Author

Thank you and Best Regards

jhouserizer added a commit to jhouserizer/quartz that referenced this pull request Apr 18, 2017
jhouserizer added a commit that referenced this pull request Apr 19, 2017
Revert commits related to PRs #37 and #129 - osgi work
@jhouserizer jhouserizer removed this from the 2.3.0 milestone Apr 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants