Bug 966898

Summary: Generic policies does not work
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: Jiri Pechanec <jpechane>
Component: SwitchYardAssignee: Keith Babo <kbabo>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Pechanec <jpechane>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.0 GACC: kconner, sbunciak, soa-p-jira
Target Milestone: ER2   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
modified switchyard-quickstart-bean-service containing definidtion of 2 custom policies (interaction|implementation) none

Description Jiri Pechanec 2013-05-24 08:47:28 UTC
I tried to create a custom policy and use it with SwitchYard.

According to LocalExchangeBus there is a 'generic-policy' handled by PolicyHandler.

Security and transaction policies have its own handlers.

Unfortunately when I try to deploy an application with the custom policy then the deployment fails with the exception

10:19:59,905 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-12) MSC000001: Failed to start service jboss.deployment.unit."implementations-component-test.jar".SwitchYardService: org.jboss.msc.service.StartException in service jboss.deployment.unit."implementations-component-test.jar".SwitchYardService: org.switchyard.exception.SwitchYardException: java.lang.Exception: Invalid policy name: 'good' doesn't exist.                                                                            
Caused by: org.switchyard.exception.SwitchYardException: java.lang.Exception: Invalid policy name: 'good' doesn't exist.                                              
Caused by: java.lang.Exception: Invalid policy name: 'good' doesn't exist.                                                                                            

I think this is caused by the implementation of PolicyFactory that has a static constructor that loads policies from SecurityPolicy and TransactionPolicy enums so I am not able to add additional policy.

Comment 1 Keith Babo 2013-05-24 12:41:18 UTC
Yup.

Comment 2 JBoss JIRA Server 2013-05-28 14:25:32 UTC
Keith Babo <kbabo> made a comment on jira SWITCHYARD-1502

pushed

Comment 6 Stefan Bunciak 2013-10-08 13:43:33 UTC
Created attachment 809303 [details]
modified switchyard-quickstart-bean-service containing definidtion of 2 custom policies (interaction|implementation)

Verified in FSW 6.0.0.ER4 with attached (modified) switchyard-quickstart-bean-service project.

Comment 7 JBoss JIRA Server 2014-06-16 23:51:54 UTC
Keith Babo <kbabo> updated the status of jira SWITCHYARD-1502 to Closed