Hi Nicolas,

Le vendredi 20 mai 2011 11:26:03, Nicolas Delsaux a écrit :
> Like I said, i have a static model i want to access dynamically. But,
> as the title of my message suggests, this proejct is intended to run
> in the javaEE 6 world (think EJBs, JPA persistence, JAX-WS web
> services, and so on). As a consequence, most of my upcoming question
> will regard integration of Qi4J integration with JavaEE features.

>From my point of view there are many different ways to integrate Qi4j enabled 
code in a JEE stack so to give you a practical answer we will need to know a 
little more about your project. Do you want to add some Qi4j enabled code 
inside 
an existing JEE app or you can write a full Qi4j application that must be 
deployed 
on a JEE stack ?

I maintain a Qi4j application that is embedded in a JEE application, meaning 
that 
the Qi4j code represent only a subpart of the whole app that use EJB, JPA and 
co. 
Each one have it's own persisted model. In my case the Qi4j app do not expose 
services 
directly but JEE based JAX-WS webservices are using the Qi4j app. 
It's working gracefully.

Like Niclas said, there is no such thing as main class in Qi4j and it's as easy 
as some
lines of code to embedd a full Qi4j application.

 
> 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-th
> e-jsr-330-way/) in any way ? 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 ?

In Qi4j the base persistence concepts are represented by Entity and EntityStore.
This is something really different from JPA (really more powerfull and clever 
in 
my opinion). You can mix the two in a single application but you could also 
import 
an EntityManager as a Service in your Qi4j application for example and so 
simply 
not use the persistence mechanisms provided by Qi4j. This is very modular, you 
can really choose what to use from the Qi4j codebase and whatnot.

 
> 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 ?

Qi4j state modeling is fully backed by the JSON format so it's more suited for
JSON based web services. You should look at what Niclas did with JAX-WS. I 
don't 
use this qi4j-lib (yet?) and I have the gut feeling that the main questions 
you'll have 
regarding it is how Qi4j enbaled services endpoints can be deployed in a 
WAR/EAR context.

 
> 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 ?

I don't know much about qi4j-lib-auth, Rickard will tell us if this could be 
the way to go for you. There is another possible choice, qi4j-lib-shiro 
intergrates
Apache Shiro into Qi4j and you could write your own realm that gather
authentication and authorization informations from the JEE world to set them
in you Qi4j application. Or if your JEE app already use Apache Shiro then it's 
much 
simpler. Again there are many ways to do things and without knowing more about 
your project it's difficult to give you a practical answer.

 
> 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 ?

A full Qi4j app can be packaged as a jar file with it's dependencies so can 
easily be 
embedded in a WAR or EAR archive.

HTH

/Paul


-- 
Paul Merlin - eskatos.github.com

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to