-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
44 lines (31 loc) · 1.73 KB
/
README
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
42
43
44
INSTALL:
1) Download and unpack a current Apache Felix distribution and rename the framework directory to 'felix' in the erlang-osgi directory
2) Download bundles for Event Admin and Config Admin to felix/bundle
3) Use bnd to create a bundle from the jinterface package (OtpErlang.jar) included with Erlang (you may have t build from source)
> java -jar biz.aQute.bnd-2.3.0.jar wrap -o OtpErlangOSGi.jar OtpErlang.jar
4) It is not used yet, but you might as well add the current Jackson distribution to the bundle directory (it is already a valid bundle)
5) Compile erlang-osgi (the 'byt' directory must exist)
> javac -cp felix/bin/felix.jar:felix/bundle/org.apache.felix.eventadmin-1.3.2.jar:felix/bundle/OtpErlangOSGi.jar -d bin src/core/*.java src/core/service/*.java
6) jar it up
> jar cfm erlang-osgi.jar src/core/manifest.mf -C bin core core/service
7) deploy that to the felix bundle directory as well
> mv erlang-osgi.jar felix/bundle/
8) cd to the felix directory and start the framework
> cd felix
> java -jar bin/felix.jar
9) type 'felix:lb' to make sure the necessary bundles are installed and activated
USAGE:
1) Open a new terminal and cd to the erlang-osgi/lib directory
2) Ensure the escript 'msglib' uses your local erlang cookie
> erl -smp enable -sname osgi@localhost
Eshell V5.10.4 (abort with ^G)
(osgi@localhost)1> erlang:get_cookie().
'YOURCOOKIE'
# replace YOURCOOKIE in the msglib text file with the actual value
3) Run the escript and enter some text, you should see the response from the osgi node
> chmod +x msglib
> ./msglib
> chk
{"code":200,"json":{"OK":chk},"headers":{"Content-Type":"text/plain"}}
TODO:
-- switch to concurrent collections objects