Hi!

I've recently started looking into GWT, since we are about to start porting 
our Java-based desktop application to the web. We also have an OSGi 
application which contains a RESTful API that we use for other smaller 
applications. It would be very ideal for us to deploy our ported web app in 
this OSGi environment, where we can reuse the services we use for the 
RESTful API.
dep
I've seen some examples, articles and threads about people running GWT in 
OSGi, but that's it. Only running it in OSGi. This isn't exactly what I 
need. Deploying a .war into Karaf (for example) isn't a big deal. What I 
want is to use services exposed in OSGi. For example MBeanServer (that I 
think Karaf exposes automatically), or custom services, for example 
CustomerService (with the implementation CustomerServiceImpl) that we 
expose in OSGi using Aries Blueprint.

Consider this project/bundle structure

*interface*: Contains only interfaces for services that we want to expose 
in OSGi
*implementation*: Contains service implementations. Has a depenency on 
interface, but no other projects
*api*: This provides the RESTful API using CXF. Has a dependency on 
interface, but no other projects.
*web-app*: This would be a GWT bundle. It would have a dependency on 
interface, but no other projects, and I would like to inject the interfaces 
in my GWT-related code.

We coud choose to deploy either the *api*, the *web-app*, or *both*, in the 
same Karaf, but the main idea is to use the same code base and both parts 
in the same way.

How can I inject those services into my GWT-related code? I could always 
make the GWT-related code bundle context aware through some static stuff 
and fetch the services directly through that, but that doesn't feel very 
good. I'd rather inject the services through setter or constructor 
injection. However, I'm not sure how GWT is wired up.

As I mentioned, I'm very new to GWT, but I'd appreciate any assistence, 
suggestions, articles, etc. All I've found is only deploying GWT in OSGi, 
not actually using any services from OSGi.

Thanks in advance!

// Anton

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to