OSGi BaseAdaptor doesn't take any note of config.ini

Discussion in 'Java' started by C. Marco, Mar 31, 2009.

  1. C. Marco

    C. Marco Guest

    Hi newsgroup,

    I have a little problem intializing a Equinox OSGi Framework from
    within a non-OSGi application. I tried playing around with

    FrameworkAdaptor m_adaptor = new BaseAdaptor(args); //args passed on
    from main(args)
    OSGi m_osgi = new OSGi(m_adaptor);
    BundleContext m_context = m_osgi.getBundleContext();

    and lateron starting it using m_osgi.launch(). But this seems to be
    ignoring my config.ini file which is located in configuration folder.
    I played around with some runtime options but I haven't figured out
    how I can instantiate an OSGi framework based on my config.ini. If I
    start up my OSGi application without that wrapper app. everything
    works just fine. All bundles are installed and started just like I
    configured it in my config.ini. How can I initialize my framework
    correctly? Maybe even use the same cache?

    Another problem I have is that I want to "automate" user interaction
    via the framework console. Therefore I tried out a

    String[] cmds = { "ss", "diag 1", "close" };
    FrameworkConsole m_console = new FrameworkConsole(m_osgi, cmds)

    where cmds is just a String array of all my commands. Starting this
    using m_console.run() works just fine, all commands are invoked but
    then there happens nothing. Every method call after that run() method
    is just ignored. There's no exception thrown, nothing. It even ignores
    my finally block in main()-method. Why is that so and what am I doing
    wrong?

    I would be so thankful if anyone could help me a little here. How
    would you guy do it?
     
    C. Marco, Mar 31, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. herc
    Replies:
    0
    Views:
    381
  2. Vesa Leppanen

    Reading config.ini in PythonWin.

    Vesa Leppanen, Sep 4, 2006, in forum: Python
    Replies:
    3
    Views:
    391
    Gabriel Genellina
    Sep 12, 2006
  3. brindy
    Replies:
    0
    Views:
    371
    brindy
    Aug 25, 2007
  4. Andreas Wapf

    python & osgi

    Andreas Wapf, Sep 13, 2007, in forum: Python
    Replies:
    1
    Views:
    724
    Marc 'BlackJack' Rintsch
    Sep 13, 2007
  5. Tim Chase
    Replies:
    0
    Views:
    387
    Tim Chase
    Dec 3, 2008
Loading...

Share This Page