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
[CLOUD-2455] - [BxMS] ERROR IJ000315: Pool amq-ConnectionFactory has … #226
Conversation
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.
Please see comments about potential changes.
resource_adapter="${resource_adapter}<connection-definitions><connection-definition class-name=\"${ra_class}\" jndi-name=\"${ra_jndi}\" enabled=\"true\" use-java-context=\"true\">" | ||
resource_adapter="${resource_adapter}<connection-definitions><connection-definition" | ||
# monitor applications, look for unclosed resources. | ||
tracking=$(find_env "${ra_prefix}_TRACKING" "true") |
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 think the "tracking" variable can be declared as local, and moved into the "if [[ "$JBOSS_EAP_VERSION" == "7."* ]]" statement below it.
- Shouldn't the default be "false", per the workaround described in CLOUD-2455?
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.
agreed, thanks.
|
||
if [[ "$JBOSS_EAP_VERSION" == "7."* ]]; then | ||
# monitor applications, look for unclosed resources. | ||
local tracking=$(find_env "${ra_prefix}_TRACKING" "false") |
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 should keep the default and set it only if the property is set. (I believe in general it defaults to true, but perhaps not always)
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.
After discussion, I agree with @maschmid . Instead of checking the jboss eap version, just see if the tracking variable is set. If it is, set it, otherwise, do nothing. Additionally, instead of having to change all our KIE templates to set this variable to false, we can just set them in the image.yaml (not even needing to declare them in the templates).
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.
The problem of doing this is that it will also be applied on eap6, is this setting also necessary on eap6?
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.
The idea is that we wouldn't set the variable unless the env var is defined (so, don't use a default value when looking up the env var). It then wouldn't be applied to eap6, because no one would be setting the env var.
Make sure you also don't need to change (or do that same / similar change there if you need) |
Dismissing my review in favor of @maschmid's.
resource_adapter="${resource_adapter}<connection-definitions><connection-definition class-name=\"${ra_class}\" jndi-name=\"${ra_jndi}\" enabled=\"true\" use-java-context=\"true\">" | ||
resource_adapter="${resource_adapter}<connection-definitions><connection-definition" | ||
|
||
if [ -n "${RA_TRACKING}" ]; then |
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.
in this case this is resource-adapter specific, so it should use the ra_prefix_TRACKING
@@ -313,14 +315,18 @@ function inject_brokers() { | |||
# topics environment variable name format: [NAME]_[BROKER_TYPE]_TOPICS | |||
topics=$(find_env "${prefix}_TOPICS") | |||
|
|||
if [ -n "${RA_TRACKING}" ]; then |
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.
should be specific to the resource adapter, as in general there can be more (should use the ${prefix}_TRACKING
…1 active handles Signed-off-by: Filippe Spolti <fspolti@redhat.com>
@@ -172,6 +173,7 @@ function generate_resource_adapter() { | |||
<config-property name=\"ServerUrl\">tcp://$6:$7?jms.rmIdFromConnectionId=true</config-property> | |||
<connection-definitions> | |||
<connection-definition | |||
"${13}" |
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 is already inside quotes , did you mean just ${13} ?
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.
Its ok use quotes there since it is not escaped.
tracking=$(find_env "${prefix}_TRACKING") | ||
if [ -n "${tracking}" ]; then | ||
ra_tracking="tracking=\"${tracking}\"" | ||
fi |
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.
ra_tracking is potentially undefined here, it would be better to explicitly set it to an empty string, just to be safe from a global "ra_tracking" set somewhere else...
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 is a hard scenario but can happen since this var is not local, I'll updated it, does it block the QE to test using the images that is already there?
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.
no I don't think we need to retest on trivial changes, as long as the container behave tests pass.
resource_adapter="${resource_adapter}<connection-definitions><connection-definition class-name=\"${ra_class}\" jndi-name=\"${ra_jndi}\" enabled=\"true\" use-java-context=\"true\">" | ||
resource_adapter="${resource_adapter}<connection-definitions><connection-definition" | ||
|
||
tracking=$(find_env "${ra_prefix}_TRACKING") |
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 should be local.
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.
never mind. it looks like this is initialized every time.
…1 active handles
Signed-off-by: Filippe Spolti fspolti@redhat.com
Thanks for submitting your Pull Request!
Please make sure your PR meets following requirements:
[CLOUD-XYA] Subject
CONTRIBUTING.md
)Signed-off-by: Your Name <yourname@redhat.com>
- usegit commit -s