1 of 1 people found this helpful
You would have to implement all of the OSGi functionality in a wrapper. ModeShape is not OSGi-enabled, and at this point Infinispan is not either. The Infinispan folks are working on it now, and we've had it on our roadmap for a while but really can only do it once Infinispan does.
thanks for your reply.I'm learning both osgi and modeshape recently.Not really know how to solve the error and what should be done.can you give me some advice？
I'm not terribly familiar with the details, but I know enough to say that the biggest challenge with using ModeShape and Infinispan in OSGi is related to class loading. So my understanding is that you can create your own custom OSGi artifact that wraps and includes all ModeShape and Infinispan libraries (and perhaps all of their dependencies). There are other options, but that's the most straightforward since it puts all ModeShape and Infinispan code into a single OSGi classloader.
Does someone else have a better suggestion?
I have put ModeShape and Infinispan code into a single OSGi classloader.Modeshape engine can run ,but i have got a error below when I send a get reqeust:
javax.naming.NotContextException: The intermediate context Persisted-Repository does not exist
Are you using JNDI in your application? If not, be sure to set the "jndiName" to a blank string in the repository configuration. If you are, be sure to set it to a valid JNDI name for your environment.