@@ -0,0 +1,1526 @@
+import com.ibm.broker.javacompute.MbJavaComputeNode;%0Aimport com.ibm.broker.plugin.MbException;%0Aimport com.ibm.broker.plugin.MbMessage;%0Aimport com.ibm.broker.plugin.MbMessageAssembly;%0Aimport com.ibm.broker.plugin.MbOutputTerminal;%0Aimport com.ibm.broker.plugin.MbUserException;%0A%0A%0Apublic class MQEndpointPolicyMain_JavaCompute extends MbJavaComputeNode %7B%0A%0A%09public void evaluate(MbMessageAssembly assembly) throws MbException %7B%0A%09%09MbOutputTerminal out = getOutputTerminal(%22out%22);%0A%09%09MbOutputTerminal alt = getOutputTerminal(%22alternate%22);%0A%0A%09%09try %7B%0A%09%09%09MbMessage message = assembly.getMessage();%0A%09%09%09// ----------------------------------------------------------%0A%09%09%09// Add user code below%0A%09%09%09String ConnType = message.getRootElement().getLastChild().getLastChild().getValue().toString();%0A%09%09%09if (ConnType.equals(%22LOCAL%22))%7B    %09%09%0A%09%09%09%09//route locally%0A%09%09%09%09out.propagate(assembly);%0A%09%09%09%7D%0A%09%09%09else if (ConnType.equals(%22REMOTE%22))%7B%0A%09%09%09%09//route remotely%0A%09%09%09%09alt.propagate(assembly);%0A%09%09%09%7D%0A%09%09%09// End of user code%0A%09%09%09// ----------------------------------------------------------%0A%09%09%7D catch (MbException e) %7B%0A%09%09%09// Re-throw to allow Broker handling of MbException%0A%09%09%09throw e;%0A%09%09%7D catch (RuntimeException e) %7B%0A%09%09%09// Re-throw to allow Broker handling of RuntimeException%0A%09%09%09throw e;%0A%09%09%7D catch (Exception e) %7B%0A%09%09%09// Consider replacing Exception with type(s) thrown by user code%0A%09%09%09// Example handling ensures all exceptions are re-thrown to be handled in the flow%0A%09%09%09throw new MbUserException(this, %22evaluate()%22, %22%22, %22%22, e.toString(),%0A%09%09%09%09%09null);%0A%09%09%7D%0A%09%7D%0A%7D%0A

Create MQEndpointPolicyMain_JavaCompute.java