Skip to content

rch/erlang-osgi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

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

About

erlang osgi bridge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published