diff options
author | wjaniszewski <wjaniszewski@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-15 11:19:14 +0000 |
---|---|---|
committer | wjaniszewski <wjaniszewski@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-15 11:19:14 +0000 |
commit | fdfa3d0df9dc79314411bf455cc71c5677925e1b (patch) | |
tree | 408538346626c7b78bd13a4092ae323362ebe124 /sandbox/wjaniszewski/binding-erlang-runtime/src/main/java/org/apache/tuscany/sca/binding/erlang/impl/ErlangInvoker.java | |
parent | b44951427248e4cf764e2533115272ea17eb9b5f (diff) |
Enabled exposing SCA components as Erlang message boxes.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@754654 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/wjaniszewski/binding-erlang-runtime/src/main/java/org/apache/tuscany/sca/binding/erlang/impl/ErlangInvoker.java')
-rw-r--r-- | sandbox/wjaniszewski/binding-erlang-runtime/src/main/java/org/apache/tuscany/sca/binding/erlang/impl/ErlangInvoker.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sandbox/wjaniszewski/binding-erlang-runtime/src/main/java/org/apache/tuscany/sca/binding/erlang/impl/ErlangInvoker.java b/sandbox/wjaniszewski/binding-erlang-runtime/src/main/java/org/apache/tuscany/sca/binding/erlang/impl/ErlangInvoker.java index fd9e89bc2d..9ed3713db4 100644 --- a/sandbox/wjaniszewski/binding-erlang-runtime/src/main/java/org/apache/tuscany/sca/binding/erlang/impl/ErlangInvoker.java +++ b/sandbox/wjaniszewski/binding-erlang-runtime/src/main/java/org/apache/tuscany/sca/binding/erlang/impl/ErlangInvoker.java @@ -37,7 +37,7 @@ import com.ericsson.otp.erlang.OtpPeer; import com.ericsson.otp.erlang.OtpSelf;
/**
- * @version $Rev: $ $Date: $
+ * @version $Rev$ $Date$
*/
public class ErlangInvoker implements Invoker {
@@ -59,6 +59,7 @@ public class ErlangInvoker implements Invoker { tmpMbox.send(msg.getOperation().getName(), binding.getNode(),
msgPayload);
if (msg.getOperation().getOutputType() != null) {
+ // TODO: add timeouts, timeout declaration method?
OtpMsg resultMsg = tmpMbox.receiveMsg();
OtpErlangObject result = resultMsg.getMsg();
msg.setBody(TypeHelpersProxy.toJava(result, msg.getOperation()
@@ -92,14 +93,15 @@ public class ErlangInvoker implements Invoker { OtpErlangTuple message = MessageHelper.rpcMessage(self.pid(), self
.createRef(), binding.getModule(), msg.getOperation()
.getName(), params);
- connection.send("rex", message);
+ connection.send(MessageHelper.RPC_MBOX, message);
OtpErlangObject result = connection.receiveRPC();
if (MessageHelper.isfunctionUndefMessage(result)) {
// TODO: externalize message?
Exception e = new ErlangException(
"No such function in referenced Erlang node.");
if (msg.getOperation().getFaultTypes().size() == 0) {
- // TODO: no way to throw exception, log it (temporary as System.out)
+ // TODO: no way to throw exception, log it (temporary as
+ // System.out)
// TODO: do we really want not to throw any exception?
System.out.println("PROBLEM: " + e.getMessage());
// in this case we don't throw occured problem, so we need
|