-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
CAMEL-10918 create sjms2 component to add support for JMS 2.0 #1514
Conversation
Yes master this will only be included in 2.19 onwards |
7b5978f
to
b03864c
Compare
d878f6b
to
4d1464f
Compare
@@ -98,6 +99,9 @@ | |||
private boolean persistent = true; | |||
@UriParam(label = "consumer") | |||
private String durableSubscriptionId; | |||
private String subscriptionId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add UriParam for these new options as well. For the new options that are on for jms2 you can move to it instead of keeping it here on the old component
|
||
|
||
// component options: START | ||
[NOTE] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be auto generated so no NOTE here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A pushed up what I have but I am having trouble with the docs it doesn't look like its generating the content and they are failing validation, I am probably missing something obvious.
/** | ||
* The <a href="http://camel.apache.org/sjms">Simple JMS2</a> component. | ||
*/ | ||
public class Sjms2Component extends SjmsComponent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a Sjms2Endpoint class as well with @UriEndpoint and all that stuff
} | ||
|
||
@Override | ||
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a afterConfiguration method you can use instead to change the jms object factory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to go a different route but good to know for the future.
@@ -0,0 +1 @@ | |||
class=org.apache.camel.component.sjms2.Sjms2Component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need ASF license headers like the other file has
@@ -0,0 +1,7 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need ASF license header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And log to file like the other does
I am having an issue getting the generated portion of the docs to work and getting it to pass validation but I pushed up what I had while I try and figure that out. |
44f3b63
to
c9f1596
Compare
@@ -110,6 +110,8 @@ private static File jsonFile(String scheme, String extendsScheme) { | |||
return new File("../camel-ftp/target/classes/org/apache/camel/component/file/remote/ftp.json"); | |||
} else if ("jms".equals(extendsScheme)) { | |||
return new File("../camel-jms/target/classes/org/apache/camel/component/jms/jms.json"); | |||
} else if ("sjms".equals(extendsScheme)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This didn't seem to resolve my docs issue either... still looking.
@Override | ||
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { | ||
validateMepAndReplyTo(parameters); | ||
Sjms2Endpoint endpoint = new Sjms2Endpoint(uri, this, remaining); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would likely be easier to create a protected method in the camel-sjms component to create the endpoint class, we do that for some other components we extend. Then this component just need to create a new Sjms2Endpoint and set the jms2 object factory and all the other configuration below is the same and done on the base class
For the documentation to work you would have to add the documentation to every @UriParam in the camel-sjms endpoint class. And for the component you must do the same for every @metadata This has been done on the other JMS component, eg camel-jms such as You can copy the documentation from the setter methods. The reason is that the apt plugin cannot read the source code from external JARs and therefore need access to the documentation using annotations. |
b2e2442
to
3b4f352
Compare
3b4f352
to
5e54ae4
Compare
Thanks for the PR it has been merged. Do you mind closing this? |
This PR adds a SJMS2 component that can support shared subscriptions along with some modifications to the SJMS component so that it could be extended by the new SJMS2 component.
I created the branch off of 2.18.x let me know if it should be off master.