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

C

C. Marco

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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top