-
1. Re: ModeShape OSGI Container
rhauch Mar 31, 2014 1:20 PM (in response to a175335)1 of 1 people found this helpfulYou 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.
-
2. Re: ModeShape OSGI Container
a175335 Mar 31, 2014 9:36 PM (in response to rhauch)hi Randall,
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?
-
3. Re: ModeShape OSGI Container
rhauch Apr 1, 2014 10:08 AM (in response to a175335)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?
-
4. Re: ModeShape OSGI Container
a175335 Apr 2, 2014 12:48 AM (in response to rhauch)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
at org.apache.xbean.naming.context.AbstractContext.lookupFinalContext(AbstractContext.java:198)
at org.apache.xbean.naming.context.AbstractContext.addDeepBinding(AbstractContext.java:241)
at org.apache.xbean.naming.context.AbstractContext.bind(AbstractContext.java:660)
at org.apache.xbean.naming.context.AbstractContext.bind(AbstractContext.java:651)
at org.apache.servicemix.naming.InitialContextWrapper.bind(InitialContextWrapper.java:85)
at javax.naming.InitialContext.bind(InitialContext.java:400)[:1.6.0_43]
at org.modeshape.jcr.JcrRepository$RunningState.bindIntoJndi(JcrRepository.java:1680)[250:modeshape.rest:0.0.1.SNAPSHOT]
at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:1210)[250:modeshape.rest:0.0.1.SNAPSHOT]
at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:971)[250:modeshape.rest:0.0.1.SNAPSHOT]
-
5. Re: ModeShape OSGI Container
rhauch Apr 2, 2014 9:53 AM (in response to a175335)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.