Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Probably can't access application classes from bundles, including Spring classes
  • If Spring is used constant declarations in the bundles, then it cannot (yet) be used in the web applicationbundled XML config files are ignored, these constants need to be set in the application XML config files (struts.xml)

About Run levels

Application bundles should go under /WEB-INF/classes/bundles. Bundles in this dir will be started in run level 2, the Apache Felix framework's bundles will be loaded in run level 1. Any other bundle under /WEB-INF/classes/bundles/other will be started in run level 3.

...

Warning

By default Spring OSGi loads its xml config files asynchronously, which causes the OSGi plugin to fail while starting. To fix this add this line to MANIFEST.MF:

No Format
Spring-Context:*;create-asynchronously:=false

Or if using The Apache Felix maven plugin (see below for details):

Code Block
xml
xml
<Spring-Context>*;create-asynchronously:=false</Spring-Context>
Note

Please note that you do not need to have the Struts Spring plugin in your application, in order to use Spring with the OSGi plugin.

If you want to use the Spring as the object factory for your actions, then follow these steps:

...