Modified: trunk/core/src/main/java/org/servicemix/jbi/nmr/flow/jca/JCAFlow.java (913 => 914)
--- trunk/core/src/main/java/org/servicemix/jbi/nmr/flow/jca/JCAFlow.java 2005-11-23 21:16:12 UTC (rev 913)
+++ trunk/core/src/main/java/org/servicemix/jbi/nmr/flow/jca/JCAFlow.java 2005-11-23 21:23:45 UTC (rev 914)
@@ -111,10 +111,12 @@
* @return the type
*/
public String getDescription() {
- return "jms";
+ return "jca";
}
/**
+ * Returns the JMS URL for this flow
+ *
* @return Returns the jmsURL.
*/
public String getJmsURL() {
@@ -122,6 +124,8 @@
}
/**
+ * Sets the JMS URL for this flow
+ *
* @param jmsURL The jmsURL to set.
*/
public void setJmsURL(String jmsURL) {
@@ -129,6 +133,8 @@
}
/**
+ * Returns the password for this flow
+ *
* @return Returns the password.
*/
public String getPassword() {
@@ -136,6 +142,8 @@
}
/**
+ * Sets the password for this flow
+ *
* @param password The password to set.
*/
public void setPassword(String password) {
@@ -143,6 +151,8 @@
}
/**
+ * Sets the User Name for this flow
+ *
* @return Returns the userName.
*/
public String getUserName() {
@@ -150,6 +160,8 @@
}
/**
+ * Returns the User Name for this flow
+ *
* @param userName The userName to set.
*/
public void setUserName(String userName) {
@@ -157,6 +169,8 @@
}
/**
+ * Returns the ConnectionFactory for this flow
+ *
* @return Returns the connectionFactory.
*/
public ConnectionFactory getConnectionFactory() {
@@ -164,6 +178,8 @@
}
/**
+ * Sets the ConnectionFactory for this flow
+ *
* @param connectionFactory The connectionFactory to set.
*/
public void setConnectionFactory(ConnectionFactory connectoFactory) {
@@ -171,6 +187,8 @@
}
/**
+ * Returns the Broadcast Destination Name for this flow
+ *
* @return Returns the broadcastDestinationName.
*/
public String getBroadcastDestinationName() {
@@ -178,6 +196,8 @@
}
/**
+ * Sets the Broadcast Destination Name for this flow
+ *
* @param broadcastDestinationName The broadcastDestinationName to set.
*/
public void setBroadcastDestinationName(String broadcastDestinationName) {
@@ -246,7 +266,7 @@
advisor.addListener(this);
}
catch (Exception e) {
- log.error("Failed t0 initialize JCAFlow", e);
+ log.error("Failed to initialize JCAFlow", e);
throw new JBIException(e);
}
}
@@ -378,7 +398,7 @@
}
/**
- * ConsumerAdvisoerEventListener implementation
+ * ConsumerAdvisoryEventListener implementation
*
* @param event
*/
@@ -402,7 +422,7 @@
/**
* Distribute an ExchangePacket
*
- * @param packet
+ * @param me
* @throws MessagingException
*/
protected void doSend(MessageExchangeImpl me) throws MessagingException {
@@ -412,7 +432,7 @@
/**
* Distribute an ExchangePacket
*
- * @param packet
+ * @param me
* @throws MessagingException
*/
public void doRouting(final MessageExchangeImpl me) throws MessagingException {
@@ -494,19 +514,20 @@
ComponentPacket packet = event.getPacket();
if (!packet.getComponentNameSpace().getContainerName().equals(broker.getContainerName())) {
log.info("received from internal JMS network: " + event);
- if (event.getStatus() == ComponentPacketEvent.ACTIVATED) {
- addRemotePacket(containerName, packet);
- }
- else if (event.getStatus() == ComponentPacketEvent.DEACTIVATED) {
- removeRemotePacket(containerName, packet);
- }
- else if (event.getStatus() == ComponentPacketEvent.STATE_CHANGE) {
- updateRemotePacket(containerName, packet);
- }
- else {
- log.warn("Unable to determine ComponentPacketEvent type: " + event.getStatus() + " for packet: "
- + packet);
- }
+ int eventStatus = event.getStatus();
+ switch (eventStatus) {
+ case ComponentPacketEvent.ACTIVATED:
+ addRemotePacket(containerName, packet);
+ break;
+ case ComponentPacketEvent.DEACTIVATED:
+ removeRemotePacket(containerName, packet);
+ break;
+ case ComponentPacketEvent.STATE_CHANGE:
+ updateRemotePacket(containerName, packet);
+ break;
+ default:
+ log.warn("Unable to determine ComponentPacketEvent type: " + eventStatus + " for packet: " + packet);
+ }
}
}