You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

ServiceMix can be embedded in any application server, Java SE or EE platform. When working inside an application server you probably want to reuse the application servers JNDI provider and tooling.

When you are working in embedded mode, you probably want a JNDI provider to use to configure the services available to other JBI components which do not use dependency injection and Spring to configure themselves.

For a standalone JNDI provider, we do recommend using our own Spring based JNDI provider which is the default in the stand alone ServiceMix server. To use add the following jndi.properties file to your classpath

java.naming.factory.initial = org.servicemix.jbi.jndi.SpringInitialContextFactory

Note that you can also add a line

java.naming.provider.url = classpath:foo/bar.xml

Where the value is any valid Spring resource string such as a file://foo/bar.xml or a URL such as http://acme.com/whatnot.xml. The default value is assumed to be classpath://jndi.xml.

Then you can drop the following jndi.xml file on the classpath, which is a regular Spring configuration file which creates a JNDI context (called jndi)

Error formatting macro: snippet: java.lang.NullPointerException
.

  • No labels