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

create resource definition annotations for Concurrency #141

Merged
merged 2 commits into from Sep 28, 2021

Conversation

njr-11
Copy link
Contributor

@njr-11 njr-11 commented May 10, 2021

This pull is the first step toward #38
It creates resource definition annotations:

@ContextServiceDefinition
@ManagedExecutorDefinition
@ManagedScheduledExecutorDefinition
@ManagedThreadFactory

along with a handful of attributes for each - hopefully the most basic ones that will be common across implementations and therefore non-controversial. More can certainly be added in follow-on pulls. I have not marked this pull to close out the issue, so that separate pulls will still be able to further build on top of this, adding in whatever other config is agreed upon.

Actions to accomplish after this pull goes in:

  • add more attributes
  • create corresponding <context-service>, <managed-executor>, <managed-scheduled-executor>, <managed-thread-factory> definitions in deployment descriptor schema
  • potentially replace config examples in the specification document with these annotations and/or deployment descriptor elements.

Signed-off-by: Nathan Rauh nathan.rauh@us.ibm.com

@njr-11 njr-11 added this to the 3.0 milestone May 10, 2021
Signed-off-by: Nathan Rauh <nathan.rauh@us.ibm.com>
@njr-11 njr-11 force-pushed the 38-resource-definition-annotations branch from 20988c2 to cb5a598 Compare May 11, 2021 21:07
@mswatosh mswatosh self-requested a review September 17, 2021 14:07
* <p>The amount of time in milliseconds that a task or action
* can execute before it is considered hung.</p>
*
* <p>The default value of <code>-1</code> indicates unknown.</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does unknown mean here? Is this meant to be unlimited?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it was intended to say unlimited. This, and the other occurrence are corrected under 6b80fec

public @interface ManagedExecutorDefinition {
/**
* JNDI name of the {@link ManagedExecutorService} instance.
* The JNDI name must must be in a valid Jakarta EE namespace,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra 'must'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting that. This, and the other occurrences of it, are fixed under 6b80fec

* <p>The amount of time in milliseconds that a task or action
* can execute before it is considered hung.</p>
*
* <p>The default value of <code>-1</code> indicates unknown.</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does unknown mean here? Is this meant to be unlimited?

public @interface ManagedThreadFactoryDefinition {
/**
* JNDI name of the {@link ManagedThreadFactory} instance.
* The JNDI name must must be in a valid Jakarta EE namespace,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra 'must'

* <pre>
* &lt;resource-env-ref&gt;
* &lt;resource-env-ref-name&gt;java:module/env/concurrent/MyExecutorRef&lt;/resource-env-ref-name&gt;
* &lt;resource-env-ref-type&gt;javax.enterprise.concurrent.ManagedExecutorService&lt;/resource-env-ref-type&gt;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update javax to jakarta

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and the other occurrences of it are also corrected under 6b80fec

* <pre>
* &lt;resource-env-ref&gt;
* &lt;resource-env-ref-name&gt;java:comp/env/concurrent/MyScheduledExecutorRef&lt;/resource-env-ref-name&gt;
* &lt;resource-env-ref-type&gt;javax.enterprise.concurrent.ManagedScheduledExecutorService&lt;/resource-env-ref-type&gt;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update javax to jakarta

* <pre>
* &lt;resource-env-ref&gt;
* &lt;resource-env-ref-name&gt;java:module/env/concurrent/MyThreadFactoryRef&lt;/resource-env-ref-name&gt;
* &lt;resource-env-ref-type&gt;javax.enterprise.concurrent.ManagedThreadFactory&lt;/resource-env-ref-type&gt;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update javax to jakarta

* <pre>
* &lt;resource-env-ref&gt;
* &lt;resource-env-ref-name&gt;java:app/env/concurrent/MyContextRef&lt;/resource-env-ref-name&gt;
* &lt;resource-env-ref-type&gt;javax.enterprise.concurrent.ContextService&lt;/resource-env-ref-type&gt;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update javax to jakarta

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