-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
41 lines (31 loc) · 1.35 KB
/
README
File metadata and controls
41 lines (31 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
This is a port of the JavaScript browser front end for jabsorb (http://jabsorb.org) to nodeJS.
jabsorb is a very simple and flexible framework for directly calling java methods in a remote
JVM and serializing/deserializing the associated java objects over the wire using JSON-RPC.
See test.js for a very simple working example.
See http://jabsorb.org for more information on using jabsorb.
example usage:
// pull in jabsorb client
var nodejava=require('./jabsorb');
// create jabsorb (json-rpc) client for talking to Java
var java = new nodejava.client(["serverObjRef.serverMethodName", "exposedObject.methodCall", "etc.etc"], "http://your-url-to-jabsorb-server");
// call the remote Java server via json-rpc
java.exposedObject.methodCall(
// call back function
// r is result, e is exception
function(r, e)
{
if (r && !e)
{
console.log ("got a result!");
console.log ("result: " + JSON.stringify(r));
}
else
{
console.log("exception occured:");
console.log("exception: " + JSON.stringify(e));
}
}, argsGoHere, arg2, arg3, etc);
limitations:
At this time, only asychronous calls are supported (But you shouldn't be doing synchronous calls anyway, right?)
Also, there is no support for SSL.
Both of these are limitations of the XHR port that is being used (see http://github.com/arthurblake/node-XMLHttpRequest).