You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Chad Phillips (JIRA)" <de...@tuscany.apache.org> on 2009/10/28 23:11:59 UTC
[jira] Created: (TUSCANY-3356) Policies are being applied to
references even when they have not been attached
Policies are being applied to references even when they have not been attached
------------------------------------------------------------------------------
Key: TUSCANY-3356
URL: https://issues.apache.org/jira/browse/TUSCANY-3356
Project: Tuscany
Issue Type: Bug
Components: Java SCA Policy, Java SCA Samples
Affects Versions: Java-SCA-1.5.1, Java-SCA-Next
Environment: Windows XP Pro, Java 1.5.0_18, Tuscany SCA Java 1.5.1 & 1.6 SNAPSHOT (r826612)
Reporter: Chad Phillips
It appears that if a policy is present in the classpath of a composite that the policy will be applied to references even when it has not been attached. I'm not sure if this is a problem with the policy framework, the logging policy implementation classes, or the sample program.
I've also seen the same thing happen to remote services when the intent was applied to binding.ws on a separate project; the policy implementation classes for that project are using the same kind of logic that's used by the logging policy implementation.
Steps to reproduce the issue:
1.) Start by building the calculator-implementation-policies sample:
cd calculator-implementation-policies
mvn
1a.) When the unit tests are executed as part of the build, log entries from the components are displayed as expected. Example:
Oct 28, 2009 2:16:21 PM component.implementation: AnotherCalculatorServiceComponent(org.apache.tuscany.sca.implementation.java.impl.JavaImplementationImpl)
FINER: Returning from operation divide with return value 1.5
2.) Replace the calculator-implementation-policies\src\main\resources\Calculator.composite file with the attached version and run a clean build:
mvn clean test
2a.) The modified version of the .composite file removes the intents from the component definitions; this should have the effect of disabling all of the logging. However, when the unit tests are executed, the log entries are still being displayed when the CalculatorServiceComponent is accessed (which is not expected).
3.) Move the calculator-implementation-policies\src\main\resources\definitions.xml somewhere else so that it's not included in the jar and run a clean build. The output from the unit test does not contain the log entries from the components (just the expected log entries from the node being cycled).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (TUSCANY-3356) Policies are being applied to
references even when they have not been attached
Posted by "Chad Phillips (JIRA)" <de...@tuscany.apache.org>.
[ https://issues.apache.org/jira/browse/TUSCANY-3356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chad Phillips updated TUSCANY-3356:
-----------------------------------
Attachment: Calculator.composite
composite file with intents commented out
> Policies are being applied to references even when they have not been attached
> ------------------------------------------------------------------------------
>
> Key: TUSCANY-3356
> URL: https://issues.apache.org/jira/browse/TUSCANY-3356
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Policy, Java SCA Samples
> Affects Versions: Java-SCA-1.5.1, Java-SCA-Next
> Environment: Windows XP Pro, Java 1.5.0_18, Tuscany SCA Java 1.5.1 & 1.6 SNAPSHOT (r826612)
> Reporter: Chad Phillips
> Attachments: Calculator.composite
>
>
> It appears that if a policy is present in the classpath of a composite that the policy will be applied to references even when it has not been attached. I'm not sure if this is a problem with the policy framework, the logging policy implementation classes, or the sample program.
> I've also seen the same thing happen to remote services when the intent was applied to binding.ws on a separate project; the policy implementation classes for that project are using the same kind of logic that's used by the logging policy implementation.
> Steps to reproduce the issue:
> 1.) Start by building the calculator-implementation-policies sample:
> cd calculator-implementation-policies
> mvn
> 1a.) When the unit tests are executed as part of the build, log entries from the components are displayed as expected. Example:
> Oct 28, 2009 2:16:21 PM component.implementation: AnotherCalculatorServiceComponent(org.apache.tuscany.sca.implementation.java.impl.JavaImplementationImpl)
> FINER: Returning from operation divide with return value 1.5
> 2.) Replace the calculator-implementation-policies\src\main\resources\Calculator.composite file with the attached version and run a clean build:
> mvn clean test
> 2a.) The modified version of the .composite file removes the intents from the component definitions; this should have the effect of disabling all of the logging. However, when the unit tests are executed, the log entries are still being displayed when the CalculatorServiceComponent is accessed (which is not expected).
> 3.) Move the calculator-implementation-policies\src\main\resources\definitions.xml somewhere else so that it's not included in the jar and run a clean build. The output from the unit test does not contain the log entries from the components (just the expected log entries from the node being cycled).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (TUSCANY-3356) Policies are being applied to
references even when they have not been attached
Posted by "Chad Phillips (JIRA)" <de...@tuscany.apache.org>.
[ https://issues.apache.org/jira/browse/TUSCANY-3356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chad Phillips updated TUSCANY-3356:
-----------------------------------
Attachment: step3.out
step2.out
step1.out
Output from steps used to reproduce the issue
> Policies are being applied to references even when they have not been attached
> ------------------------------------------------------------------------------
>
> Key: TUSCANY-3356
> URL: https://issues.apache.org/jira/browse/TUSCANY-3356
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Policy, Java SCA Samples
> Affects Versions: Java-SCA-1.5.1, Java-SCA-Next
> Environment: Windows XP Pro, Java 1.5.0_18, Tuscany SCA Java 1.5.1 & 1.6 SNAPSHOT (r826612)
> Reporter: Chad Phillips
> Attachments: Calculator.composite, step1.out, step2.out, step3.out
>
>
> It appears that if a policy is present in the classpath of a composite that the policy will be applied to references even when it has not been attached. I'm not sure if this is a problem with the policy framework, the logging policy implementation classes, or the sample program.
> I've also seen the same thing happen to remote services when the intent was applied to binding.ws on a separate project; the policy implementation classes for that project are using the same kind of logic that's used by the logging policy implementation.
> Steps to reproduce the issue:
> 1.) Start by building the calculator-implementation-policies sample:
> cd calculator-implementation-policies
> mvn
> 1a.) When the unit tests are executed as part of the build, log entries from the components are displayed as expected. Example:
> Oct 28, 2009 2:16:21 PM component.implementation: AnotherCalculatorServiceComponent(org.apache.tuscany.sca.implementation.java.impl.JavaImplementationImpl)
> FINER: Returning from operation divide with return value 1.5
> 2.) Replace the calculator-implementation-policies\src\main\resources\Calculator.composite file with the attached version and run a clean build:
> mvn clean test
> 2a.) The modified version of the .composite file removes the intents from the component definitions; this should have the effect of disabling all of the logging. However, when the unit tests are executed, the log entries are still being displayed when the CalculatorServiceComponent is accessed (which is not expected).
> 3.) Move the calculator-implementation-policies\src\main\resources\definitions.xml somewhere else so that it's not included in the jar and run a clean build. The output from the unit test does not contain the log entries from the components (just the expected log entries from the node being cycled).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.