On Fri, May 20, 2011 at 5:26 PM, Nicolas Delsaux <[email protected]> wrote:
> I have noted that Qi4J integrates its very own DI engine. is it > compatible with JSR-330 > (http://matthiaswessendorf.wordpress.com/2010/01/19/dependency-injection-the-jsr-330-way/) > in any way ? Qi4j does not implement JSR-330. Rickard was having some discussions with Bob about it, and I think there is a fundamental difference in how injection scopes are modeled in Qi4j vs how Lee designed the API. That said, I don't think there are any problems of having them both present in the same application. > And, as a consequence, would i be able, in one of my Qi4J > composite, as an example in a persistence Concern (hope to use the > right wording) to, say, use a Stateless EJB using an injected > Entitymanager to persist my composite ? or is there a more Qi4J way to > do ? I have indeed seen some kind of JDBC persistence extension, but > it seems to be very low level, far from what JPA can provide (in my > mind, at least, i may be utterly wrong) ... Oh damn, it was my second > question. How are my composite persisted ? I am not the EJB expert (Rickard's the man, unless he actively tried to forget it all), but isn't "Stateless EJB" a session bean? So, how do you get hold of it? JPA is hard to make compatible with Qi4j's fluent and flexible persistence SPI, called "Entity Store SPI", which allows types to be arbitrarily overloaded, shared and retrieved. So, the question is more; Is JPA dictated by some company policy, or is it just "by default" since you may not know of Qi4j persistence? > Concerning web-services, Is it possible to use a web-service using > WSDL with Qi4J ? And if so, how ? Do i need to do some special stunt > to have my Composite interface usable through JAX-WS and JAXB ? Or is > Qi4J using a totally different method to perform WSDL to java > conversion ? I am working on that library. The intent is to leverage Apache CXF and its very powerful type system, which allows me to add Qi4j ValueComposite as a understood type along side with "pojos". So, interfaces may have ValueComposites as arguments and return types and the org.qi4j.library.cxf takes care of the conversions. I have not checked the exact status on this, but I need to have this operational in June/July at work, so expect it to be fully operational (for ValueComposites) around then, probably a 1.5 release. > I've seen a mail regarding Authentication/Authorization in Qi4J, is it > compatible with JAAS ? Will i be able to propagate my Java EE role > into my Qi4J application ? Need to leave this for Rickard. The org.qi4j.library.auth is a very early attempt at standardizing this, but hasn't evolved into a fully documented and supported solution yet. For instance, the event sourcing library has its own authentication, which I think is JAAS based. Feedback in this is greatly appreciated, especially since my needs at work are not particularly extensive and won't drive implementations in this area. > Concerning packaging and so on, using my traditionnal JEE stack, I use > to package my EJBs in a JAR associated with a WAR containing > web-services and servlets, how will this packaging be changed using > Qi4J ? IIRC, Rickard packages Streamflow in WAR files as well, and deploys on Glassfish or something to that extent. Qi4j is fairly light and easily embeddable with 3-4 lines of bootstrap code if you like. In fact, we don't even have a standard Main class or server solution. > Concerning validation, is there any way to use Bean Validation in Qi4J ? I don't know what Bean Validation is. A quick look... If you are in Qi4j land, you are not likely to have any "beans/pojos" around, and the Qi4j equivalent is at least as powerful, called Constraints. They operate on Property instances and method arguments and are easy to create (also type-safe). > I know that's a bunch of questions, so thanks in advance for your answers. Hope it is useful, though. It would be interesting to hear what you try to achieve, especially since you seem to try and marry Qi4j with EJB/JPA which doesn't seem like the best of ideas to me. What is it in Qi4j that attracts, since you seem set on other DI, other persistence and other constraint/validation systems?? Cheers -- Niclas Hedhman, Software Developer http://www.qi4j.org - New Energy for Java I live here; http://tinyurl.com/3xugrbk I work here; http://tinyurl.com/24svnvk I relax here; http://tinyurl.com/2cgsug _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

