Best way to embed into a Web Container

"Trustin Lee (이희승)" trustin at gmail.com
Mon Mar 29 10:12:04 EDT 2010


Unfortunately, Tomcat has its own I/O layer that is unshared with Netty.
 Therefore, you have to run Netty on a different port.

If someone writes a Tomcat connector based on Netty in the future, Netty
could intercept only WebSocket requests and forward all other requests
to Tomcat.

Even if they run on different ports, they can share the resources and
beans.  In your Spring beans XML, you could call some factory that
initializes your Netty application and inject some resources there.

HTH,
Trustin

José Antonio Silva Portell wrote:
> Hi everyone,
> 
> I'm playing with Netty and I found it pretty awesome. I started to work on a
> Web Socket project and I like to embed the Netty into the web container...
> 
> My idea is to have all the web stuff in Spring MVC (signup, settings, home
> page, ...) and the real time section updated by websockets and Netty.
> 
> For example:
> 
> -Tomcat + Spring MVC listening in localhost:8080/myapp
> -Netty listening in localhost:8080/myapp/websockets
> 
> If the two system can share the same connection pool to the DB it will be
> great to... Is there a way to start Netty from the Spring Application
> context??? Can they (Netty handler and Spring MVC controller) share the same
> DAO beans???
> 
> Any suggestion?
> 
> Thanks,
> Jose Antonio
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users

-- 
what we call human nature in actuality is human habit
http://gleamynode.net/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20100329/c207b0c2/attachment-0001.bin 


More information about the netty-users mailing list