>>>>> "'Achim Nierbeck' via OPS4J" <[email protected]>:
> it's a web bundle right? Yes. It has to be to get JSF working, if I've understood correctly...? > In that case it's a bit more tricky. Yes, web bundles are strange... > If you'd mix in Pax CDI this could be a possible solution. > An Example on how to mix in Services with CDI is available at [1]. Hm, yes, but this is just adding an injection to a servlet...? I already have OSGi service injections, and I would have been able to hand those over to a servlet. I'm running my own bundle activator https://github.com/sbang/jsr330activator and I have successfully captured OSGi services in it https://github.com/steinarb/ukelonn/blob/using-primefaces/ukelonn.bundle/src/main/java/no/priv/bang/ukelonn/impl/UkelonnServiceProvider.java The UkelonnDatabase service is currently provided by a bundle that creates a derby test database in memory: https://github.com/steinarb/ukelonn/tree/using-primefaces/ukelonn.bundle.test.db But the problem is how to get the captured OSGi services into the beans that are created on need by the JSF servlet...? I could stuff them into some singleton that the beans query from their constructor, but singletons with static accessors always feels wrong... > Now, which versions are you using right now? Of Pax Web? 4.2.7. The primefaces looks very nice and are easy to layout. But I dislike the magic needed to start JSF (ie. "needs to be a war, not a jar"), and I find it hard to grasp the lifecycles of the beans containing the model. And I'm also not happy about a system that requires sessions... that feels so... 2001. Since this is a project for fun and learning, I have started moving in a completely different directions: rendering HTML directly from servlets, using rendersnake: https://github.com/steinarb/ukelonn/tree/using-rendersnake -- -- ------------------ OPS4J - http://www.ops4j.org - [email protected] --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
