Author: objectiser
Date: 2010-06-08 09:34:00 -0400 (Tue, 08 Jun 2010)
New Revision: 266
Modified:
trunk/samples/jbossesb/trailblazer/models/TrailBlazer.cdm
trunk/validators/jbossesb/src/main/java/org/jboss/savara/validator/jbossesb/pi4soa/ValidatorConfigGenerator.java
Log:
SAVARA-74 - updated code that generates the configuration information from the
choreography, and updated the sample choreography.
Modified: trunk/samples/jbossesb/trailblazer/models/TrailBlazer.cdm
===================================================================
--- trunk/samples/jbossesb/trailblazer/models/TrailBlazer.cdm 2010-06-08 13:06:40 UTC (rev
265)
+++ trunk/samples/jbossesb/trailblazer/models/TrailBlazer.cdm 2010-06-08 13:34:00 UTC (rev
266)
@@ -59,17 +59,17 @@
<variableDefinitions description="Channel to facilitate interaction to
Notifier" name="NotifierChannel"
type="//@typeDefinitions/(a)channelTypes.2"
roleTypes="//@typeDefinitions/(a)roleTypes.2
//@typeDefinitions/(a)roleTypes.3"/>
<activities xsi:type="org.pi4soa.cdl:Interaction"
name="QuoteRequest" operation="requestQuote"
channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.0"
relationship="//@typeDefinitions/(a)relationshipTypes.0">
<exchangeDetails description="This is the exchange details for the
request exchange associated with interaction QuoteRequest"
name="QuoteRequestRequestExchange"
type="//@typeDefinitions/(a)informationTypes.5">
- <semanticAnnotations
annotation="<jbossesb>
	<destination
name="{{Destination;The URI for the ESB
destination;string;;jms:queue/esb-tb-jmsBankRequestQueue}}"
		dynamicReplyTo="{{Dynamic
ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}"
/>
</jbossesb>
"
name="jbossesb"/>
- <semanticAnnotations
annotation="<jbossesb>
	<destination
name="{{Destination;The URI for the ESB
destination;string;;jms:queue/esb-tb-fileBankRequestQueue}}"
		dynamicReplyTo="{{Dynamic
ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}"
/>
</jbossesb>
"
name="jbossesb"/>
+ <semanticAnnotations
annotation="<validator>
	<destination
name="{{Destination;The URI for the ESB
destination;string;;jms:queue/esb-tb-jmsBankRequestQueue}}"
		dynamicReplyTo="{{Dynamic
ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}"
/>
</validator>
"
name="validator"/>
+ <semanticAnnotations
annotation="<validator>
	<destination
name="{{Destination;The URI for the ESB
destination;string;;jms:queue/esb-tb-fileBankRequestQueue}}"
		dynamicReplyTo="{{Dynamic
ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}"
/>
</validator>
"
name="validator"/>
</exchangeDetails>
<exchangeDetails description="This is the exchange details for the
respond exchange associated with interaction QuoteRequest"
name="QuoteRequestRespondExchange"
type="//@typeDefinitions/(a)informationTypes.3" action="Respond">
- <semanticAnnotations
annotation="<jbossesb>
	<destination
name="{{Destination;The URI for the ESB
destination;string;;jms:queue/esb-tb-jmsBankResponseQueue}}"
		dynamicReplyTo="{{Dynamic
ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}"
/>
</jbossesb>
"
name="jbossesb"/>
- <semanticAnnotations
annotation="<jbossesb>
	<destination
name="{{Destination;The URI for the ESB
destination;string;;jms:queue/esb-tb-fileBankResponseQueue}}"
		dynamicReplyTo="{{Dynamic
ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}"
/>
</jbossesb>
"
name="jbossesb"/>
+ <semanticAnnotations
annotation="<validator>
	<destination
name="{{Destination;The URI for the ESB
destination;string;;jms:queue/esb-tb-jmsBankResponseQueue}}"
		dynamicReplyTo="{{Dynamic
ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}"
/>
</validator>
"
name="validator"/>
+ <semanticAnnotations
annotation="<validator>
	<destination
name="{{Destination;The URI for the ESB
destination;string;;jms:queue/esb-tb-fileBankResponseQueue}}"
		dynamicReplyTo="{{Dynamic
ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}"
/>
</validator>
"
name="validator"/>
</exchangeDetails>
</activities>
<activities xsi:type="org.pi4soa.cdl:Interaction"
name="NotifyCustomer" operation="notify"
channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.1"
relationship="//@typeDefinitions/(a)relationshipTypes.2">
<exchangeDetails description="This is the exchange details for the
request exchange associated with interaction NotifyCustomer"
name="NotifyCustomerRequestExchange"
type="//@typeDefinitions/(a)informationTypes.3">
- <semanticAnnotations
annotation="<jbossesb>
	<destination
name="{{Destination;The URI for the ESB
destination;string;;jms:queue/esb-tb-customerNotifier}}"
		dynamicReplyTo="{{Dynamic
ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}"
/>
</jbossesb>
"
name="jbossesb"/>
+ <semanticAnnotations
annotation="<validator>
	<destination
name="{{Destination;The URI for the ESB
destination;string;;jms:queue/esb-tb-customerNotifier}}"
		dynamicReplyTo="{{Dynamic
ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}"
/>
</validator>
"
name="validator"/>
</exchangeDetails>
</activities>
</enclosedChoreographies>
@@ -78,12 +78,12 @@
<variableDefinitions description="This is the variable
creditCheckResult" name="creditCheckResult"
type="//@typeDefinitions/(a)informationTypes.1"
roleTypes="//@typeDefinitions/(a)roleTypes.2"/>
<activities xsi:type="org.pi4soa.cdl:Interaction"
name="CreditCheck" operation="checkCredit"
channelVariable="//@choreographies.0/(a)variableDefinitions.0"
relationship="//@typeDefinitions/(a)relationshipTypes.1">
<exchangeDetails description="This is the exchange details for the request
exchange associated with interaction CreditCheck"
name="CreditCheckRequestExchange"
type="//@typeDefinitions/(a)informationTypes.0">
- <semanticAnnotations
annotation="<jbossesb>
	<destination
name="{{Destination;The URI for the ESB
destination;string;;jms:queue/esb-tb-creditAgencyQueue}}"
		dynamicReplyTo="{{Dynamic
ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}"
/>
</jbossesb>
"
name="jbossesb"/>
+ <semanticAnnotations
annotation="<validator>
	<destination
name="{{Destination;The URI for the ESB
destination;string;;jms:queue/esb-tb-creditAgencyQueue}}"
		dynamicReplyTo="{{Dynamic
ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}"
/>
</validator>
"
name="validator"/>
</exchangeDetails>
</activities>
<activities xsi:type="org.pi4soa.cdl:Interaction"
name="CreditCheck" operation="checkCredit"
channelVariable="//@choreographies.0/(a)variableDefinitions.0"
relationship="//@typeDefinitions/(a)relationshipTypes.1">
<exchangeDetails description="This is the exchange details for the respond
exchange associated with interaction CreditCheck"
name="CreditCheckRespondExchange"
type="//@typeDefinitions/(a)informationTypes.1" action="Respond"
receiveVariable="//@choreographies.0/(a)variableDefinitions.2">
- <semanticAnnotations
annotation="<jbossesb>
	<destination
name="{{Destination;The URI for the ESB
destination;string;;jms:queue/esb-tb-creditAgencyQueue_reply}}"
		dynamicReplyTo="{{Dynamic
ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}"
/>
</jbossesb>
"
name="jbossesb"/>
+ <semanticAnnotations
annotation="<validator>
	<destination
name="{{Destination;The URI for the ESB
destination;string;;jms:queue/esb-tb-creditAgencyQueue_reply}}"
		dynamicReplyTo="{{Dynamic
ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}"
/>
</validator>
"
name="validator"/>
</exchangeDetails>
</activities>
<activities xsi:type="org.pi4soa.cdl:Choice">
@@ -100,7 +100,7 @@
<activities xsi:type="org.pi4soa.cdl:Sequence"
description="Insufficient credit">
<activities xsi:type="org.pi4soa.cdl:Interaction"
name="NotifyCustomer" operation="notify"
channelVariable="//@choreographies.0/(a)variableDefinitions.1"
relationship="//@typeDefinitions/(a)relationshipTypes.2">
<exchangeDetails description="This is the exchange details for the
request exchange associated with interaction NotifyCustomer"
name="NotifyCustomerRequestExchange"
type="//@typeDefinitions/(a)informationTypes.2">
- <semanticAnnotations
annotation="<jbossesb>
	<destination
name="{{Destination;The URI for the ESB
destination;string;;jms:queue/esb-tb-customerNotifier}}"
		dynamicReplyTo="{{Dynamic
ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}"
/>
</jbossesb>
"
name="jbossesb"/>
+ <semanticAnnotations
annotation="<validator>
	<destination
name="{{Destination;The URI for the ESB
destination;string;;jms:queue/esb-tb-customerNotifier}}"
		dynamicReplyTo="{{Dynamic
ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}"
/>
</validator>
"
name="validator"/>
</exchangeDetails>
</activities>
</activities>
Modified:
trunk/validators/jbossesb/src/main/java/org/jboss/savara/validator/jbossesb/pi4soa/ValidatorConfigGenerator.java
===================================================================
---
trunk/validators/jbossesb/src/main/java/org/jboss/savara/validator/jbossesb/pi4soa/ValidatorConfigGenerator.java 2010-06-08
13:06:40 UTC (rev 265)
+++
trunk/validators/jbossesb/src/main/java/org/jboss/savara/validator/jbossesb/pi4soa/ValidatorConfigGenerator.java 2010-06-08
13:34:00 UTC (rev 266)
@@ -127,8 +127,8 @@
public class InputOutputAnalyser extends DefaultCDLVisitor {
private static final String DYNAMIC_REPLY_TO_ATTR = "dynamicReplyTo";
- private static final String JBOSSESB_ANNOTATION = "jbossesb";
- private static final String JBOSSESB_ELEMENT = "jbossesb";
+ private static final String VALIDATOR_ANNOTATION = "validator";
+ private static final String VALIDATOR_ELEMENT = "validator";
private static final String DESTINATION_ELEMENT = "destination";
private static final String NAME_ATTR = "name";
private static final String EPR_ATTR = "epr";
@@ -141,7 +141,7 @@
m_service = service;
m_templateProcessor =
- org.pi4soa.common.annotations.AnnotationsManagerFactory.getAnnotationsManager().getTemplateProcessor(JBOSSESB_ANNOTATION);
+ org.pi4soa.common.annotations.AnnotationsManagerFactory.getAnnotationsManager().getTemplateProcessor(VALIDATOR_ANNOTATION);
}
/**
@@ -183,7 +183,7 @@
org.w3c.dom.Element dest=null;
if (sa.getAnnotation() != null && sa.getName() != null &&
- sa.getName().equals(JBOSSESB_ANNOTATION)) {
+ sa.getName().equals(VALIDATOR_ANNOTATION)) {
try {
// Transform the text representation to DOM
DocumentBuilderFactory fact=DocumentBuilderFactory.newInstance();
@@ -196,7 +196,7 @@
if (doc.getDocumentElement() != null &&
doc.getDocumentElement().getNodeName().equals(
- JBOSSESB_ELEMENT)) {
+ VALIDATOR_ELEMENT)) {
org.w3c.dom.NodeList nl=
doc.getDocumentElement().getElementsByTagName(DESTINATION_ELEMENT);
@@ -211,7 +211,7 @@
}
} catch(Exception e) {
- logger.error("Failed to load jbossesb annotation", e);
+ logger.error("Failed to load validator annotation", e);
}
}
Show replies by date